.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MPIX_QUERY_ROCM_SUPPORT" "3" "May 13, 2024" "" "Open MPI" .sp \fBMPIX_Query_rocm_support\fP \- Returns 1 if there is AMD ROCm\-aware support and 0 if there is not. .SH SYNTAX .SS C Syntax .INDENT 0.0 .INDENT 3.5 .sp .EX #include #include int MPIX_Query_rocm_support(void) .EE .UNINDENT .UNINDENT .SS Fortran Syntax .sp There is no Fortran binding for this function. .SS C++ Syntax .sp There is no C++ binding for this function. .SH DESCRIPTION .sp This function is part of an \fI\%Open MPI extension\fP; it is not part of standard MPI. .sp 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 \fI\%MPI_Init(3)\fP or \fI\%MPI_Init_thread(3)\fP\&. .sp Including the Open MPI\-specific file \fB\fP will define the C preprocessor macro \fBOMPI_HAVE_MPI_EXT\fP to \fB1\fP\&. Otherwise, it will be undefined. This macro can be used by applications as a sentinel to know whether \fB\fP has been included or not. .sp The Open MPI ROCm extension is built by default (regardless of whether or not Open MPI was built with ROCm support), but \fIcould\fP have been disabled by an administrative action. It is therefore safest for applications to check that the preprocessor macro \fBOMPI_HAVE_MPI_EXT_ROCM\fP is defined and is set to 1 to know whether the \fBMPIX_Query_rocm_support()\fP 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. .SS EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX #include #include #include /* 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(\(dqThis Open MPI installation has ROCm\-aware support.\en\(dq); } else { printf(\(dqThis Open MPI installation does not have ROCm\-aware support.\en\(dq); } MPI_Finalize(); return 0; } .EE .UNINDENT .UNINDENT .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fI\%MPIX_Query_cuda_support\fP .UNINDENT .UNINDENT .UNINDENT .SH COPYRIGHT 2003-2024, The Open MPI Community .\" Generated by docutils manpage writer. .