@@ -993,9 +993,9 @@ int testTracerHyperDiffOnCell(int NVertLevels, int NTracers, Real RTol) {
993993 return Err;
994994} // end testTracerHyperDiffOnCell
995995
996- int initTendTest (const std::string &MeshFile, int NVertLevels) {
996+ void initTendTest (const std::string &MeshFile, int NVertLevels) {
997997
998- I4 Err = 0 ;
998+ Error Err;
999999
10001000 MachEnv::init (MPI_COMM_WORLD);
10011001 MachEnv *DefEnv = MachEnv::getDefault ();
@@ -1011,34 +1011,26 @@ int initTendTest(const std::string &MeshFile, int NVertLevels) {
10111011 // Reset NVertLevels to the test value
10121012 Config *OmegaConfig = Config::getOmegaConfig ();
10131013 Config DimConfig (" Dimension" );
1014- Err = OmegaConfig->get (DimConfig);
1015- if (Err != 0 ) {
1016- LOG_CRITICAL (" TendencyTermsTest: Dimension group not found in Config" );
1017- return Err;
1018- }
1019- Err = DimConfig.set (" NVertLevels" , NVertLevels);
1020- if (Err != 0 ) {
1021- LOG_CRITICAL (" TendencyTermsTest: Unable to reset NVertLevels in Config" );
1022- return Err;
1023- }
1014+ Err += OmegaConfig->get (DimConfig);
1015+ CHECK_ERROR_ABORT (Err,
1016+ " TendencyTermsTest: Dimension group not found in Config" );
1017+
1018+ DimConfig.set (" NVertLevels" , NVertLevels);
10241019
10251020 I4 IOErr = IO::init (DefComm);
10261021 if (IOErr != 0 ) {
1027- Err++;
1028- LOG_ERROR (" TendencyTermsTest: error initializing parallel IO" );
1022+ ABORT_ERROR (" TendencyTermsTest: error initializing parallel IO" );
10291023 }
10301024
1031- Decomp::init (mesh );
1025+ Decomp::init (MeshFile );
10321026
10331027 int HaloErr = Halo::init ();
10341028 if (HaloErr != 0 ) {
1035- Err++;
1036- LOG_ERROR (" TendencyTermsTest: error initializing default halo" );
1029+ ABORT_ERROR (" TendencyTermsTest: error initializing default halo" );
10371030 }
10381031
10391032 HorzMesh::init ();
10401033
1041- return Err;
10421034} // end initTendTest
10431035
10441036void finalizeTendTest () {
@@ -1052,12 +1044,10 @@ void finalizeTendTest() {
10521044} // end finalizeTendTest
10531045
10541046int tendencyTermsTest (const std::string &MeshFile = DefaultMeshFile) {
1047+ int Err = 0 ;
10551048 int NVertLevels = 16 ;
10561049
1057- int Err = initTendTest (MeshFile, NVertLevels);
1058- if (Err != 0 ) {
1059- LOG_CRITICAL (" TendencyTermsTest: Error initializing" );
1060- }
1050+ initTendTest (MeshFile, NVertLevels);
10611051
10621052 const auto &Mesh = HorzMesh::getDefault ();
10631053 int NTracers = 3 ;
0 commit comments