struct submit * lsfdrmaa_job_create_req( fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp ) { struct submit *volatile req = NULL; fsd_expand_drmaa_ph_t *volatile expand = NULL; TRY { fsd_malloc( req, struct submit ); memset( req, 0, sizeof(struct submit) ); expand = fsd_expand_drmaa_ph_new( NULL, NULL, fsd_strdup("%I") ); lsfdrmaa_job_set_req( session, expand, jt, req, envp ); } EXCEPT_DEFAULT { lsfdrmaa_free_submit_req( req, true ); fsd_exc_reraise(); } FINALLY { if( expand ) expand->destroy( expand ); } END_TRY return req; }
void slurmdrmaa_job_create_req( fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp, job_desc_msg_t * job_desc, int n_job /* ~job_step */ ) { fsd_expand_drmaa_ph_t *volatile expand = NULL; TRY { expand = fsd_expand_drmaa_ph_new( NULL, NULL, fsd_asprintf("%d",n_job) ); slurmdrmaa_job_create( session, jt, envp, expand, job_desc, n_job); } EXCEPT_DEFAULT { fsd_exc_reraise(); } FINALLY { if( expand ) expand->destroy( expand ); } END_TRY }