Commit dc61acb3 authored by Matthias Redies's avatar Matthias Redies

fix hybrid test

parent bb23ec7d
......@@ -75,6 +75,26 @@ sub testrun($$){
print LOG "Finished execution\n";
}
sub testrun_seq($$){
my $ex=shift;
my $dir=shift;
print LOG POSIX::strftime("%m/%d/%Y %H:%M:%S--", localtime);
print LOG "Running $ex:";
my $omps=$ENV{'OMP_NUM_THREADS'};
$ENV{'OMP_NUM_THREADS'}=1;
if (system("cd $dir;$ex")==0){
print LOG "Done\n";}
else {
print LOG "Failed\n";
}
$ENV{'OMP_NUM_THREADS'}=$omps;
print LOG POSIX::strftime("%m/%d/%Y %H:%M:%S--", localtime);
print LOG "Finished execution\n";
}
sub test_fileexists($){
my $file=shift;
print LOG POSIX::strftime("%m/%d/%Y %H:%M:%S--", localtime);
......
......@@ -19,17 +19,17 @@ jt::copyfile("files/cdn13",$workdir);
jt::copyfile("files/cdn14",$workdir);
jt::copyfile("files/cdnc",$workdir);
jt::testrun("$executable ",$workdir);
jt::testrun_seq("$executable ",$workdir);
#now test output
$result=jt::test_grepexists("$workdir/out","it= 1 is completed");
$result+=jt::test_grepnumber("$workdir/out", " total energy=", ".*= *([^ ]*)", -591.4073268837, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "HF total energy=", ".*= *([^ ]*)", -591.4094320551, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", " total energy=", ".*= *([^ ]*)", -591.5774525207, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "HF total energy=", ".*= *([^ ]*)", -591.5785933851 , 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "distance of charge densitie", "23: *([^ ]*)", 0.0, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "distance of charge densitie", "24: *([^ ]*)", 0.154412, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "distance of charge densitie", "24: *([^ ]*)", 0.051722, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "bandgap", ".*: *([^ ]*)", 0.177962, 0.0001);
$result+=jt::test_grepnumber("$workdir/out", "bandgap", ".*: *([^ ]*)", 0.191663, 0.0001);
jt::stageresult($workdir,$result,"1");
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