Module: CodeRunner::Archer

Includes:
Moab
Defined in:
lib/coderunner/system_modules/archer.rb

Instance Method Summary collapse

Methods included from Moab

#batch_script_file, #cancel_job, #error_file, #execute, #get_run_status, #hours_minutes_seconds, #nodes, #nprocstot, #output_file, #ppn, #ppn_checks, #queue_status, #run_command

Instance Method Details

#batch_scriptObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/coderunner/system_modules/archer.rb', line 6

def batch_script
    raise "Please specify project" unless @project
    (eputs "Warning: number of wall mins is not recommended (20, 60, 180, 360, 720 recomended)"; sleep 0.2) unless [20, 60, 180, 360, 720].include? @wall_mins.to_i

  ppn_checks
  hours, mins, secs = hours_minutes_seconds
"#!/bin/bash --login \n#PBS -N \#{executable_name}.\#{job_identifier}\n#PBS -l select=\#{nodes}\n#PBS -l walltime=\#{sprintf(\"%02d:%02d:%02d\", hours, mins, secs)}\n\#{@project ? \"#PBS -A \#@project\" : \"\"}\n\n### start of jobscript \ncd $PBS_O_WORKDIR \necho \"workdir: $PBS_O_WORKDIR\" \n\#{code_run_environment}\n\necho \"Submitting \#{nodes}x\#{ppn} job on \#{CodeRunner::SYS} for project \#@project...\"\n" 
end

#max_ppnObject



28
29
30
# File 'lib/coderunner/system_modules/archer.rb', line 28

def max_ppn
  24
end

#mpi_progObject



32
33
34
# File 'lib/coderunner/system_modules/archer.rb', line 32

def  mpi_prog
"aprun -n #{ppn*nodes}"
end