I think either solution would be valuable - this is something that came up a few months ago, but the Java team members couldn’t trace it down, and neither Jeff nor I had time to pursue it.
> On Apr 6, 2015, at 3:30 PM, Howard Pritchard <hpprit...@gmail.com> wrote: > > 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 > > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2015/04/17185.php