Sha256: dd16d1066b1990f463fe10e46668e329dec346646e15aeedada07ed337f4efb2

Contents?: true

Size: 1.18 KB

Versions: 165

Compression:

Stored size: 1.18 KB

Contents

class CodeRunner
	require SCRIPT_FOLDER + '/system_modules/moab.rb'
	module Franklin 
		include Moab
	
	def batch_script
		nodes, ppn = @nprocs.split(/x/)
		eputs "Warning: Underuse of nodes (#{ppn} cores per node instead of 4)" if ppn.to_i < 4
		raise "Please specify project" unless @project
		raise "Error: cores per node cannot excede 4" if ppn.to_i > 4
#		raise "Error: project (i.e. budget) not specified" unless @project
		ppn ||= 4
		if @wall_mins
			ep @wall_mins
			hours = (@wall_mins / 60).floor
			mins = @wall_mins.to_i % 60
			secs = ((@wall_mins - @wall_mins.to_i) * 60).to_i
		end
		eputs "Allotted wall time is " + sprintf("%02d:%02d:%02d", hours, mins, secs)
		nprocstot = nodes.to_i * ppn.to_i
<<EOF
	#!/bin/bash --login 
	#PBS -N #{executable_name}.#{job_identifier}
	#PBS -l mppwidth=#{nprocstot}
	#PBS -l mppnppn=#{ppn}
	#{@wall_mins ? "#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}" : ""}
	#{@project ? "#PBS -A #@project" : ""}
        #PBS -q #{@runner.debug ? "debug" : "regular"} 

	### start of jobscript 
	cd $PBS_O_WORKDIR 
	echo "workdir: $PBS_O_WORKDIR" 

	echo "Submitting #{nodes}x#{ppn} job on Hector for project #@project..."
	
	
EOF

	end

	end
end

Version data entries

165 entries across 165 versions & 1 rubygems

Version Path
coderunner-0.15.6 lib/coderunner/system_modules/franklin.rb
coderunner-0.15.5 lib/coderunner/system_modules/franklin.rb
coderunner-0.15.4 lib/coderunner/system_modules/franklin.rb
coderunner-0.15.2 lib/coderunner/system_modules/franklin.rb
coderunner-0.15.1 lib/coderunner/system_modules/franklin.rb
coderunner-0.15.0 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.24 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.23 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.22 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.21 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.20 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.19 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.18 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.17 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.16 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.15 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.14 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.13 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.12 lib/coderunner/system_modules/franklin.rb
coderunner-0.14.11 lib/coderunner/system_modules/franklin.rb