Commit 35057aa4 authored by snuverink_j's avatar snuverink_j
Browse files

add more ippl/test applications to CMake

parent 6c8840e8
......@@ -12,7 +12,6 @@ link_directories (
${CMAKE_SOURCE_DIR}/src
)
add_compile_options (-std=c++11)
set (COMPILE_FLAGS ${OPAL_CXX_FLAGS})
set (IPPL_LIBS ippl)
......
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
message (STATUS "Only found stub of CMakeList.txt in ${_relPath}")
message (STATUS "Adding test t3 found in ${_relPath}")
include_directories (
${CMAKE_SOURCE_DIR}/ippl/src
)
link_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
set (IPPL_LIBS ippl)
set (COMPILE_FLAGS ${OPAL_CXX_FLAGS})
if (ENABLE_DKS)
include_directories (${DKS_INCLUDE_DIR})
link_directories (${DKS_LIBRARY_DIR})
SET (IPPL_LIBS ${IPPL_LIBS} ${DKS_LIBRARY_DIR}/libdks.a)
endif ()
add_executable (t3 t3.cpp)
target_link_libraries (
t3
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
# End:
\ No newline at end of file
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
message (STATUS "Only found stub of CMakeList.txt in ${_relPath}")
message (STATUS "Adding parallel tests found in ${_relPath}")
include_directories (
${CMAKE_SOURCE_DIR}/ippl/src
)
link_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
set (IPPL_LIBS ippl)
set (COMPILE_FLAGS ${OPAL_CXX_FLAGS})
if (ENABLE_DKS)
include_directories (${DKS_INCLUDE_DIR})
link_directories (${DKS_LIBRARY_DIR})
SET (IPPL_LIBS ${IPPL_LIBS} ${DKS_LIBRARY_DIR}/libdks.a)
endif ()
add_executable (2ddens 2ddens.cpp)
target_link_libraries (
2ddens
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
add_executable (dualmpi dualmpi.cpp)
target_link_libraries (
dualmpi
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
add_executable (reduce-1 reduce-1.cpp)
target_link_libraries (
reduce-1
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
add_executable (reduce-2 reduce-2.cpp)
target_link_libraries (
reduce-2
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
add_executable (volley volley.cpp)
target_link_libraries (
volley
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
# End:
\ No newline at end of file
......@@ -12,7 +12,7 @@
*
***************************************************************************/
***************************************************************************
/***************************************************************************
*
* A simple test program to test using IPPL with another MPI user.
*
......
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
message (STATUS "Adding test particle found in ${_relPath}")
message (STATUS "Adding particle tests found in ${_relPath}")
include_directories (
${CMAKE_SOURCE_DIR}/src
......@@ -14,9 +14,6 @@ link_directories (
${CMAKE_SOURCE_DIR}/src
)
add_compile_options (-std=c++11)
add_definitions (-DPARALLEL_IO)
set (IPPL_LIBS ippl)
set (COMPILE_FLAGS ${OPAL_CXX_FLAGS})
......@@ -85,15 +82,20 @@ target_link_libraries (
boost_timer
)
add_executable (test-scatter-1 test-scatter-1.cpp)
target_link_libraries (test-scatter-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (salman-1 salman-1.cpp)
target_link_libraries (salman-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (chsr-1 chsr-1.cpp)
target_link_libraries (chsr-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (chsr-2 chsr-2.cpp)
target_link_libraries (chsr-2 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (pbconds3D pbconds3D.cpp)
target_link_libraries (pbconds3D ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (salman-1 salman-1.cpp)
target_link_libraries (salman-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (test-scatter-1 test-scatter-1.cpp)
target_link_libraries (test-scatter-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
# vi: set et ts=4 sw=4 sts=4:
......
......@@ -2,8 +2,8 @@
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
......@@ -32,8 +32,8 @@ typedef ParticleSpatialLayout<Real,Dim> playout_t;
int main(int argc, char *argv[])
{
int i, j;
unsigned int i, j;
Ippl ippl(argc, argv);
Inform testmsg(argv[0]);
......@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
testmsg << "Start of initialization ..." << endl;
if (P.singleInitNode()) {
P.create(20); // makes new particles at end of current array
P.create(20); // makes new particles at end of current array
// put ten particles near right edge, and ten near left edge
for (j=0; j < 10; j++) { // initialize new values
P.R[j] = Vektor<Real,Dim>(5, j * 10,j * 10);
......@@ -87,13 +87,13 @@ int main(int argc, char *argv[])
}
//
// test 1:
// test 1:
// add offset to R positions, moving particles beyond the border
// bconds: all open
//
testmsg << "Testing open boundary conditions ... moving by (5,-1,10):" << endl;
for (int i=0; i < 2*Dim; ++i)
for (i=0; i < 2*Dim; ++i)
P.getBConds()[i] = ParticleNoBCond;
Vektor<Real,Dim> offset1(5,-1,10);
......@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
}
//
// test 2:
// test 2:
// add offset to X Y & Z positions
// BC: open X, Y
// periodc Z
......@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
testmsg << endl;
P.getBConds()[4] = ParticlePeriodicBCond;
P.getBConds()[5] = ParticlePeriodicBCond;
Vektor<Real,Dim> offset2(5,-1,10);
assign(P.R, P.R + offset2);
P.update();
......@@ -128,10 +128,4 @@ int main(int argc, char *argv[])
}
testmsg << "Particle test: Spatial layout: End." << endl;
return 0;
}
/***************************************************************************
* $RCSfile: pbconds3D.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:38 $
* IPPL_VERSION_ID: $Id: pbconds3D.cpp,v 1.1.1.1 2003/01/23 07:40:38 adelmann Exp $
***************************************************************************/
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment