-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stash Xios handler on ParaGridIO instance
- Loading branch information
1 parent
28f269a
commit fae39fc
Showing
9 changed files
with
73 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file XiosAxis_test.cpp | ||
* @author Joe Wallwork <[email protected]> | ||
* @date 12 August 2024 | ||
* @date 01 Nov 2024 | ||
* @brief Tests for XIOS axes | ||
* @details | ||
* This test is designed to test axis functionality of the C++ interface | ||
|
@@ -13,7 +13,8 @@ | |
|
||
#include "StructureModule/include/ParametricGrid.hpp" | ||
#include "include/Configurator.hpp" | ||
#include "include/Xios.hpp" | ||
#include "include/NextsimModule.hpp" | ||
#include "include/ParaGridIO_Xios.hpp" | ||
|
||
#include <iostream> | ||
|
||
|
@@ -38,8 +39,14 @@ MPI_TEST_CASE("TestXiosAxis", 2) | |
std::unique_ptr<std::istream> pcstream(new std::stringstream(config.str())); | ||
Configurator::addStream(std::move(pcstream)); | ||
|
||
// Initialize an Xios instance called xios_handler | ||
Xios xios_handler; | ||
// Create ParametricGrid and ParaGridIO instances | ||
Module::setImplementation<IStructure>("Nextsim::ParametricGrid"); | ||
ParametricGrid grid; | ||
ParaGridIO* pio = new ParaGridIO(grid); | ||
grid.setIO(pio); | ||
|
||
// Create a reference for the Xios handler object associated with the ParaGridIO instance | ||
Xios& xios_handler = pio->xiosHandler; | ||
REQUIRE(xios_handler.isInitialized()); | ||
REQUIRE(xios_handler.getClientMPISize() == 2); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file XiosCalendar_test.cpp | ||
* @author Joe Wallwork <[email protected]> | ||
* @date 5 August 2024 | ||
* @date 01 Nov 2024 | ||
* @brief Tests for XIOS calandars | ||
* @details | ||
* This test is designed to test calendar functionality of the C++ interface | ||
|
@@ -13,7 +13,8 @@ | |
|
||
#include "StructureModule/include/ParametricGrid.hpp" | ||
#include "include/Configurator.hpp" | ||
#include "include/Xios.hpp" | ||
#include "include/NextsimModule.hpp" | ||
#include "include/ParaGridIO_Xios.hpp" | ||
|
||
#include <iostream> | ||
|
||
|
@@ -38,8 +39,15 @@ MPI_TEST_CASE("TestXiosInitialization", 2) | |
std::unique_ptr<std::istream> pcstream(new std::stringstream(config.str())); | ||
Configurator::addStream(std::move(pcstream)); | ||
|
||
// Initialize an Xios instance called xios_handler | ||
Xios xios_handler; | ||
// Create ParametricGrid and ParaGridIO instances | ||
Module::setImplementation<IStructure>("Nextsim::ParametricGrid"); | ||
ParametricGrid grid; | ||
ParaGridIO* pio = new ParaGridIO(grid); | ||
grid.setIO(pio); | ||
|
||
// Create a reference for the Xios handler object associated with the ParaGridIO instance | ||
Xios& xios_handler = pio->xiosHandler; | ||
REQUIRE(xios_handler.isInitialized()); | ||
REQUIRE(xios_handler.isInitialized()); | ||
REQUIRE(xios_handler.getClientMPISize() == 2); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file XiosDomain_test.cpp | ||
* @author Joe Wallwork <[email protected]> | ||
* @date 21 August 2024 | ||
* @date 01 Nov 2024 | ||
* @brief Tests for XIOS domains | ||
* @details | ||
* This test is designed to test domain functionality of the C++ interface | ||
|
@@ -13,7 +13,8 @@ | |
|
||
#include "StructureModule/include/ParametricGrid.hpp" | ||
#include "include/Configurator.hpp" | ||
#include "include/Xios.hpp" | ||
#include "include/NextsimModule.hpp" | ||
#include "include/ParaGridIO_Xios.hpp" | ||
|
||
#include <iostream> | ||
|
||
|
@@ -38,8 +39,14 @@ MPI_TEST_CASE("TestXiosDomain", 2) | |
std::unique_ptr<std::istream> pcstream(new std::stringstream(config.str())); | ||
Configurator::addStream(std::move(pcstream)); | ||
|
||
// Initialize an Xios instance called xios_handler | ||
Xios xios_handler; | ||
// Create ParametricGrid and ParaGridIO instances | ||
Module::setImplementation<IStructure>("Nextsim::ParametricGrid"); | ||
ParametricGrid grid; | ||
ParaGridIO* pio = new ParaGridIO(grid); | ||
grid.setIO(pio); | ||
|
||
// Create a reference for the Xios handler object associated with the ParaGridIO instance | ||
Xios& xios_handler = pio->xiosHandler; | ||
REQUIRE(xios_handler.isInitialized()); | ||
const size_t size = xios_handler.getClientMPISize(); | ||
REQUIRE(size == 2); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file XiosField_test.cpp | ||
* @author Joe Wallwork <[email protected]> | ||
* @date 21 August 2024 | ||
* @date 01 Nov 2024 | ||
* @brief Tests for XIOS axes | ||
* @details | ||
* This test is designed to test axis functionality of the C++ interface | ||
|
@@ -13,7 +13,8 @@ | |
|
||
#include "StructureModule/include/ParametricGrid.hpp" | ||
#include "include/Configurator.hpp" | ||
#include "include/Xios.hpp" | ||
#include "include/NextsimModule.hpp" | ||
#include "include/ParaGridIO_Xios.hpp" | ||
|
||
#include <iostream> | ||
|
||
|
@@ -38,8 +39,14 @@ MPI_TEST_CASE("TestXiosField", 2) | |
std::unique_ptr<std::istream> pcstream(new std::stringstream(config.str())); | ||
Configurator::addStream(std::move(pcstream)); | ||
|
||
// Initialize an Xios instance called xios_handler | ||
Xios xios_handler; | ||
// Create ParametricGrid and ParaGridIO instances | ||
Module::setImplementation<IStructure>("Nextsim::ParametricGrid"); | ||
ParametricGrid grid; | ||
ParaGridIO* pio = new ParaGridIO(grid); | ||
grid.setIO(pio); | ||
|
||
// Create a reference for the Xios handler object associated with the ParaGridIO instance | ||
Xios& xios_handler = pio->xiosHandler; | ||
REQUIRE(xios_handler.isInitialized()); | ||
const size_t size = xios_handler.getClientMPISize(); | ||
REQUIRE(size == 2); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file XiosFile_test.cpp | ||
* @author Joe Wallwork <[email protected]> | ||
* @date 12 August 2024 | ||
* @date 01 Nov 2024 | ||
* @brief Tests for XIOS axes | ||
* @details | ||
* This test is designed to test axis functionality of the C++ interface | ||
|
@@ -13,7 +13,8 @@ | |
|
||
#include "StructureModule/include/ParametricGrid.hpp" | ||
#include "include/Configurator.hpp" | ||
#include "include/Xios.hpp" | ||
#include "include/NextsimModule.hpp" | ||
#include "include/ParaGridIO_Xios.hpp" | ||
|
||
#include <iostream> | ||
|
||
|
@@ -40,8 +41,14 @@ MPI_TEST_CASE("TestXiosFile", 2) | |
std::unique_ptr<std::istream> pcstream(new std::stringstream(config.str())); | ||
Configurator::addStream(std::move(pcstream)); | ||
|
||
// Initialize an Xios instance called xios_handler | ||
Xios xios_handler; | ||
// Create ParametricGrid and ParaGridIO instances | ||
Module::setImplementation<IStructure>("Nextsim::ParametricGrid"); | ||
ParametricGrid grid; | ||
ParaGridIO* pio = new ParaGridIO(grid); | ||
grid.setIO(pio); | ||
|
||
// Create a reference for the Xios handler object associated with the ParaGridIO instance | ||
Xios& xios_handler = pio->xiosHandler; | ||
REQUIRE(xios_handler.isInitialized()); | ||
const size_t size = xios_handler.getClientMPISize(); | ||
REQUIRE(size == 2); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters