Commit 601709c8 authored by Kilian Lackhove's avatar Kilian Lackhove

CWIPI: added --cwipi cmd line option to disabe/enable cwipi at runtime

Start with e.g.:

mpirun -n 4 -wd nektar1 --output-filename log ~/code/_build/nektar/solvers/APESolver/APESolver-g --cwipi cube.xml : -n 4 -wd precise1 --output-filename log ~/code/_build/precise-uns/precise-uns -case cube
parent ee24062e
......@@ -191,8 +191,9 @@ INCLUDE (ThirdPartyTriangle)
INCLUDE (ThirdPartyTetGen)
INCLUDE (ThirdPartyCCM)
OPTION(NEKTAR_USE_CWIPI
"Use CWIPI." OFF)
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_CWIPI
"Use CWIPI for Coupling." OFF
"NEKTAR_USE_MPI" OFF)
IF ( NEKTAR_USE_CWIPI )
set(CWIPI_DIR "/usr/local/cwipi" CACHE PATH "CWIPI base path")
......
......@@ -382,6 +382,9 @@ namespace Nektar
("part-only-overlapping", po::value<int>(),
"only partition mesh into N overlapping partitions.")
("part-info", "Output partition information")
#ifdef NEKTAR_USE_CWIPI
("cwipi", "use CWIPI")
#endif
;
CmdLineArgMap::const_iterator cmdIt;
......@@ -1581,12 +1584,16 @@ namespace Nektar
else
{
string vCommModule("Serial");
if (GetCommFactory().ModuleExists("CWIPI"))
if (GetCommFactory().ModuleExists("ParallelMPI"))
{
vCommModule = "ParallelMPI";
}
if (m_cmdLineOptions.count("cwipi") && GetCommFactory().ModuleExists("CWIPI"))
{
vCommModule = "CWIPI";
}
m_comm = GetCommFactory().CreateInstance(vCommModule,argc,argv);
m_comm = GetCommFactory().CreateInstance(vCommModule, argc, argv);
}
}
......
......@@ -7,7 +7,6 @@ SET(SOLVER_UTILS_SOURCES
Advection/AdvectionFR.cpp
Advection/AdvectionNonConservative.cpp
Advection/AdvectionWeakDG.cpp
CwipiExchange.cpp
Diffusion/Diffusion.cpp
Diffusion/Diffusion3DHomogeneous1D.cpp
Diffusion/DiffusionLDG.cpp
......@@ -54,7 +53,6 @@ SET(SOLVER_UTILS_HEADERS
Advection/Advection3DHomogeneous1D.h
Advection/AdvectionNonConservative.h
Advection/AdvectionWeakDG.h
CwipiExchange.h
Diffusion/Diffusion.h
Diffusion/Diffusion3DHomogeneous1D.h
Diffusion/DiffusionLDG.h
......@@ -102,6 +100,13 @@ IF (NEKTAR_USE_ARPACK)
DriverArpack.h)
ENDIF (NEKTAR_USE_ARPACK)
IF (NEKTAR_USE_CWIPI)
SET(SOLVER_UTILS_SOURCES ${SOLVER_UTILS_SOURCES}
CwipiExchange.cpp)
SET(SOLVER_UTILS_HEADERS ${SOLVER_UTILS_HEADERS}
CwipiExchange.h)
ENDIF (NEKTAR_USE_CWIPI)
ADD_DEFINITIONS(-DSOLVER_UTILS_EXPORTS)
ADD_NEKTAR_LIBRARY(SolverUtils lib ${NEKTAR_LIBRARY_TYPE} ${SOLVER_UTILS_SOURCES} ${SOLVER_UTILS_HEADERS})
......
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