Class: CodeRunner::Trinity
- Inherits:
-
Object
- Object
- CodeRunner::Trinity
show all
- Defined in:
- lib/trinitycrdriver.rb,
lib/trinitycrdriver.rb
Defined Under Namespace
Modules: TrinityDriver
Classes: Optimisation
Instance Method Summary
collapse
Instance Method Details
#execute ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/trinitycrdriver.rb', line 24
def execute
if rcp.delay_execution
return
else
execute_actual
end
end
|
#execute_actual ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/trinitycrdriver.rb', line 31
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
|