wiki:bgas-user:bgas-manpages:jb_finalize

jb_finalize

Name

jb_finalize - terminates the JBRT environment.

Synopsis

#include "jbcnl.h";

void jb_finalize( void);

Include with -I/bgsys/local/bgas/jbrt/jbcn/include, link with -L/bgsys/local/bgas/jbrt/jbcn/lib -ljbcn.

Description

jb_finalize() deallocates the shared memory buffers used by the JBCNL and triggers termination of the JBRT's IO node infrastructure and reaping of any remaining IO node user processes. jb_finalize() shall be called at the end of the compute node application to ensure proper IO node cleanup.

No JBCNL functions must be called after jb_finalize(); doing so results in undefined behaviour.

jb_finalize() uses a global MPI barrier for synchronization before performing any cleanup operations; therefore, it is a globally blocking call and must furthermore be called before MPI_Finalize(). This is to ensure that the JBSD shutdown is not triggered while other MPI tasks are still communicating with the IO node.

As for MPI_Finalize(), jb_finalize() is not thread-safe and must be called by one thread only (though this thread does not necessarily have to be the one which called jb_init()).

Return value

jb_finalize() does not return a value and does not set "errno".

Last modified 10 years ago Last modified on 09/30/14 20:51:32
Note: See TracWiki for help on using the wiki.