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() ...@@ -13,6 +13,6 @@ endif()
#tests of fleur #tests of fleur
foreach(test ${Testdirs}) foreach(test ${Testdirs})
add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/ ${test} "${CMAKE_BINARY_DIR}/fleur_MPI") add_test("FLEUR_MPI:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/ ${test} "${CMAKE_BINARY_DIR}/fleur_MPI" "${MPIEXEC} ${MPI_NUMPROC_FLAGS 2")
endforeach(test) endforeach(test)
endif() endif()
...@@ -14,11 +14,25 @@ use judft_tests; ...@@ -14,11 +14,25 @@ use judft_tests;
my $testdir=shift; my $testdir=shift;
my $executable=shift; my $executable=shift;
#check MPI environment
my $mpi=shift; my $mpi=shift;
if (!$mpi){ if ($mpi){
$mpi=$ENV{"juDFT_MPI"}; if ($ENV{"juDFT_MPI"}) {
if ($executable=~/_MPI/){
if (!$mpi){
#Try default mpi setting if none was given
$mpi="mpirun -np 2 "
#no mpi executable...
} }
print "MPI:$mpi\n"; print "MPI:$mpi\n";
my $workdir="$ENV{PWD}/Testing/work"; my $workdir="$ENV{PWD}/Testing/work";
system("rm $workdir/*"); system("rm $workdir/*");
chdir($dir); chdir($dir);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment