Skip to content

Commit

Permalink
SCALAPACK: AOCL-3.2 release version and documents updation
Browse files Browse the repository at this point in the history
1. Scalapack version API updated for 3.2
2. AOCL-Progress README document updated in <aocl-scalapack>/EXAMPLE/aocl_progress_example/README.txt.
3. README_ScaLAPACK_AMD file added in the '<aocl-scalapack>/' folder.

Change-Id: I199c3920418b20dd75354b15a994d0771719ca7f
  • Loading branch information
nprasadm committed May 26, 2022
1 parent e1cfef0 commit b56bb66
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 16 deletions.
60 changes: 60 additions & 0 deletions EXAMPLE/aocl_progress_example/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Checking AOCL-ScaLAPACK Operation Progress

AOCL libraries may be used to perform lengthy computations (for example, matrix multiplications, solver involving large matrices). These operations/computations may go on for hours.

AOCL progress feature provides mechanism for the application to check how far the computations have progressed. Selected set of APIs of AOCL libraries periodically updates the application with progress made so far via a callback function.

Usage:

The Application needs to define a callback function in specific format and register this callback function with the AOCL-ScaLAPACK library.

The callback function prototype must be as defined below.
int aocl_scalapack_progress(
char* api,
integer lenapi,
integer *progress,
integer *mpi_rank,
integer *total_mpi_processes
)


The table below explains various parameters
Parameters | Purpose
---------------------------------------------------------------------
api | Name of the API which is currently running
lenapi | Length of API name character buffer
progress | Linear progress made in 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 library for it to report the progress.

aocl_scalapack_set_progress(aocl_scalapack_progress);

Example:
int aocl_scalapack_progress(char* api, int *lenapi, int *progress, int *mpi_rank, 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;
}

Limitations
- AOCL-ScALAPACK Progress feature is currently supported only on Linux


Procedure to build and run the sample application with aocl progress feature:
=============================================================================

1) copy below AOCL libraries to the "<aocl-scalapack>/EXAMPLE/aocl_progress_example/" folder:
1) libscalapack.a
2) libflame.a
3) blis-mt.a

2) Run the below command to build the 'pdgetrf' test application with 'aocl-progress' feature.
mpicc -O0 -g pdgerf_example_app.c libscalapack.a libflame.a -fopenmp libblis-mt.a -lm -lgfortran -o test

3) Run the below commands to run the application:
Ex: mpirun -np 4 ./test 32 8 2 2
mpirun -np 8 ./test 1024 32 4 2
14 changes: 0 additions & 14 deletions EXAMPLE/aocl_progress_example/Readme.txt

This file was deleted.

1 change: 1 addition & 0 deletions README.md
48 changes: 48 additions & 0 deletions README_ScaLAPACK_AMD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

AOCL-ScaLAPACK
===============================================================================
ScaLAPACK, or Scalable LAPACK, is a library of high performance linear algebra
routines for distributed memory computers supporting MPI.

AOCL-ScaLAPACK is the optimized version of ScaLAPACK for AMD EPYC family of
processors.

===============================================================================

1. Install MPI library and set the PATH and LD_LIBRARY_PATH environment
variables to point to installed binaries.
eg. export PATH=<path to MPI install directory>/bin:$PATH
eg. export LD_LIBRARY_PATH=<path to MPI install directory>/lib:$LD_LIBRARY_PATH

2. Download AMD optimized versions of BLIS and libFLAME from following link
https://developer.amd.com/amd-aocl/

3. Install latest CMAKE tool.

4. Install AOCL-BLIS and AOCL-libFLAME libraries either using pre-built binaries or build
from source.
To build AOCL-BLIS and AOCL-libFLAME from source, clone from following github links
BLIS: https://github.com/amd/blis
libFLAME: https://github.com/amd/libflame

5. Steps to build the AOCL-ScaLAPACK library and the test suite:

a. Create a new directory. For example, build:
$ mkdir build
$ cd build

b. Set PATH and LD_LIBRARY_PATH appropriately to the MPI installation.

c. To Build the AOCL-ScaLAPACK library and the test suite, Run the below commands:
$ cmake .. -DBUILD_SHARED_LIBS=OFF -DBLAS_LIBRARIES="-fopenmp <path to AOCL-BLIS library>/libblis-mt.a"
-DLAPACK_LIBRARIES="<path to AOCL-libFLAME library>/libflame.a"
-DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90
-DUSE_OPTIMIZED_LAPACK_BLAS=OFF [-D DENABLE_ILP64=ON]
$ make -j

This command generates the AOCL-ScaLAPACK library in the 'build/lib' folder and test applications in the 'build/TESTING' folder.

4. To Run the AOCL-ScaLAPACK test suite, Run the below script in the 'build/' folder:
cp -f ../scalapack_test.sh .
./scalapack_test.sh
Test logs will be generated in 'ScalaPack_TestResults.txt'.
4 changes: 2 additions & 2 deletions SRC/get_aocl_scalapack_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ void get_aocl_scalapack_version_( version )
#endif
{
/*
* version = "AOCL-ScaLAPACK 3.1.2, Supports Netlib ScaLAPACK 2.1.0"
* version = "AOCL-ScaLAPACK 3.2, Supports Netlib ScaLAPACK 2.1.0"
*/
strcpy(version, "AOCL-ScaLAPACK 3.1.2, supports ScaLAPACK 2.1.0");
strcpy(version, "AOCL-ScaLAPACK 3.2, supports ScaLAPACK 2.1.0");

return;
}
Expand Down

0 comments on commit b56bb66

Please sign in to comment.