Changeset 2057 for trunk/tsuite

Show
Ignore:
Timestamp:
05/14/08 03:18:38 (8 months ago)
Author:
gary
Message:

mostly a merge (with diff, not svn merge) of r2049

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tsuite/slow/runall.pl

    r1893 r2057  
    1 #!perl -w 
    2 # the above is generic form of #! for perl, with warnings 
    3   
    4 # of the cloudy executable on your system 
     1#perl -w 
     2# 
     3# This runs all the *.in input files in a directory. 
     4# and should be executed from the directory containing the input files. 
    55 
    6 # various VS execs 
    7 #$exe = "c:/Projects/Cloudy/trunk/debug/trunk.exe"; 
    8 #$exe = "c:/projects/Cloudy/trunk/release/trunk.exe"; 
     6# The string "$exe" must be modified to point to your executable version 
     7# of Cloudy. 
    98 
    10 # icc  
    11 #$exe = "c:/projects/cloudy/trunk/icl/release/cloudy_icl.exe"; 
    12 $exe = "c:/projects/cloudy/trunk/source/sys_icl/cloudy.exe"; 
     9# This can be done using an argument to runall.pl.  To test the build in source 
     10# 
     11# runall.pl 
     12# 
     13# To test the build in the sys_XXX subdirectory of source 
     14# 
     15# runall.pl sys_XXX 
    1316 
     17# after all the models are run the "checkall.pl" script can be run 
     18# to check that everything went ok 
     19 
     20# This gives the path to the executable version of the code 
     21# This will work if the directory structure was not changed from the 
     22# original download and if the executable was built in source 
     23# using g++ and the makefiles provided 
     24$exe = '../../source/'.$ARGV[0].'/cloudy.exe'; 
     25 
     26# these are the various compiler builds that occur in sys_XXX 
     27# directories below source.   
     28# uncomment the one that you built if you did not use the default 
     29# 
     30# sys_gcc 
     31# $exe = "../../source/sys_gcc/cloudy.exe"; 
     32# $exe = "../../source/sys_gprof/cloudy.exe"; 
     33# $exe = "../../source/sys_IBMxSeries/cloudy.exe"; 
     34# $exe = "../../source/sys_icc/cloudy.exe"; 
     35# $exe = "../../source/sys_pgcc/cloudy.exe"; 
     36# $exe = "../../source/sys_pgccBounds/cloudy.exe"; 
     37 
     38# if this file does not exist we have problems 
     39if( ! -e "$exe" ) 
     40{ 
     41        die "The executable file $exe does not exist\n"; 
     42} 
     43 
     44# count total number of sims we compute 
    1445$nMod = 0; 
     46 
     47# sets number to skip - will start tests after skipping the first 
     48# nSkip in alphabetical order.  set to 0 to so all sims 
    1549$nSkip = 0; 
    1650 
    17 # this loops over all the *.in files in the current directory 
    18 # and runs the code to produce *.out files 
     51# total number to do, usually much larger than the total 
     52# to do them all 
     53$nLimit = 700; 
     54 
     55# loop over the *.in files 
     56# and runs the test, producinig the *.out files 
    1957while ( defined( $input = glob("*.in") ) ) 
    2058{ 
    21         if ( $nMod>=$nSkip ) 
     59        if ( $nMod>=$nSkip  && $nMod < $nLimit ) 
    2260        { 
    23                 # $output =~ s/.out//gi; 
    24                 # $output =~ s/.out//gi; 
    2561                print( "$input going to " ); 
    2662                $output = $input; 
     
    3066                        rename( "$output".".out" , "$output".".bak" ); 
    3167                } 
    32                 $out = "$output".".out"; 
     68                $out = "$output".".out"; 
    3369                print("$output\n"); 
    34                 # actually execute the code 
    35 #               system "nice -n 5 $exe < $input  > $out"; 
    36                 system "$exe < $input  > $out"; 
     70                # actually execute the code including nice 
     71                system "nice -n 5 \"$exe\" < $input  > $out"; 
    3772        } 
    3873        ++$nMod; 
     
    4075 
    4176print("\n=========================\n"); 
    42 printf( "\n %i models were computed, and %i were skipped.\n ",$nMod,$nSkip); 
     77printf( "\n %i simulations were computed, and %i were skipped.\n ",$nMod,$nSkip); 
    4378print("Now use the checkall.pl script to check results.\n"); 
    4479print("=========================\n");