GlobalArrays / ga

Partitioned Global Address Space (PGAS) library for distributed arrays
http://hpc.pnl.gov/globalarrays/
Other
97 stars 38 forks source link

silence warning message for inactive nb handles #233

Closed edoapra closed 2 years ago

edoapra commented 2 years ago

silence warning message for inactive nb handles as described in the issue https://github.com/Gl…obalArrays/ga/issues/232

bjpalmer commented 2 years ago

Are you sure that you aren't calling wait on the same NB handle multiple times? That check is supposed to pick up on that particular case.

jeffhammond commented 2 years ago

When I use ARMCI-MPI, some modules print thousands of lines of this warning. I'm not sure it's a good one to be on by default. I have to manually disable it regularly.

edoapra commented 2 years ago

@bjpalmer you were right. I have fixed the NB wait calls with the commit https://github.com/nwchemgit/nwchem/commit/abf8075e65c6ce9f47e7e461d1a1eb6626cc7cdf. We might want to tweak the error message to print the handle value instead of the pull request I have opened

bjpalmer commented 2 years ago

So what do you want to do here? As I mentioned, the warning is designed to flag multiple wait calls to the same handle. I could imagine a code that is designed to operate that way, but it seems more likely that in most cases it would represent either a bug or some kind of inefficiency. I can get rid of it or modify the print statement to provide a more useful message. @jeffhammond, what is your thought?

edoapra commented 2 years ago

I have reworked the pull request.

diff --git a/global/src/nbutil.c b/global/src/nbutil.c
index a817a569..f9bdad54 100644
--- a/global/src/nbutil.c
+++ b/global/src/nbutil.c
@@ -225,7 +225,7 @@ int nga_wait_internal(Integer *nbhandle){
    * this case */
   if (tag == ga_ihdl_array[index].ga_nbtag) {
     if (ga_ihdl_array[index].active == 0) {
-      printf("p[%ld] nga_wait_internal: GA NB handle inactive\n",GAme);
+      printf("p[%ld] nga_wait_internal: GA NB handle %ld is inactive\n",GAme, *nbhandle);
     }
     ga_armcihdl_t* next = ga_ihdl_array[index].ahandle;
     /* Loop over linked list and complete all remaining armci non-blocking calls */
jeffhammond commented 2 years ago

Ah, I see that Edo fixed the issues in the CCSD(T) semidirect code that led to all the warnings, so I have no complaints now.