Skip to content
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

duplicating MPI communicators #232

Closed
jmccreight opened this issue Nov 29, 2018 · 5 comments
Closed

duplicating MPI communicators #232

jmccreight opened this issue Nov 29, 2018 · 5 comments

Comments

@jmccreight
Copy link
Collaborator

HYDRO_COMM_WORLD = MPI_COMM_WORLD

The above is how not to do it, should use MPI_COMM_DUP.

@glennpj
Copy link

glennpj commented Feb 25, 2019

Hi,
I am building the coupled model of WRF/WRF-hydro for one of our researchers. I am seeing the following error when trying to run the front_range_CO test case, which perhaps is related to the comment above.

*** An error occurred in MPI_Bcast
*** reported by process [47923237289985,1]
*** on communicator MPI_COMM_WORLD
*** MPI_ERR_COMM: invalid communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
***    and potentially your MPI job)

I did a quick search in MPI docs and see,

In particular, no library routine should use MPI_COMM_WORLD as the communicator; instead, a duplicate of a user-specified communicator should always be used.

https://www.mpich.org/static/docs/latest/www3/MPI_Comm_dup.html

I may be looking at the wrong thing but this was the most promising lead that I found. How would I go about duplicating the communicator?

Thanks.

@afanfa
Copy link
Contributor

afanfa commented Feb 25, 2019

here is how to do it:

call MPI_COMM_DUP(MPI_COMM_WORLD, HYDRO_COMM_WORLD, ierr)

@glennpj
Copy link

glennpj commented Feb 26, 2019

@afanfa Sorry for the delayed response but that seems to have done the trick. I made the change in mpp_land.F and CPL_WRF.F.

Thanks so much.

@afanfa
Copy link
Contributor

afanfa commented Feb 26, 2019

@glennpj that's great news. @jmccreight I am going to make a pull request to reflect that change on master as well.

@jmccreight
Copy link
Collaborator Author

#281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants