Commit 7d42837c authored by snuverink_j's avatar snuverink_j
Browse files

Add FFT/SeaborgRes applications to CMake

parent 79443cef
......@@ -41,6 +41,8 @@ target_link_libraries (TestFFT-XT3 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer
target_link_libraries (TestRC ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (TestRCMIC ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_subdirectory (SeaborgRes)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
......
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
message ("Adding more FFT tests found in ${_relPath}")
add_executable (Seaborgfftspeed fftspeed.cpp)
add_executable (SeaborgTestFFT TestFFT.cpp)
add_executable (SeaborgTestFFT-PPP TestFFT-PPP.cpp)
add_executable (SeaborgTestFFT-SPP TestFFT-SPP.cpp)
add_executable (SeaborgTestFFT-SSP TestFFT-SSP.cpp)
add_executable (SeaborgTestRC TestRC.cpp)
target_link_libraries (Seaborgfftspeed ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (SeaborgTestFFT ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (SeaborgTestFFT-PPP ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (SeaborgTestFFT-SPP ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (SeaborgTestFFT-SSP ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (SeaborgTestRC ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
\ No newline at end of file
......@@ -105,10 +105,10 @@ int main(int argc, char *argv[])
unsigned int nLoop;
InterPolT interPol;
bool res = Configure(argc, argv, &interPol, &nx, &ny, &nz,
/* bool res = */
Configure(argc, argv, &interPol, &nx, &ny, &nz,
&test2do, &serialDim, &processes, &nLoop);
// The preceding cpp definition causes compile-time setting of D:
const unsigned D=3U;
testmsg << "Dimensionality: D= " << D << " P= " << processes;
......@@ -117,12 +117,12 @@ int main(int argc, char *argv[])
unsigned ngrid[D]; // grid sizes
// Used in evaluating correctness of results:
double realDiff;
double realDiff = -1.0;
// Various counters, constants, etc:
int d;
unsigned int d;
int tag = Ippl::Comm->next_tag(IPPL_APP_TAG0);
/* int tag = */ Ippl::Comm->next_tag(IPPL_APP_TAG0);
double pi = acos(-1.0);
double twopi = 2.0*pi;
// Timer:
......
......@@ -105,10 +105,10 @@ int main(int argc, char *argv[])
unsigned int nLoop;
InterPolT interPol;
bool res = Configure(argc, argv, &interPol, &nx, &ny, &nz,
/*bool res = */
Configure(argc, argv, &interPol, &nx, &ny, &nz,
&test2do, &serialDim, &processes, &nLoop);
// The preceding cpp definition causes compile-time setting of D:
const unsigned D=3U;
testmsg << "Dimensionality: D= " << D << " P= " << processes;
......@@ -120,9 +120,9 @@ int main(int argc, char *argv[])
double realDiff;
// Various counters, constants, etc:
int d;
unsigned int d;
int tag = Ippl::Comm->next_tag(IPPL_APP_TAG0);
/*int tag = */ Ippl::Comm->next_tag(IPPL_APP_TAG0);
double pi = acos(-1.0);
double twopi = 2.0*pi;
// Timer:
......
......@@ -105,10 +105,10 @@ int main(int argc, char *argv[])
unsigned int nLoop;
InterPolT interPol;
bool res = Configure(argc, argv, &interPol, &nx, &ny, &nz,
/* bool res = */
Configure(argc, argv, &interPol, &nx, &ny, &nz,
&test2do, &serialDim, &processes, &nLoop);
// The preceding cpp definition causes compile-time setting of D:
const unsigned D=3U;
testmsg << "Dimensionality: D= " << D << " P= " << processes;
......@@ -117,12 +117,13 @@ int main(int argc, char *argv[])
unsigned ngrid[D]; // grid sizes
// Used in evaluating correctness of results:
double realDiff;
double realDiff = -1.0;
// Various counters, constants, etc:
int d;
unsigned int d;
int tag = Ippl::Comm->next_tag(IPPL_APP_TAG0);
/* int tag = */
Ippl::Comm->next_tag(IPPL_APP_TAG0);
double pi = acos(-1.0);
double twopi = 2.0*pi;
// Timer:
......
......@@ -105,10 +105,10 @@ int main(int argc, char *argv[])
unsigned int nLoop;
InterPolT interPol;
bool res = Configure(argc, argv, &interPol, &nx, &ny, &nz,
/*bool res = */
Configure(argc, argv, &interPol, &nx, &ny, &nz,
&test2do, &serialDim, &processes, &nLoop);
// The preceding cpp definition causes compile-time setting of D:
const unsigned D=3U;
testmsg << "Dimensionality: D= " << D << " P= " << processes;
......@@ -117,12 +117,13 @@ int main(int argc, char *argv[])
unsigned ngrid[D]; // grid sizes
// Used in evaluating correctness of results:
double realDiff;
double realDiff = -1.0;
// Various counters, constants, etc:
int d;
unsigned int d;
int tag = Ippl::Comm->next_tag(IPPL_APP_TAG0);
/*int tag = */
Ippl::Comm->next_tag(IPPL_APP_TAG0);
double pi = acos(-1.0);
double twopi = 2.0*pi;
// Timer:
......
......@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
bool correct = true;
// Various counters, constants, etc:
int d;
unsigned int d;
int Parent = 0;
int tag = Ippl::Comm->next_tag(IPPL_APP_TAG0);
double pi = acos(-1.0);
......@@ -61,9 +61,11 @@ int main(int argc, char *argv[])
// Layout information:
unsigned vnodes = 1; // number of vnodes; input at cmd line
e_dim_tag allParallel[D]; // Specifies SERIAL, PARALLEL dims
for (d=0; d<D; d++)
e_dim_tag allParallel[D], serialParallel[D]; // Specifies SERIAL, PARALLEL dims
for (d=0; d<D; d++) {
allParallel[d] = PARALLEL;
serialParallel[d] = SERIAL;
}
// Compression of temporaries:
bool compressTemps;
......@@ -111,27 +113,41 @@ int main(int argc, char *argv[])
for (d=0; d<D; d++)
ndiStandard[d] = Index(ngrid[d]);
// create new domain with axes permuted to match FFT output
NDIndex<D> ndiPermuted;
ndiPermuted[0] = ndiStandard[D-1];
for (d=1; d<D; d++)
ndiPermuted[d] = ndiStandard[d-1];
// create half-size domain for RC transform along zeroth axis
NDIndex<D> ndiStandard0h = ndiStandard;
ndiStandard0h[0] = Index(ngrid[0]/2+1);
// create new domain with axes permuted to match FFT output
NDIndex<D> ndiPermuted0h;
ndiPermuted0h[0] = ndiStandard0h[D-1];
for (d=1; d<D; d++)
ndiPermuted0h[d] = ndiStandard0h[d-1];
// create half-size domain for sine transform along zeroth axis
// and RC transform along first axis
NDIndex<D> ndiStandard1h = ndiStandard;
ndiStandard1h[1] = Index(ngrid[1]/2+1);
// create new domain with axes permuted to match FFT output
NDIndex<D> ndiPermuted1h;
ndiPermuted1h[0] = ndiStandard1h[D-1];
for (d=1; d<D; d++)
ndiPermuted1h[d] = ndiStandard1h[d-1];
// all parallel layout, standard domain, normal axis order
FieldLayout<D> layoutPPStan(ndiStandard,allParallel,vnodes);
// all parallel layout, zeroth axis half-size domain, normal axis order
FieldLayout<D> layoutPPStan0h(ndiStandard0h,allParallel,vnodes);
// all parallel layout, standard domain, normal axis order
FieldLayout<D> layoutPPStan(ndiStandard,allParallel,vnodes);
#ifndef ONED
// zeroth axis serial, standard domain, normal axis order
FieldLayout<D> layoutSPStan(ndiStandard,serialParallel,vnodes);
// zeroth axis serial, standard domain, permuted axis order
FieldLayout<D> layoutSPPerm(ndiPermuted,serialParallel,vnodes);
#endif
// all parallel layout, zeroth axis half-size domain, normal axis order
FieldLayout<D> layoutPPStan0h(ndiStandard0h,allParallel,vnodes);
#ifndef ONED
// zeroth axis serial, zeroth axis half-size domain, normal axis order
FieldLayout<D> layoutSPStan0h(ndiStandard0h,serialParallel,vnodes);
// zeroth axis serial, zeroth axis half-size domain, permuted axis order
......
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