Sha256: 445ec2789048e6b5db6ee91bc5fc67aee41adf57097d8691cb90d8f58be9aa86

Contents?: true

Size: 855 Bytes

Versions: 154

Compression:

Stored size: 855 Bytes

Contents

class CodeRunner
	require SCRIPT_FOLDER + '/system_modules/moab.rb'
	module Iridis
		include Moab
		def batch_script
			raise "Please specify project" unless @project
			super
		end
		def max_ppn
			12
		end
		def mpi_prog
			"mpirun -np #{nprocstot}"
		end
		def execute
			if ((prefix = ENV['CODE_RUNNER_LAUNCHER']).size > 0 rescue false)
				launch_id = "#{Time.now.to_i}#{$$}"
				fname = ENV['HOME'] + "/.coderunner_to_launch_#{prefix}/#{launch_id}"
				File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
				sleep 1 until FileTest.exist? fname + '.pid'
				pid = File.read(fname + '.pid').to_i
				FileUtils.rm fname + '.pid'
				return pid
			else
				File.open(batch_script_file, 'w'){|file| file.puts batch_script + run_command + "\n"}
				pid = %x[qsub -q #@project #{batch_script_file}].to_i
			end
	end
	end
end

Version data entries

154 entries across 154 versions & 1 rubygems

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