source: /cluster/svnroot/bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pl @ 2493

Last change on this file since 2493 was 2493, checked in by leemasa, 11 years ago

Commented out R and Gromacs tests. R is not compatible with OpenMPI or MPICH, and the GROMACS test recommended by the BCCD wiki relies on a file that no longer exists.

File size: 1.9 KB
Line 
1#Automagic BCCD test suite!
2#Runs test scripts and compares with control output in BCCD.
3#Emails differences to bccd-developers@bccd.net
4
5use strict;
6use File::Path;
7
8my $testdir = "test";
9
10sub generate_storeOutput{
11        (my $testname) = @_;
12        return ">> $testdir/$testname.dat 2>> $testdir/$testname.dat";
13}
14
15sub get_syncdir( ){
16        (my $tmpoutput) = @_;
17        open(FILE, "<$tmpoutput") or die "could not open temporary file: $!";
18        my $tmp = "";
19        while ($tmp !~ m/\//){
20                $tmp = readline FILE;
21        }
22        my $startindex = index($tmp,"/",);
23        my $endindex = index($tmp," ",$startindex);
24        my $syncdir = substr($tmp,$startindex,$endindex-1);
25        close FILE;
26        unlink("tmpdir") or die "Could not delete temporary directory: $!";
27        return $syncdir;
28        }
29
30my $testname;
31my $storeOutput;
32
33if (-e $testdir){
34  rmtree($testdir) or die "Could not replace existing test directory: $!";
35  }
36mkdir($testdir) or die "Could not make test directory: $!";
37
38### GalaxSee test ###
39$testname = "Gal";
40$storeOutput = generate_storeOutput($testname);
41system("cd ~/Gal                        $storeOutput
42        make clean                      $storeOutput
43        make                            $storeOutput
44        mpirun -np 1 ~/Gal/GalaxSee     $storeOutput
45        mpirun -np 2 ~/Gal/GalaxSee     $storeOutput");
46#system("bccd-syncdir . ~/machines      &> tmpoutput");
47
48#system("cat tmpoutput $storeOutput");
49
50#get path to temporary directory
51#get_syncdir("tmpoutput");
52#unlink "tmpoutput";
53
54#system("mpirun -machinefile ~/machines\
55#       -np 2 $tempDirectory/GalaxSee   $storeOutput");
56
57### Life test ###
58$testname = "Life";
59$storeOutput = generate_storeOutput($testname);
60system("cd ~/Life               $storeOutput
61make clean                      $storeOutput
62make                            $storeOutput
63mpirun -np 1 ~/Life/Life        $storeOutput
64mpirun -np 2 ~/Life/Life        $storeOutput");
65#bccd-syncdir . ~/machines      &> tmpoutput");
66#system("cat tmpoutput $storeOutput");
67
68#get path to temporary directory
69#get_syncdir("tmpoutput");
70#unlink "tmpoutput";
71
72#print "$tempDirectory\n";
73#system("mpirun -machinefile ~/machines\
74#       -np 2 $tempDirectory/Life       $storeOutput");
Note: See TracBrowser for help on using the repository browser.