Changeset 25943

Show
Ignore:
Timestamp:
13.07.2012 10:35:32 (7 years ago)
Author:
jmt12
Message:

Updated script to support cluster processing

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/bin/script/parallel_dspace_filtermedia.pl

    r25809 r25943  
    121121    while ($line = <FIN>) 
    122122    { 
    123       if ($line =~ /"http:\/\/hdl.handle.net\/([^"]+)",.*"Video"/) 
     123      if ($line =~ /\"http:\/\/hdl.handle.net\/([^\"]+)\",.*\"Video\"/) 
    124124      { 
    125125        my $identifier = $1; 
     
    147147      # 4. Invoke mpidspacemediafilter (via mpirun) with the the filelist 
    148148      #    created above. MPIRun takes the number of worker threads to spawn 
    149       my $mpi_cmd = 'mpirun -np ' . ($worker_count + 1) . ' "' . $dspace_home . '/bin/mpidspacemediafilter" "' . $dspace_home . '" "' . $file_list_path . '"'; 
     149 
     150      # Determine if we've been provided a mpi.conf file to indicate the other 
     151      # machines (slave nodes) this parallizable process should run on 
     152      my $mpi_conf_path = &util::filename_cat($dspace_home, 'mpi.conf'); 
     153      my $mpi_flags = '--show-progress --timestamp-output --verbose --report-bindings --tag-output'; 
     154      if (-f $mpi_conf_path) 
     155      { 
     156        print STDERR " ***** CLUSTER MODE *****\n"; 
     157        $mpi_flags .= ' -nolocal -machinefile "' . $mpi_conf_path . '"'; 
     158      } 
     159      else 
     160      { 
     161        print STDERR " ***** SINGLE COMPUTER MODE *****\n"; 
     162      } 
     163 
     164      my $mpi_cmd = 'mpirun ' . $mpi_flags . ' -np ' . ($worker_count + 1) . ' "' . $dspace_home . '/bin/mpidspacemediafilter" "' . $dspace_home . '" "' . $file_list_path . '"'; 
    150165      if ($debug) 
    151166      {