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-1.0.14 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.13 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.12 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.11 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.10 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.9 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.8 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.7 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.6 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.4 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.3 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.2 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.1 lib/coderunner/system_modules/iridis.rb
coderunner-1.0.0 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.5 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.4 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.3 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.2 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.1 lib/coderunner/system_modules/iridis.rb
coderunner-0.18.0 lib/coderunner/system_modules/iridis.rb