|
28 | 28 |
|
29 | 29 | #include "mpi.h" |
30 | 30 |
|
| 31 | +#include <iostream> |
| 32 | + |
31 | 33 | namespace OMEGA { |
32 | 34 |
|
33 | 35 | int ocnInit(MPI_Comm Comm ///< [in] ocean MPI communicator |
@@ -58,7 +60,9 @@ int ocnInit(MPI_Comm Comm ///< [in] ocean MPI communicator |
58 | 60 |
|
59 | 61 | // Call init routines for remaining Omega modules |
60 | 62 | int initOmegaModules(MPI_Comm Comm) { |
61 | | - |
| 63 | +int MyTask=0; |
| 64 | +MPI_Comm_rank(Comm, &MyTask); |
| 65 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
62 | 66 | // error and return codes |
63 | 67 | int Err = 0; |
64 | 68 |
|
@@ -133,21 +137,25 @@ int initOmegaModules(MPI_Comm Comm) { |
133 | 137 | int Err1 = IOStream::Success; |
134 | 138 | int Err2 = IOStream::Success; |
135 | 139 |
|
| 140 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
136 | 141 | // read from initial state if this is starting a new simulation |
137 | 142 | Metadata ReqMeta; // no requested metadata for initial state |
138 | 143 | Err1 = IOStream::read("InitialState", ModelClock, ReqMeta); |
139 | 144 |
|
| 145 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
140 | 146 | // read restart if starting from restart |
141 | 147 | SimTimeStr = " "; |
142 | 148 | ReqMeta["SimulationTime"] = SimTimeStr; |
143 | 149 | Err2 = IOStream::read("RestartRead", ModelClock, ReqMeta); |
144 | 150 |
|
| 151 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
145 | 152 | // One of the above two streams must be successful to initialize the |
146 | 153 | // state and other fields used in the model |
147 | 154 | if (Err1 != IOStream::Success and Err2 != IOStream::Success) { |
148 | 155 | ABORT_ERROR("Error initializing ocean variables from input streams"); |
149 | 156 | } |
150 | 157 |
|
| 158 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
151 | 159 | // If reading from restart, reset the current time to the input time |
152 | 160 | if (SimTimeStr != " ") { |
153 | 161 | TimeInstant NewCurrentTime(SimTimeStr); |
@@ -178,6 +186,7 @@ int initOmegaModules(MPI_Comm Comm) { |
178 | 186 | ABORT_ERROR("Error updating tracer device arrays after restart"); |
179 | 187 | } |
180 | 188 |
|
| 189 | +std::cout<<__FILE__<<":"<<__LINE__<<":"<<MyTask<<std::endl; |
181 | 190 | return Err; |
182 | 191 |
|
183 | 192 | } // end initOmegaModules |
|
0 commit comments