-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create gridpack::environment with existing MPI communicator #119
Conversation
|
GridPACK expects to control MPI, that is GridPACK calls This was set up for the ExaLearn folks, who drive multiple GridPACK instances with an MPI-based driver. |
Agreed. It should be noted, however, that this will require reconciling the HADREC application with current dynamic simulation API without alienating the ExaLearn application of HADREC. I do not know details. |
Note to self: The value of the CMake variable |
c4e4402
to
b11cb47
Compare
src/environment/environment.cpp
Outdated
Environment::~Environment(void) | ||
{ | ||
// Finalize math libraries | ||
gridpack::math::Finalize(); | ||
if (p_from_comm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the artifacts from rebase.
I don't understand the destructor. It seems to me that gridpack::math::Finalize();
and GA_Terminate()
should be called no matter the state of p_from_comm
.
@@ -198,4 +215,11 @@ install(TARGETS dsf2.x DESTINATION bin) | |||
# run application as test | |||
# ------------------------------------------------------------- | |||
gridpack_add_run_test("dynamic_simulation_full_y" dsf.x input_145.xml) | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase artifacts.
I'm in the process of cleaning up after the rebase. I'm not sure how I managed to overlook some of the artifacts since the code doesn't compile. I noticed the same thing about the destructor and fixed it. |
//gridpack::utility::Configuration::CursorPtr cursor; | ||
cursor = config->getCursor("Configuration.Dynamic_simulation"); | ||
std::vector<gridpack::dynamic_simulation::Event> faults; | ||
faults = ds_app.getFaults(cursor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, getFaults()
is no longer a method. I think it's getEvents()
now. I don't know if there is an internal difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIxed.
b3348b4
to
117a1ec
Compare
@bjpalmer: any updates on when GA will be updated to have fewture/init-comm in develop? |
The stuff in feature/init-comm should already be in the develop branch of GA. I've been linking GridPACK against the develop branch and it seems to work okay. |
FYI. In the GridPACK |
So then can we just use the develop branch of GA? And merge GridPack's feature/init-comm to develop? I can update the install script to use GA's develop branch. Thoughts? |
First we need to resolve the issue with GridPACK python application hanging on multiple processors. @bjpalmer: do you have time to take a look at this? |
You should be able to switch the install script to use develop. Is the code hanging when using the progress ranks runtime in GA? You need to be careful with that runtime to get the code to exit cleanly. |
I am not using progress ranks. You can try the updated 39 bus python example I've pushed to the branch |
117a1ec
to
ce60140
Compare
a64b54d
to
424179e
Compare
You can still use the official GA release to build this branch. But, if you do, you cannot specify Personally, I think we should merge this. The audience for |
…hese may confuse builds outside of gridpack.
…nts from some of the code and cleaned up the environment destructor so that it works properly for regular environments.
…ations that are initialized by a communicator and to prevent problems with tests using the GA progress ranks runtime.
… hangs/gets stuck
8aa889a
to
4965bb6
Compare
@bjpalmer, I've added some very brief documentation. If it's enough, please approve this PR and I'll merge it. Thanks. |
Good to merge after rebase. |
This branch adds a facility to create a
gridpack::environment
with an existing MPI communicator. This allows an external application to callMPI_Initialize()
and instantiate multiple GridPACK environments on an externally distribution of MPI ranks.NOTE: This GridPACK branch depends on a specific branch of Global Arrays (
feature/init-comm
). This PR should not be accepted until the necessary changes have been merged into the GAmaster
branch (and the GridPACK GA submodule is updated and actually works).