15.3.1. Checking AOCL-ScaLAPACK Operation Progress - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

AOCL libraries perform tasks that can be computationally expensive. The AOCL Progress feature provides a mechanism, for a selected set of APIs, for the application to check how far a computation has progressed through a callback function.

Usage

The application must define a callback function in a specific format and register this callback function with the AOCL-ScaLAPACK library.

The callback function prototype must be defined as follows:

int aocl_scalapack_progress(
   const char* api, const integer *lenapi,
   const integer *progress, const integer *mpi_rank,
   const integer *total_mpi_processes)

The following table explains AOCL-ScaLAPACK Progress feature callback function parameters:

Table 15.4 AOCL-ScaLAPACK Progress Feature Callback Function Parameters#

Parameter

Purpose

api

Name of the API running currently

lenapi

Length of the API name character buffer

progress

Linear progress made in the current thread so far

mpi_rank

Current process rank

total_mpi_processes

Total number of processes used to perform the operation

Callback Registration

The callback function must be registered with the library to report the progress:

aocl_scalapack_set_progress(aocl_scalapack_progress);

Example:

int AOCL_progress(const char* const api, const int *lenapi, const
  int *progress, const int *mpi_rank, const int *total_mpi_processes)
{
  printf( "In AOCL Progress MPI Rank: %i API: %s progress: %i MPI processes: %i\n",
    *mpi_rank, api, *progress, *total_mpi_processes);
  return 0;
}

Limitation

Currently, AOCL-ScaLAPACK progress feature is supported only on Linux.