Hi Folks, There seems to have been recent outburst of interest in the mpi java bindings, so moving in retrograde fashion back to what I use to be doing, I've started investigating the Ompi JNI code.
I'm noticing that at least on sles11sp3, that soon after the java vm invokes the JNI_OnUnload of the ompi JNI code, the JVM segfaults when running some pthread key destructors, namely those associated with pthread keys that ompi is setting up. If I set the destructor field to null in the ompi calls to pthread_key_create, then the jvm shuts down without a segfault after the java app exits. Note that one can get lucky, as is the case when I run the java app on my mac. That's because the jvm on this system doesn't care to run the JNI_OnUnload code. One way to handle this problem would be to go find all the places (fortunately not many) where opal_tsd_key_create is called, and then make sure there is an appropriate opal_tsd_key_destroy for the key during the MPI_Finalize procedure. Alternately, since this is basically a dso problem, one could define fini functions to run the destructors during the dlclose procedure. Any thoughts? Howard