Changeset 27179


Ignore:
Timestamp:
04/14/13 22:52:17 (8 years ago)
Author:
davidb
Message:

Mods to allow code to run with Greenstone3

Location:
gs2-extensions/parallel-building/trunk/src
Files:
3 edited

Legend:

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

    r26985 r27179  
    8383
    8484   # invoke the farmer to start processing the files
    85    $site = "" if (!defined $site);
    86    my $gsdlhome = $ENV{'GSDLHOME'};
    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;
     85   my $gsdlhome;
     86
     87   if (defined $site) {
     88       $gsdlhome = $ENV{'GSDL3HOME'};
     89   }
     90   else {
     91       $site = "";
     92       $gsdlhome = $ENV{'GSDLHOME'};
     93   }
     94
     95#   my $farmer_exe = $gsdlhome . '/ext/parallel-building/linux/bin/mpiimport';
     96   my $farmer_exe = 'mpiimport';
     97
     98#   my $mpi_cmd = $gsdlhome . '/ext/parallel-building/linux/bin/mpirun ' . $mpi_flags . ' -n ' . $jobs . ' ' . $farmer_exe . ' ' . $tmp_filelist . ' ' . $epoch . ' ' . $gsdlhome . ' ' . $collection . ' ' . $site;
     99   my $mpi_cmd = 'mpirun ' . $mpi_flags . ' -n ' . $jobs . ' ' . $farmer_exe . ' ' . $tmp_filelist . ' ' . $epoch . ' ' . $gsdlhome . ' ' . $collection . ' ' . $site;
    89100   print STDERR "MPI Command: \"" . $mpi_cmd . "\"\n";
    90101#   system ($mpi_cmd);
  • gs2-extensions/parallel-building/trunk/src/perllib/dbutil/gdbmserver.pm

    r27177 r27179  
    6060      &util::mk_dir($tmp_dir,1);
    6161  }
    62 
    6362
    6463  # 1. Check whether the server is already running by trying to locate the
     
    206205  if (defined $create_server && $create_server == 1)
    207206  {
     207      my $tmp_collect_dir = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},'tmp');
     208      if (! &util::dir_exists($tmp_collect_dir)) {
     209      &util::mk_dir($tmp_collect_dir,1);
     210      }
     211
    208212    my $gdbm_client_handle = &_spawnClient($infodb_file_path);
    209213    # Register this client on the server if necessary
  • gs2-extensions/parallel-building/trunk/src/src/mpiimport-src/mpiimport.cpp

    r26922 r27179  
    141141        fprintf(stderr, "[M] Creating manifest file: %d\n", manifest_file_count);
    142142    stringstream manifestfilename_strstr;
    143     manifestfilename_strstr << gsdlhomedir << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml";
     143    if (site == NULL) {
     144      manifestfilename_strstr << gsdlhomedir << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml";
     145    }
     146    else {
     147      manifestfilename_strstr << gsdlhomedir << "/sites/" << site << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml";
     148    }
     149
    144150    string manifestfilename_str = manifestfilename_strstr.str();
    145151    char *manifestfilename = new char [manifestfilename_str.size() + 1];
Note: See TracChangeset for help on using the changeset viewer.