Class: CodeRunner::Trinity
- Inherits:
-
Object
- Object
- CodeRunner::Trinity
- Defined in:
- lib/trinitycrdriver.rb
Defined Under Namespace
Classes: Optimisation
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/trinitycrdriver.rb', line 10 def execute if rcp.delay_execution return else execute_actual end end |
#execute_actual ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/trinitycrdriver.rb', line 17 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 |