Class: CodeRunner::Trinity
- Inherits:
-
Object
- Object
- CodeRunner::Trinity
- Defined in:
- lib/corfucrmod/trinitycrdriver.rb,
lib/corfucrmod/trinitycrdriver.rb
Defined Under Namespace
Modules: TrinityDriver
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run_trin_standalone(input_file) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/corfucrmod/trinitycrdriver.rb', line 14 def self.run_trin_standalone(input_file) require 'mpi' MPI.Init obj = CodeRunner::Trinity.new obj.run_trinity(input_file, MPI::Comm::WORLD) MPI.Finalize end |
Instance Method Details
#execute ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/corfucrmod/trinitycrdriver.rb', line 35 def execute if rcp.delay_execution eputs 'Delaying execution...' return else execute_actual end end |
#execute_actual ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/corfucrmod/trinitycrdriver.rb', line 43 def execute_actual Dir.chdir(@directory){ if rcp.mpi_communicator? start_mpi = false mpicomm = rcp.mpi_communicator else start_mpi = true MPI.Init mpicomm = MPI::Comm::WORLD puts ["INITIALISED MPI", mpicomm.size ] end run_trinity(@run_name + ".trin", mpicomm) if start_mpi MPI.Finalize end } end |
#queue_status ⇒ Object
32 33 34 |
# File 'lib/corfucrmod/trinitycrdriver.rb', line 32 def queue_status "" end |