Using HPCC's Vanilla Universe - A Simple Example
The vanilla universe in Condor is available for situations where you use proprietary code and cannot compile the proprietary code using condor_compile. The drawback to using the vanilla universe is that users must specify to Condor which input files need to be copied over and which output files need to be copied back.
Simple Example: helloworld.c
#include <stdio.h>
main () {
fprintf(stdout, "Hello Condor!\n");
}
Compiling helloworld.c
Compile the programs that you want to run in vanilla universe as you would any other regular application; nothing special needs to be done when compiling a job for the vanilla universe, which implies that there is no way to checkpoint or migrate a job. To access the input and output files, the job uses Condor's File Transfer mechanism.
[jmehring@almaak-01 vanilla]$ gcc -o helloworld helloworld.c
Submitting a Job from Almaak-01 to the Condor Flock's -- Vanilla Universe
To submit a job to the vanilla universe, set the universe line in your submit file to vanilla and the transfer_executable line should be set to true. For the vanilla universe, all the required files need to be explicitly transferred. It is important to note that jobs in vanilla universe are run under the username condor and not under your username.
As in the Using Globus Universe example, the first step in submitting a job is to create a job description as a plaintext. Our example helloworld.submit is:
executable = helloworld
transfer_executable = true
when_to_transfer_output = ON_EXIT
universe = vanilla
output = test.out
error = test.err
log = test.log
queue
The second step is to set up your shell environment to include Condor settings by sourcing the setup file.
for csh or tcsh:
almaak-01.usc.edu(5): source /usr/usc/condor/default/setup.csh
for any other shell:
almaak-01.usc.edu(5): source /usr/usc/condor/default/setup.sh
The third step is to submit the job:
[jmehring@almaak-01 vanilla]$ condor_submit helloworld.submit
Submitting job(s).
Logging submit event(s).
1 job(s) submitted to cluster 24137.
Output Files from the Sample Run
To see the output, the user can list the output file:
[jmehring@almaak-01 vanilla]$ cat hello.out
Hello Condor!
To see information about the execution of the job, the user can list the log file:
[jmehring@almaak-01 vanilla]$ cat test.log
000 (24137.000.000) 07/08 15:57:41 Job submitted from host: <128.125.253.166:32951>
...
001 (24137.000.000) 07/08 15:57:46 Job executing on host: <128.125.5.71:54010>
...
005 (24137.000.000) 07/08 15:57:47 Job terminated.
(1) Normal termination (return value 0)
Usr 0 00:00:00, Sys 0 00:00:00 - Run Remote Usage
Usr 0 00:00:00, Sys 0 00:00:00 - Run Local Usage
Usr 0 00:00:00, Sys 0 00:00:00 - Total Remote Usage
Usr 0 00:00:00, Sys 0 00:00:00 - Total Local Usage
29 - Run Bytes Sent By Job
6652 - Run Bytes Received By Job
29 - Total Bytes Sent By Job
6652 - Total Bytes Received By Job
...