test.pl 675 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl
# Driver for cmake testing of FLEUR
# See README.tests for details

use strict;
my $dir;
BEGIN{
$dir=$0;
$dir=~s/test.pl//;
}
use lib "$dir/scripts";

use judft_tests;

my $testdir=shift;
my $executable=shift;
17 18

#check MPI environment
19
my $mpi=shift;
20 21 22 23 24 25 26 27 28 29 30 31 32
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='';
33 34
}
print "MPI:$mpi\n";
35

36 37
my $workdir="$ENV{PWD}/Testing/work";
system("rm $workdir/*");
38 39 40
chdir($dir);

judft_tests::execute_test($testdir,$executable,$mpi,$workdir);