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_script ⇒ Object
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
<<EOF
#!/bin/bash --login
#PBS -N #{executable_name}.#{job_identifier}
#PBS -l select=#{nodes}
#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}
#{@project ? "#PBS -A #@project" : ""}
### start of jobscript
cd $PBS_O_WORKDIR
echo "workdir: $PBS_O_WORKDIR"
#{code_run_environment}
echo "Submitting #{nodes}x#{ppn} job on #{CodeRunner::SYS} for project #@project..."
EOF
end
|
28
29
30
|
# File 'lib/coderunner/system_modules/archer.rb', line 28
def max_ppn
24
end
|
32
33
34
|
# File 'lib/coderunner/system_modules/archer.rb', line 32
def mpi_prog
"aprun -n #{ppn*nodes}"
end
|