Sha256: 8a73d4831dce45f2bf8e841da9ac610899819c685ec28671841e2e25196e97bd

Contents?: true

Size: 1.26 KB

Versions: 118

Compression:

Stored size: 1.26 KB

Contents

class CodeRunner
	require SCRIPT_FOLDER + '/system_modules/moab.rb'
	module Loki
		include Moab
	
		def max_ppn
			8
		end

	def mpi_prog
		"mpiexec -n #{nprocstot}"
	end

	def batch_script
		nodes, ppn = @nprocs.split(/x/)
          eputs "Warning: Underuse of nodes (#{ppn} cores per node instead of #{max_ppn})" if ppn.to_i < max_ppn
#		raise "Please specify project" unless @project
                raise "Error: cores per node cannot excede #{max_ppn}" if ppn.to_i > max_ppn
#		raise "Error: project (i.e. budget) not specified" unless @project
		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 nodes=#{nodes}:ppn=#{ppn}
	#{@wall_mins ? "#PBS -l walltime=#{sprintf("%02d:%02d:%02d", hours, mins, secs)}" : ""}
	#{@project ? "#PBS -A #@project" : ""}
        #PBS -q #{@runner.debug ? "debug" : "default"} 

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

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

	end

	end
end

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
coderunner-1.0.14 lib/coderunner/system_modules/loki.rb
coderunner-1.0.13 lib/coderunner/system_modules/loki.rb
coderunner-1.0.12 lib/coderunner/system_modules/loki.rb
coderunner-1.0.11 lib/coderunner/system_modules/loki.rb
coderunner-1.0.10 lib/coderunner/system_modules/loki.rb
coderunner-1.0.9 lib/coderunner/system_modules/loki.rb
coderunner-1.0.8 lib/coderunner/system_modules/loki.rb
coderunner-1.0.7 lib/coderunner/system_modules/loki.rb
coderunner-1.0.6 lib/coderunner/system_modules/loki.rb
coderunner-1.0.4 lib/coderunner/system_modules/loki.rb
coderunner-1.0.3 lib/coderunner/system_modules/loki.rb
coderunner-1.0.2 lib/coderunner/system_modules/loki.rb
coderunner-1.0.1 lib/coderunner/system_modules/loki.rb
coderunner-1.0.0 lib/coderunner/system_modules/loki.rb
coderunner-0.18.5 lib/coderunner/system_modules/loki.rb
coderunner-0.18.4 lib/coderunner/system_modules/loki.rb
coderunner-0.18.3 lib/coderunner/system_modules/loki.rb
coderunner-0.18.2 lib/coderunner/system_modules/loki.rb
coderunner-0.18.1 lib/coderunner/system_modules/loki.rb
coderunner-0.18.0 lib/coderunner/system_modules/loki.rb