Show
Ignore:
Timestamp:
05/14/08 07:35:20 (8 months ago)
Author:
peter
Message:

tsuite/slow/run_parallel.pl:
tsuite/auto/run_parallel.pl:

Make changes similar to r2049 to support default paths to executable (including sys_xxx directories).

Files:
1 modified

Legend:

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

    r2033 r2063  
    1010# run_parallel.pl cloudy.exe 16 
    1111# 
    12 # where the first parameter is the name of the Cloudy executable. It 
    13 # should either be in your search path, or the full pathname should 
    14 # be used. The second number is the number of processors to use. It 
    15 # can be any number >= 0. However, using numbers larger than roughly 
    16 # 16 will not give any speed advantage since the time will then be 
    17 # set by the longest running test sims. The second number is optional 
    18 # and will default to the number of processosrs on your computer 
    19 # (this number is only correctly determined under Linux and Windows, 
    20 # it will be set to 1 on other systems). 
     12# where the first parameter is the name of the Cloudy executable. 
     13# If the parameter is completely omitted (or a "." is entered), it 
     14# will default to "../../source/cloudy.exe". You can also supply the 
     15# name of one of the sys_xxx directories, in which case the path will 
     16# default to "../../source/sys_xxx/cloudy.exe". In all other cases 
     17# cloudy.exe should  either be in your search path, or the full pathname 
     18# should be used. The second number is the number of processors to use. 
     19# It can be any number >= 0. The second number is optional and will 
     20# default to the number of processosrs on your computer (this number is 
     21# only correctly determined under Linux and Windows, it will be set to 
     22# 1 on other systems). 
    2123# 
    2224# If the number of processors is set to 0, the script will exit after 
     
    3436# Peter van Hoof 
    3537 
    36 if( "$ARGV[0]" eq "" ) { 
    37     print "The path to the cloudy binary must be supplied as the first parameter to this script...\n"; 
    38     exit; 
     38if( -d "../../source/$ARGV[0]" ) { 
     39    $exe = "../../source/$ARGV[0]/cloudy.exe"; 
     40} 
     41else { 
     42    $exe = "$ARGV[0]"; 
    3943} 
    4044 
     
    7074} 
    7175 
     76if( $nproc > 0 && ! -e $exe ) { 
     77    print "No executable is found at ==$exe==\n"; 
     78    print "A correct path to the cloudy binary must be supplied as the first parameter to this script.\n"; 
     79    exit; 
     80} 
     81 
    7282# clean up first 
    7383if( -e "./clean_tsuite.pl" ) { 
     
    94104    } 
    95105    $rules = "$rules$output: $input\n"; 
    96     $rules = "$rules\t$ARGV[0] < $input > $output 2> $output2\n" 
     106    $rules = "$rules\t$exe < $input > $output 2> $output2\n" 
    97107} 
    98108open( foo, ">Makefile" );