GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MPIX_QUERY_ROCM_SUPPORT(3) Open MPI MPIX_QUERY_ROCM_SUPPORT(3)

MPIX_Query_rocm_support - Returns 1 if there is AMD ROCm-aware support and 0 if there is not.

#include <mpi.h>
#include <mpi-ext.h>
int MPIX_Query_rocm_support(void)


There is no Fortran binding for this function.

There is no C++ binding for this function.

This function is part of an Open MPI extension; it is not part of standard MPI.

This routine returns 1 if both the MPI library was built with the AMD ROCm library and the runtime supports ROCm buffers. Otherwise, it returns 0. This routine must be called after MPI is initialized, e.g., by a call to MPI_Init(3) or MPI_Init_thread(3).

Including the Open MPI-specific file <mpi-ext.h> will define the C preprocessor macro OMPI_HAVE_MPI_EXT to 1. Otherwise, it will be undefined. This macro can be used by applications as a sentinel to know whether <mpi-ext.h> has been included or not.

The Open MPI ROCm extension is built by default (regardless of whether or not Open MPI was built with ROCm support), but could have been disabled by an administrative action. It is therefore safest for applications to check that the preprocessor macro OMPI_HAVE_MPI_EXT_ROCM is defined and is set to 1 to know whether the MPIX_Query_rocm_support() function is available. Checking for this macro also protects the use of this function when compiling the application with older versions of Open MPI or other MPI implementations that do not have this function.

#include <stdio.h>
#include <mpi.h>
#include <mpi-ext.h> /* Needed for ROCm-aware check */
int main(int argc, char *argv[])
{

MPI_Init(&argc, &argv);
bool happy = false; #if defined(OMPI_HAVE_MPI_EXT_ROCM) && OMPI_HAVE_MPI_EXT_ROCM
happy = (bool) MPIX_Query_rocm_support(); #endif
if (happy) {
printf("This Open MPI installation has ROCm-aware support.\n");
} else {
printf("This Open MPI installation does not have ROCm-aware support.\n");
}
MPI_Finalize();
return 0; }


SEE ALSO:

MPIX_Query_cuda_support



2003-2025, The Open MPI Community

July 17, 2025

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.