MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
239 stars 319 forks source link

Include OpenACC device info in mpas_framework_report_settings output #1164

Closed mgduda closed 5 months ago

mgduda commented 5 months ago

This PR introduces changes to include OpenACC device information in the log output from the mpas_framework_report_settings routine.

If MPAS is compiled with OPENACC=true, the mpas_framework_report_settings routine now calls a new private routine, report_acc_devices, in mpas_framework to report information about OpenACC devices to the log. The report_acc_devices routine uses the OpenACC runtime library to inquire about the number of available devices, the device number for the calling MPI task, and info about the device type and driver. As an example from Derecho with the NVHPC 24.3 compilers, the following information is reported in the log file:

 OpenACC configuration:
   Number of visible devices: 1
   Device # for this MPI task: 0
   Device vendor: NVIDIA
   Device name: NVIDIA A100-SXM4-40GB
   Device driver version: 12020

If MPAS is not compiled with OPENACC=true, then the report_acc_devices routine, and the call to it from mpas_framework_report_settings, are pre-processed out.