IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38186 for trunk/ippScripts


Ignore:
Timestamp:
Apr 24, 2015, 6:31:45 PM (11 years ago)
Author:
watersc1
Message:

I forgot the schedulers are different

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/sc_prepare_run.pl

    r38168 r38186  
    304304print COMMAND "#!/bin/tcsh\n";
    305305print COMMAND "##### Moab controll lines\n";
    306 print COMMAND "#MSUB -l nodes=${node_req}:ppn=${proc_per_node},walltime=${time_req}:00:00\n"; ## CHECK RESOURCES
    307 print COMMAND "#MSUB -j oe\n";
    308 print COMMAND "#MSUB -V\n";
    309 print COMMAND "#MSUB -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n";
     306if ($remote_recipe{SCHEDULER} eq 'MOAB') {
     307    print COMMAND "#MSUB -l nodes=${node_req}:ppn=${proc_per_node},walltime=${time_req}:00:00\n"; ## CHECK RESOURCES
     308    print COMMAND "#MSUB -j oe\n";
     309    print COMMAND "#MSUB -V\n";
     310    print COMMAND "#MSUB -o ${remote_root}/stask_logs/${stage}.${remote_id}.out\n";
     311}
     312elsif ($remote_recipe{SCHEDULER} eq 'SLURM') {
     313    print COMMAND "###### sbatch control lines\n";
     314    print COMMAND "#SBATCH --time ${time_req}:00:00\n";
     315    print COMMAND "#SBATCH --nodes ${node_req}\n";
     316    print COMMAND "#SBATCH --open-mode=append\n";
     317    print COMMAND "#SBATCH --export=ALL\n";
     318    print COMMAND "#SBATCH --exclusive\n";
     319}
     320else {
     321    &my_die("No scheduler defined", $remote_id, 0, 'fail_state');
     322}
     323
    310324print COMMAND "date\n";
    311325print COMMAND 'srun -n $SLURM_JOB_NUM_NODES -m cyclic -l /bin/hostname | sort -n | awk \'{printf "%s\n", $2}\' > hosts.${SLURM_JOB_ID}' . "\n";
  • trunk/ippScripts/scripts/sc_remote_exec.pl

    r38180 r38186  
    171171# Run real command
    172172my (undef,$remote_command) = &uri_convert($uri_command);
    173 my $ssh_exec_stdout = &ssh_exec_command("msub -V $remote_command");
     173my $ssh_exec_stdout;
     174
     175if ($remote_recipe{SCHEDULER} eq 'MOAB') {
     176    $ssh_exec_stdout = &ssh_exec_command("msub -V $remote_command");
     177}
     178elsif ($remote_recipe{SCHEDULER} eq 'SLURM') {
     179    $ssh_exec_stdout = &ssh_exec_command("sbatch $remote_command");
     180}
     181else {
     182    &my_die("No scheduler defined", $remote_id, 0, 'pending');
     183}
    174184if ($#{ $ssh_exec_stdout } != -1) { # Parse the output
    175185    $job_id = ${ $ssh_exec_stdout }[0];
Note: See TracChangeset for help on using the changeset viewer.