IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38187


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

I forgot the schedulers are different

Location:
tags/ipp-20150329
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20150329/ippScripts/scripts/sc_prepare_run.pl

    r38170 r38187  
    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";
  • tags/ipp-20150329/ippScripts/scripts/sc_remote_exec.pl

    r38181 r38187  
    172172# Run real command
    173173my (undef,$remote_command) = &uri_convert($uri_command);
    174 my $ssh_exec_stdout = &ssh_exec_command("msub -V $remote_command");
     174my $ssh_exec_stdout;
     175
     176if ($remote_recipe{SCHEDULER} eq 'MOAB') {
     177    $ssh_exec_stdout = &ssh_exec_command("msub -V $remote_command");
     178}
     179elsif ($remote_recipe{SCHEDULER} eq 'SLURM') {
     180    $ssh_exec_stdout = &ssh_exec_command("sbatch $remote_command");
     181}
     182else {
     183    &my_die("No scheduler defined", $remote_id, 0, 'pending');
     184}
    175185if ($#{ $ssh_exec_stdout } != -1) { # Parse the output
    176186    $job_id = ${ $ssh_exec_stdout }[0];
  • tags/ipp-20150329/ippconfig/recipes/remote_hosts.config

    r38170 r38187  
    1818# This is used to decide if we bring back warp images, and if stack should ask for local copies.
    1919     TRANSFER_WARP_IMAGES BOOL FALSE
     20
     21     SCHEDULER       STR     MOAB
    2022
    2123     PROC_PER_NODE   S32     24
     
    3941     TRANSFER_WARP_IMAGES BOOL FALSE
    4042
     43     SCHEDULER       STR     SLURM
     44
    4145     PROC_PER_NODE   S32     20
    4246     MIN_NODES       S32     1
Note: See TracChangeset for help on using the changeset viewer.