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

../../ga-5.6.3/comex/src-mpi-pr/comex.c:996: _generate_shm_name: Assertion `snprintf_retval < (int)31' failed #95

Closed
edoapra opened this issue Mar 13, 2018 · 4 comments

Comments

@edoapra
Copy link
Contributor

edoapra commented Mar 13, 2018

If _generate_shm_name is called more than 999999 times, the snprintf format runs out of digits.
A user running NWChem with thousand of runs in the same job reported this problem.
Adding the line
if(counter > 999999) counter=0;
might avoid the wrap-around problem, but I am not quite sure if this is the right fix for it.
The GA version used was 5.6.3

@jeffhammond
Copy link
Member

Allocating shared-memory a million times sounds like a bad idea on many levels. Maybe we should implement a memory pool or lazy deallocation for this.

@jeffdaily
Copy link
Member

Patches welcome!

Perhaps we over-corrected a bit from our ARMCI days. Instead of allocating a huge pinned chunk, we opted to just allocate as-needed, exactly the size needed.

@jeffhammond
Copy link
Member

@jeffdaily I can provide a patch that uses MPI_Win_allocate_shared so that this becomes the problem of the MPI library, but I don't expect to have time to do the more complicated solutions any time soon.

@jeffdaily
Copy link
Member

We provided a solution that should work for the time being. Part of the 5.6.4 release.

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