Changeset 2064

Show
Ignore:
Timestamp:
05/14/08 07:37:07 (6 months ago)
Author:
peter
Message:

Merging r2063 from mainline - support default paths in run_parallel.pl.

Location:
branches/c08_branch/tsuite
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/c08_branch/tsuite/auto/run_parallel.pl

    r2034 r2064  
    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 
     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. However, using numbers larger than roughly 
    1620# 16 will not give any speed advantage since the time will then be 
    1721# set by the longest running test sims. The second number is optional 
     
    3438# Peter van Hoof 
    3539 
    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; 
     40if( -d "../../source/$ARGV[0]" ) { 
     41    $exe = "../../source/$ARGV[0]/cloudy.exe"; 
     42} 
     43else { 
     44    $exe = "$ARGV[0]"; 
    3945} 
    4046 
     
    7076} 
    7177 
     78if( $nproc > 0 && ! -e $exe ) { 
     79    print "No executable is found at ==$exe==\n"; 
     80    print "A correct path to the cloudy binary must be supplied as the first parameter to this script.\n"; 
     81    exit; 
     82} 
     83 
    7284# clean up first 
    7385if( -e "./clean_tsuite.pl" ) { 
     
    94106    } 
    95107    $rules = "$rules$output: $input\n"; 
    96     $rules = "$rules\t$ARGV[0] < $input > $output 2> $output2\n" 
     108    $rules = "$rules\t$exe < $input > $output 2> $output2\n" 
    97109} 
    98110open( foo, ">Makefile" ); 
  • branches/c08_branch/tsuite/slow/run_parallel.pl

    r2034 r2064  
    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" );