Hi,
I'm trying to use the Perl API to submit a batch job to our small cluster and having real difficulty getting the submit_batch_job call to work. The job_will_run call works correctly, but the submit_batch_job call returns 0 and the strerror call returns "Job script not specified"

The Slurmctld.log file show this when I attempt to submit the job

[2015-05-13T10:57:48.205] _validate_job_desc: job failed to specify Script
[2015-05-13T10:57:48.205] _slurm_rpc_submit_batch_job: Job script not specified

Anybody have any ideas what I'm doing wrong?

Regards

Matthew

Here is the test code I'm trying to use.

#!/usr/bin/perl

use Slurm;
use constant NO_VAL => 0xfffffffe;

$slurm = Slurm::new();

%testjob = (
            alloc_sid => NO_VAL,
            contiguous => NO_VAL,
            core_spec => NO_VAL,
            cores_per_socket => NO_VAL,
            cpu_bin_type => NO_VAL,
            group_id => NO_VAL,
            job_id => NO_VAL,
            kill_on_node_fail => NO_VAL,
            max_cpus => NO_VAL,
            max_nodes => NO_VAL,
            mem_bind_type => NO_VAL,
            min_cpus => NO_VAL,
            min_nodes => NO_VAL,
            nice => NO_VAL,
            ntasks_per_core => NO_VAL,
            ntasks_per_node => NO_VAL,
            ntasks_per_socket => NO_VAL,
            num_tasks => NO_VAL,
            overcommit => NO_VAL,
            plane_size => NO_VAL,
            pn_min_cpus => NO_VAL,
            pn_min_memory => NO_VAL,
            pn_min_tmp_disk => NO_VAL,
            priority => NO_VAL,
            reboot => NO_VAL,
            requeue => NO_VAL,
            req_switch => NO_VAL,
            rotate => NO_VAL,
            shared => NO_VAL,
            sockets_per_node => NO_VAL,
            task_dist => NO_VAL,
            threads_per_core => NO_VAL,
            time_limit => NO_VAL,
            time_min => NO_VAL,
            user_id => NO_VAL,
            wait_all_nodes => NO_VAL,
            wait4switch => NO_VAL,
);

$testjob{user_id} = $>;
$testjob{group_id} = $);
$testjob{partition} = 'default';
$testjob{work_dir} = '/tmp';
$testjob{command} = 'CI13YZah.sh';

# Check job will run
$rc = $slurm->job_will_run(\%testjob);
if ($? == 0) {
  $rc = $slurm->submit_batch_job(\%testjob);
  print $slurm->strerror();
}

exit 0;

<<attachment: matthew_wild.vcf>>

Reply via email to