Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeEclipse
titleExampleExample1: DRMAA2 Simple Application
linenumberstrue
 	drmaa2_jsession js; /* Job session object*/		
    drmaa2_jtemplate jt; /* Job session template*/
    drmaa2_j j;  /* Job object*/
    ...
    ...
	...
    /* Create and open job session */
    js = drmaa2_create_jsession("testsession", DRMAA2_UNSET_STRING);
    if (js == NULL) {
   		 ...
       return;
    }
    ...
    ...
	...

    /* Create job template */
    jt = drmaa2_jtemplate_create();
    jt->remoteCommand = strdup("/bin/date");
    j = drmaa2_jsession_run_job(js, jt);

    ...
	...
    drmaa2_j_wait_terminated(j, DRMAA2_INFINITE_TIME);
    drmaa2_jtemplate_free(&jt);
    drmaa2_destroy_jsession("testsession");
    ...
    ...
	...
    drmaa2_j_free(&j);
    drmaa2_jsession_free(&js);
    ...
    ...
	...

...