Module: CodeRunner::Helios

Includes:
Slurm
Defined in:
lib/coderunner/system_modules/helios.rb

Instance Method Summary collapse

Methods included from Slurm

#batch_script, #batch_script_file, #cancel_job, #error_file, #execute, #get_run_status, #output_file, #queue_status

Methods included from Launcher

#cancel_job_launcher, #execute_launcher, #launcher_prefix, #queue_status_launcher, #use_launcher

Instance Method Details

#max_ppnObject

end



9
10
11
# File 'lib/coderunner/system_modules/helios.rb', line 9

def max_ppn
  16
end

#mpi_progObject



12
13
14
15
16
# File 'lib/coderunner/system_modules/helios.rb', line 12

def mpi_prog
 nodes, ppn = @nprocs.split(/x/)
  nprocstot = nodes.to_i * ppn.to_i
  "srun -n #{nprocstot}"
end

#run_commandObject



17
18
19
20
21
22
23
24
# File 'lib/coderunner/system_modules/helios.rb', line 17

def run_command
  #     "qsub #{batch_script_file}"
  if (ENV['CODE_RUNNER_LAUNCHER'].size > 0 rescue false)
    return %[#@preamble #{mpi_prog} #{executable_location}/#{executable_name} #{parameter_string} > #{output_file} 2> #{error_file}]
  else
    "#@preamble #{mpi_prog}  #{executable_location}/#{executable_name} #{parameter_string}"
  end
end