Changeset 26072

Show
Ignore:
Timestamp:
06.08.2012 11:42:55 (7 years ago)
Author:
jmt12
Message:

Extended to notice and load mpi.conf file on clusters and to use full paths to executables since they don't always seem to be on environment PATH correctly

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/ParallelInexport.pm

    r26071 r26072  
    6666   } 
    6767 
     68   # Determine if we've been provided a mpi.conf file to indicate the other 
     69   # machines (slave nodes) this parallizable process should run on 
     70   my $mpi_conf_path = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, 'mpi.conf'); 
     71   my $mpi_flags = ''; 
     72   if (-f $mpi_conf_path) 
     73   { 
     74     print STDERR " ***** CLUSTER MODE *****\n"; 
     75     $mpi_flags .= '-machinefile "' . $mpi_conf_path . '" '; 
     76     #$mpi_flags .= '-nolocal '; 
     77   } 
     78   else 
     79   { 
     80     print STDERR " ***** SINGLE COMPUTER MODE *****\n"; 
     81   } 
     82   $mpi_flags .= ' --show-progress --timestamp-output --verbose --report-bindings --tag-output'; 
     83 
    6884   # invoke the farmer to start processing the files 
    6985   $site = "" if (!defined $site); 
    7086   my $gsdlhome = $ENV{'GSDLHOME'}; 
    71    my $farmer_exe = 'mpiimport'; # will be on PATH 
    72    #my $mpi_cmd = "mpirun -n $jobs $farmer_exe $tmp_filelist $epoch $gsdlhome $collection $site"; 
    73    my $mpi_cmd = "mpirun --show-progress --timestamp-output --verbose --report-bindings --tag-output -n $jobs $farmer_exe $tmp_filelist $epoch $gsdlhome $collection $site"; 
     87   my $farmer_exe = $gsdlhome . '/ext/parallel-building/linux/bin/mpiimport'; 
     88   my $mpi_cmd = $gsdlhome . '/ext/parallel-building/linux/bin/mpirun ' . $mpi_flags . ' -n ' . $jobs . ' ' . $farmer_exe . ' ' . $tmp_filelist . ' ' . $epoch . ' ' . $gsdlhome . ' ' . $collection . ' ' . $site; 
    7489   print STDERR "MPI Command: \"" . $mpi_cmd . "\"\n"; 
    7590#   system ($mpi_cmd);