Sha256: 9407e96e62880612ef81c3dbf6e52ca0940de2d01e4ef532500a1141c294849c

Contents?: true

Size: 910 Bytes

Versions: 1

Compression:

Stored size: 910 Bytes

Contents

class CodeRunner
	require 'coderunner/system_modules/moab.rb'
	module Dirac
		include Moab
		def max_ppn
			16
		end
		def mpi_prog
			"mpiexec -np #{nprocstot} "
		end
		def gpu_name
			@nprocs.split(/:/)[1]
		end
		
		def batch_script
			ppn_checks
			hours, minutes, seconds = hours_minutes_seconds
	<<EOF
		#!/bin/bash --login 
		#PBS -N #{executable_name}.#{job_identifier}
		#PBS -l nodes=#{nodes}:ppn=#{ppn}:#{gpu_name}
		#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}
		#{@project ? "#PBS -A #@project" : ""}
		#PBS -e #{executable_name}.#{job_identifier}.e$PBS_JOBID
		#PBS -o #{executable_name}.#{job_identifier}.o$PBS_JOBID
		#PBS -V
		#PBS -q dirac_reg


		### start of jobscript 
		cd $PBS_O_WORKDIR 
		echo "workdir: $PBS_O_WORKDIR" 
	#{code_run_environment}

		echo "Submitting #{nodes}x#{ppn}:#{gpu_name} job on #{CodeRunner::SYS} for project #@project..."
EOF
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coderunner-0.13.9 lib/coderunner/system_modules/dirac.rb