Skip to content

Commit

Permalink
Modified dgemm build instructions for cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmageeLANL committed Dec 5, 2023
1 parent 9d87671 commit 5abc100
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions doc/sphinx/09_Microbenchmarks/M5_DGEMM/DGEMM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,34 @@ Run Rules
Building
========

Makefiles are provided for the intel and gcc compilers. Before building, load the compiler and blas libraries into the PATH and LD_LIBRARY_PATH.
Load the compiler; make and enter a build directory.

.. code-block:: bash
cd src
make CFLAGS=-I<openblas_include_dir>
cmake -DBLAS_NAME=<blas library name> ..
make
..
If using a different compiler, copy and modify the simple makefiles to apply the appropriate flags.

If using a different blas library than mkl or openblas, modify the C source file to use the correct header and dgemm command.
Current `BLAS_NAME` options are mkl, cblas (openblas), essl, or the raw coded (OpenMP threaded) dgemm.
The `BLAS_NAME` argument is required.
If the headers or libraries aren't found provide `BLAS_LIB_DIR`, `BLAS_INCLUDE_DIR`, or `BLAS_ROOT` to cmake.
If using a different blas library, modify the C source file to use the correct header and dgemm command.

Running
=======

DGEMM uses OpenMP but does not use MPI.

Set the number of OpenMP threads before running.
Set the number of OpenMP threads and other OMP characteristics with export.
The following were used for the Crossroads (:ref:`GlobalSystemATS3`) system.

.. code-block:: bash
export OPENBLAS_NUM_THREADS=<nthreads>
export OPENBLAS_NUM_THREADS=<nthreads> #MKL INHERITS FROM OMP_NUM_THREADS.
export OMP_NUM_THREADS=<nthreads>
export OMP_PLACES=cores
export OMP_PROC_BIND=close
..
Expand Down

0 comments on commit 5abc100

Please sign in to comment.