-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fix MATLAB bindings for MacOS #3950
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,11 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) | |
|
||
/********************************************************/ | ||
/* Open ADIOS file now and get variables and attributes */ | ||
#if ADIOS2_USE_MPI | ||
adiosobj = adios2_init(false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this call be passing the MPI communicator into ADIOS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, I don't think so, but this is where my knowledge of ADIOS breaks down a bit.... The previous version of this line in adiosopenc.c passed false, so I imagine that it's ok. Even in the event the library uses MPI, passing an MPI communicator would require creating one (which would then require finalizing / destroying after use), which is I assume why the original author just passed false. But the makefile links against the non-MPI version of ADIOS (which is what I used to do my testing), so I'm not sure how this would behave if linked against the MPI version. Do:
or any of the other adios2 functions in adiosreadc.c or adiosclosec.c use MPI for anything? If so, maybe the best bet is to have a preprocessor assert that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We never used MPI in Matlab, and apparently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess explicitly calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Probably so. There's some other stuff in the bindings that could use to be cleaned up (unreferenced mpi_comm_dummy variable, etc.). I was going to try to get Matlab installed for myself so I could at least try things before merging. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done. |
||
#else | ||
adiosobj = adios2_init(); | ||
#endif | ||
group = adios2_declare_io(adiosobj, "matlabiogroup"); // name is arbitrary | ||
fp = adios2_open(group, fname, adios2_mode_read); | ||
if (fp == NULL) | ||
|
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.
Ouch. We may need to push this into the release branch too.
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.
Seems like no one uses the non-MPI version 🤣