Commit d873f49c authored by Daniel Wortmann's avatar Daniel Wortmann

Updated ctests to deal better with parallel tests

parent b051bb38
......@@ -13,6 +13,6 @@ endif()
if (${FLEUR_USE_MPI})
#tests of fleur
foreach(test ${Testdirs})
add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur_MPI")
add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl ${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${MPIEXEC} ${MPI_NUMPROC_FLAGS 2")
endforeach(test)
endif()
......@@ -14,11 +14,25 @@ use judft_tests;
my $testdir=shift;
my $executable=shift;
#check MPI environment
my $mpi=shift;
if (!$mpi){
$mpi=$ENV{"juDFT_MPI"};
if ($mpi){
if ($ENV{"juDFT_MPI"}) {
$mpi=$ENV{"juDFT_MPI"};
}
}
if ($executable=~/_MPI/){
if (!$mpi){
#Try default mpi setting if none was given
$mpi="mpirun -np 2 "
}
}else{
#no mpi executable...
$mpi='';
}
print "MPI:$mpi\n";
my $workdir="$ENV{PWD}/Testing/work";
system("rm $workdir/*");
chdir($dir);
......
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