Ignore:
Timestamp:
Aug 16, 2018, 8:00:56 AM (6 years ago)
Author:
djay
Message:

Fixes for supporting properly the memory=protect which force the ZOO-Kernel to not store any downloaded files in memory. Add footer to the HPC support. Fix the autotools to build service_json and sshapi only when required so, when HPC support is activated, this also avoid adding too much dependencies at compilation time. Store md5 of the downloaded files to avoid uploading on HPC server the same file more than once, in case the md5 correspond.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/service_internal_hpc.c

    r862 r877  
    5050    return;
    5151  }   
    52   if(*s==NULL || (*s)->outputs==NULL){
     52  if(*s==NULL || (*s)->outputs==NULL || (*s)->content==NULL){
    5353    return;
    5454  }
     
    621621  fprintf(scriptFile,"\n");
    622622  fprintf(scriptFile,"echo \"Job finished at: $(date)\"\n");
     623  map* footerMap=getMapFromMaps(*main_conf,configurationId,"jobscript_footer");
     624  if(footerMap!=NULL){
     625    // Use the footer file if defined in the HPC section of the main.cfg file
     626    struct stat f_status;
     627    int s=stat(footerMap->value, &f_status);
     628    if(s==0){
     629      char* fcontent=(char*)malloc(sizeof(char)*(f_status.st_size+1));
     630      FILE* f=fopen(footerMap->value,"rb");
     631      fread(fcontent,f_status.st_size,1,f);
     632      int fsize=f_status.st_size;
     633      fcontent[fsize]=0;
     634      fclose(f);
     635      char* ffcontent=(char*)malloc((strlen(fcontent)+(3*strlen(uuid->value))+1)*sizeof(char));
     636      sprintf(ffcontent,fcontent,uuid->value,uuid->value,uuid->value);
     637      fprintf(scriptFile,"%s\n### --- ZOO-Service FOOTER end --- ###\n\n",ffcontent);
     638      free(fcontent);
     639    }else
     640      fprintf(scriptFile,"### *** Default ZOO-Service FOOTER (footer file failed to load) *** ###\n\n");
     641  }else
     642      fprintf(scriptFile,"### *** Default ZOO-Service FOOTER (no footer found) *** ###\n\n");
    623643  fflush(scriptFile);
    624644  fclose(scriptFile);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png