Documentation, examples, tutorials and more

<<

NAME

Smash::Utils::ClusterJob - General cluster job management module

SYNOPSIS

        my %options = ( 
                        NAME        => "testjob",
                        TYPE        => "SGE",
                        MEMORY      => 8000,      #default 2000
                        WORKING_DIR => "mydir",   #default cwd
                        EODIR       => "eofiles", #default cwd
                        QUEUE       => "all.q",
                        POLLING     => 90,        #default 60
                        CPUS        => 4,         #default 1
                        GROUP       => 2,         #default 1
                        LAMMPI     => 1,         #default 0
                );
        my $job = new Smash::Utils::ClusterJob(%options);
        $job->submit_commands("echo first_command", "echo second_command", "echo last_command");

This will submit an array job with the three commands in the argument to submit_commands() to the queue called "all.q" in the SGE batch queuing system that is visible to the current host with the following options.

        hard memory limit: 8000 MB
        working directory: mydir/
        error/output to  : eofiles/
        cpus allotted    : 4

GROUP specifies if the commands should be grouped together at all. This is useful for very short jobs, where the cluster management overhead time is more than the actual run time of the job. In this example, commands are grouped in sets of two. Let's assume this was submitted as job array 100. Task 1 of Job 100 will execute the two lines:

        echo first_command
        echo second_command

Task 2 will execute the following line:

        echo last_command

<<