MPIX_Free_queue

Free and release any related resources associated with a queue object.

Definitions

C/C++ Synopsis

int MPIX_Free_queue(MPIX_Queue queue)

Arguments

queue        IN  Already created queue object passed as input

Description

Previously created queue object is destroyed and all related, MPI implementation specific, internal resources are freed as part of the MPIX_Free_queue operation. Passing an invalid or uninitialized queue will result in undefined behavior. It is the user’s responsibility to make sure all pending operations in the queue are already completed before the MPIX_Free_queue operation is called. Trying to free and release a queue object with pending ST data movement or synchronization operations will result in undefined behavior. Also, the free operation releases just the MPIX_Queue object and not the associated GPU stream handle.

Return Values

None.

Examples

C/C++ Example

Example code snippet showing the usage of MPIX_Create_queue and MPIX_Free_queue.

MPIX_Queue queue;
hipStream_t stream;
hipStreamCreateWithFlags(&stream, hipStreamNonBlocking);
MPIX_Create_queue(MPI_COMM_WORLD_DUP, (void *)stream, &queue);

/* Use MPI queue object for any stream-based communication */

MPIX_Free_queue(queue);
hipStreamDestroy(stream);