Cleans up the resources that used by IBM openshmem library.
#include <shmem.h> void shmem_finalize(void);
The shmem_finalize function cleans up the resources used by IBM openshmem library.
This function should be call only once at the end of main function. It is a blocking collective call. Internally, a shmem_barrier_all is called to ensure all communications prior the call are finished.
The calling of this function is optional. After the call to shmem_finalize, any IBM openshmem function call will not be valid, and the buffers allocated using shmalloc (or shrealloc) cannot be used anymore.
Subroutines: num_pes, my_pe, start_pes