Skip to content
Snippets Groups Projects
Commit 4b9323d5 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Add CMake option to specify hostfile explicitly or not.

parent e941ea89
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,8 @@ OPTION(NEKTAR_BUILD_PACKAGES "Build Nektar++ binary packages" OFF)
MARK_AS_ADVANCED(NEKTAR_BUILD_PACKAGES)
OPTION(NEKTAR_TEST_ALL "Include full set of regression tests to this build." OFF)
OPTION(NEKTAR_TEST_USE_HOSTFILE "Use a hostfile to explicitly specify number of
slots." OFF)
# Meshing utilities and library
IF (NOT WIN32)
......
......@@ -215,10 +215,14 @@ int main(int argc, char *argv[])
if (file.GetNProcesses() > 1)
#endif
{
system("echo 'localhost slots=12' > hostfile");
command += "@MPIEXEC@ @MPIEXEC_NUMPROC_FLAG@ "
+ boost::lexical_cast<string>(file.GetNProcesses())
+ " -hostfile hostfile ";
+ " ";
if ("@NEKTAR_TEST_USE_HOSTFILE@" == "ON")
{
command += " -hostfile hostfile ";
system("echo 'localhost slots=12' > hostfile");
}
}
fs::path execPath = startDir / file.GetExecutable();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment