Skip to content

Commit

Permalink
used env variable to set blas lapack.
Browse files Browse the repository at this point in the history
  • Loading branch information
CusiniM committed Jun 26, 2024
1 parent 5aec7a9 commit c06c7ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/tpl-rockylinux-clang-cuda-12.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ ENV CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
MPICC=/usr/lib64/openmpi/bin/mpicc \
MPICXX=/usr/lib64/openmpi/bin/mpicxx \
MPIEXEC=/usr/lib64/openmpi/bin/mpirun
MPIEXEC=/usr/lib64/openmpi/bin/mpirun \
BLAS_LIBRARIES="/usr/lib64/libblas.so.3.8.0" \
LAPACK_LIBRARIES="/usr/lib64/liblapack.so.3.8.0"

ENV OMPI_CC=$CC \
OMPI_CXX=$CXX
Expand Down Expand Up @@ -90,9 +92,7 @@ RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/configure-tpl.sh \
-DCUDA_TOOLKIT_ROOT_DIR=$CUDA_TOOLKIT_ROOT_DIR \
-DCUDA_ARCH=$CUDA_ARCH \
-DCMAKE_CUDA_ARCHITECTURES=$CMAKE_CUDA_ARCHITECTURES \
-DCMAKE_CUDA_COMPILER=$CMAKE_CUDA_COMPILER \
-DBLAS_LIBRARIES="/usr/lib64/libblas.so.3.8.0" \
-DLAPACK_LIBRARIES="/usr/lib64/liblapack.so.3.8.0"
-DCMAKE_CUDA_COMPILER=$CMAKE_CUDA_COMPILER

# Set the working directory
WORKDIR $BLD_DIR
Expand Down
8 changes: 8 additions & 0 deletions host-configs/environment.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ set(MPI_C_COMPILER "$ENV{MPICC}" CACHE PATH "" FORCE)
set(MPI_CXX_COMPILER "$ENV{MPICXX}" CACHE PATH "" FORCE)
set(MPI_Fortran_COMPILER "$ENV{MPIFC}" CACHE PATH "" FORCE)
set(MPIEXEC_EXECUTABLE "$ENV{MPIEXEC}" CACHE PATH "" FORCE)

if ( $ENV{BLAS_LIBRARIES} )
set( BLAS_LIBRARIES "$ENV{BLAS_LIBRARIES}" CACHE PATH "" FORCE )
endif()

if ($ENV{LAPACK_LIBRARIES})
set( LAPACK_LIBRARIES "$ENV{LAPACK_LIBRARIES}" CACHE PATH "" FORCE )
endif()

0 comments on commit c06c7ab

Please sign in to comment.