Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable use of IBM XL compilers with openMP Offload support #605

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

oseikuffuor1
Copy link
Collaborator

This PR applies code changes to enable building BML with IBM compilers and openMP offload support.

  • Build requires setting "BML_COMPLEX =no" to avoid linker issues.
  • Tested on Lassen

@jmohdyusof
Copy link
Collaborator

We have a lot of divergence in the code because the IBM compiler doesn't deal with firstprivate correctly. Is there a performance penalty for this version of the code, or could we improve code readability by simply using the IBM style declaration of shared arrays everywhere?

@jeanlucf22
Copy link
Collaborator

@oseikuffuor1 could you add the build script you use for IBM XL?

@jeanlucf22
Copy link
Collaborator

Some tests fail for me on Summit. I build BML like this:
module load cmake
module load cuda
module load essl
module load netlib-lapack

MY_PATH=$(pwd)

#set BLAS explicitly, otherwise cmake will pick the serial version of essl
export BLAS_LIBRARIES=${BLAS_LIBRARIES:="$OLCF_ESSL_ROOT/lib64/libesslsmp.so"}
#since essl does not contain all the lapack functions needed, we still need lapack
export LAPACK_LIBRARIES=${LAPACK_LIBRARIES:="$OLCF_NETLIB_LAPACK_ROOT/lib64/liblapack.so"}

export CC=${CC:=mpicc}
export FC=${FC:=mpif90}
export CXX=${CXX:=mpicxx}

export BML_OPENMP=${BML_OPENMP:=yes}
export BML_OMP_OFFLOAD=${BML_OMP_OFFLOAD:=yes}
export BML_CUSPARSE=${BML_CUSPARSE:=yes}
export BML_COMPLEX=${BML_COMPLEX:=no}
export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"}
export BML_TESTING=${BML_TESTING:=yes}
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}

@jeanlucf22
Copy link
Collaborator

Actually, with that build script, there was no OpenMP offload. After fixing it, it passes the tests

@nicolasbock nicolasbock merged commit c6bfe81 into lanl:master Apr 7, 2022
@oseikuffuor1 oseikuffuor1 deleted the xl-gpu-offload branch April 7, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants