db3a51f8c8
This commit enables the use of opal classes after a call to opal_class_finalize. This is needed to support re-initializing opal after calling opal_finalize_util (). This is needed to support the following without leaking: MPI_T_init_thread (); MPI_T_finalize (); MPI_Init (); MPI_Finalize (); Before this commit the above code would crash in MPI_Init because the constructor array for some class was freed by opal_class_finalize (). The fix is to turn the cls_initialized member of opal_class_t into an init epoch identifier and compare it against opal_class_init_epoch instead of 1. On each call to opal_class_finalize the opal_class_init_epoch counter is incremented forcing re-initialization of classes after finalize. Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>