Ignore:
Timestamp:
May 4, 2019, 3:36:37 PM (5 years ago)
Author:
djay
Message:

Fix typo. Define StdErr? from FinalizeHPC1 service. make sure to call removeShmLock in case it has been created by the GetStatus? service.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-services/utils/hpc/service.c

    r878 r907  
    269269    }
    270270    free(logPath);
    271     // Run scontrol to check if the service execution ended.
     271    // Run sacct to check if the service execution ended.
    272272    // Store all the informations returned by scontrol command as a cfg file to
    273273    // be parsed back by the ZOO-Kernel waiting for the execution of the remote
     
    277277    map* tmpMap=getMapFromMaps(conf,configId->value,"remote_command_opt");
    278278    char* command=(char*)malloc((126+strlen(tmpMap->value))*sizeof(char));
    279     sprintf(command,"sacct --format=%s -p | grep \"%s\" | sed \"s:||:|None|:g;s:||:|:g\"",tmpMap->value,jobid->value);   
     279    sprintf(command,"sacct --format=%s -p | grep \"%s\" | sed \"s:||:|None|:g;s:||:|None|:g\"",tmpMap->value,jobid->value);   
    280280    if(ssh_exec(conf,command,ssh_get_cnt(conf))==0){
    281281      free(command);
    282       setMapInMaps(conf,"lenv","message",_("Failed to run scontrol remotely"));
     282      setMapInMaps(conf,"lenv","message",_("Failed to run sacct remotely"));
    283283      // TODO: check status in db and if available continue in other case return SERVICE_FAILED
    284284      return SERVICE_FAILED;
     
    315315        }
    316316      }else{
     317        free(logPath);
    317318        setMapInMaps(conf,"lenv","message",_("Unable to access the downloaded execution log file"));
    318319        return SERVICE_FAILED;
    319320      }
     321    }
     322    tmpMap=getMapFromMaps(tmpMaps,"henv","JobId");
     323    if(tmpMap!=NULL){
     324      char* tmpStr=(char*)malloc((32)*sizeof(char));
     325      sprintf(tmpStr,"slurm-%s.out",tmpMap->value);
     326      addToMap(tmpMaps->content,"StdErr",tmpStr);
     327      free(tmpStr);
    320328    }
    321329    logPath=(char*)malloc((strlen(tmpPath->value)+strlen(jobid->value)+15)*sizeof(char));
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