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

fix LIBBLAS_MT for FlexiBLAS, ensure -lpthread is included #4379

Merged
merged 13 commits into from
Dec 8, 2023
1 change: 1 addition & 0 deletions easybuild/toolchains/linalg/flexiblas.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class FlexiBLAS(LinAlg):
"""
BLAS_MODULE_NAME = ['FlexiBLAS']
BLAS_LIB = ['flexiblas']
BLAS_LIB_MT = ['flexiblas']
BLAS_INCLUDE_DIR = [os.path.join('include', 'flexiblas')]
BLAS_FAMILY = TC_CONSTANT_FLEXIBLAS

Expand Down
6 changes: 3 additions & 3 deletions test/framework/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


# number of modules included for testing purposes
TEST_MODULES_COUNT = 92
TEST_MODULES_COUNT = 110


class ModulesTest(EnhancedTestCase):
Expand Down Expand Up @@ -197,12 +197,12 @@ def test_avail(self):

# test modules include 3 GCC modules and one GCCcore module
ms = self.modtool.available('GCC')
expected = ['GCC/4.6.3', 'GCC/4.6.4', 'GCC/6.4.0-2.28', 'GCC/7.3.0-2.30']
expected = ['GCC/12.3.0', 'GCC/4.6.3', 'GCC/4.6.4', 'GCC/6.4.0-2.28', 'GCC/7.3.0-2.30']
# Tcl-only modules tool does an exact match on module name, Lmod & Tcl/C do prefix matching
# EnvironmentModules is a subclass of EnvironmentModulesTcl, but Modules 4+ behaves similarly to Tcl/C impl.,
# so also append GCCcore/6.2.0 if we are an instance of EnvironmentModules
if not isinstance(self.modtool, EnvironmentModulesTcl) or isinstance(self.modtool, EnvironmentModules):
expected.append('GCCcore/6.2.0')
expected.extend(['GCCcore/12.3.0', 'GCCcore/6.2.0'])
self.assertEqual(ms, expected)

# test modules include one GCC/4.6.3 module
Expand Down
42 changes: 42 additions & 0 deletions test/framework/modules/FFTW.MPI/3.3.10-gompi-2023a
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data.


More information
================
- Homepage: https://www.fftw.org
}
}

module-whatis {Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data.}
module-whatis {Homepage: https://www.fftw.org}
module-whatis {URL: https://www.fftw.org}

set root /prefix/software/FFTW.MPI/3.3.10-gompi-2023a

conflict FFTW.MPI

if { ![ is-loaded gompi/2023a ] } {
module load gompi/2023a
}

if { ![ is-loaded FFTW/3.3.10-GCC-12.3.0 ] } {
module load FFTW/3.3.10-GCC-12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
setenv EBROOTFFTWMPI "$root"
setenv EBVERSIONFFTWMPI "3.3.10"
setenv EBDEVELFFTWMPI "$root/easybuild/FFTW.MPI-3.3.10-gompi-2023a-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
43 changes: 43 additions & 0 deletions test/framework/modules/FFTW/3.3.10-GCC-12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data.


More information
================
- Homepage: https://www.fftw.org
}
}

module-whatis {Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data.}
module-whatis {Homepage: https://www.fftw.org}
module-whatis {URL: https://www.fftw.org}

set root /prefix/software/FFTW/3.3.10-GCC-12.3.0

conflict FFTW

if { ![ is-loaded GCC/12.3.0 ] } {
module load GCC/12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig
prepend-path XDG_DATA_DIRS $root/share

setenv EBROOTFFTW "$root"
setenv EBVERSIONFFTW "3.3.10"
setenv EBDEVELFFTW "$root/easybuild/FFTW-3.3.10-GCC-12.3.0-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
47 changes: 47 additions & 0 deletions test/framework/modules/FlexiBLAS/3.3.1-GCC-12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
FlexiBLAS is a wrapper library that enables the exchange of the BLAS and LAPACK implementation
used by a program without recompiling or relinking it.


More information
================
- Homepage: https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release
}
}

module-whatis {Description: FlexiBLAS is a wrapper library that enables the exchange of the BLAS and LAPACK implementation
used by a program without recompiling or relinking it.}
module-whatis {Homepage: https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release}
module-whatis {URL: https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release}

set root /prefix/software/FlexiBLAS/3.3.1-GCC-12.3.0

conflict FlexiBLAS

if { ![ is-loaded GCC/12.3.0 ] } {
module load GCC/12.3.0
}

if { ![ is-loaded OpenBLAS/0.3.23-GCC-12.3.0 ] } {
module load OpenBLAS/0.3.23-GCC-12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig
prepend-path XDG_DATA_DIRS $root/share

setenv EBROOTFLEXIBLAS "$root"
setenv EBVERSIONFLEXIBLAS "3.3.1"
setenv EBDEVELFLEXIBLAS "$root/easybuild/FlexiBLAS-3.3.1-GCC-12.3.0-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
38 changes: 38 additions & 0 deletions test/framework/modules/GCC/12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
as well as libraries for these languages (libstdc++, libgcj,...).


More information
================
- Homepage: https://gcc.gnu.org/
}
}

module-whatis {Description: The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
as well as libraries for these languages (libstdc++, libgcj,...).}
module-whatis {Homepage: https://gcc.gnu.org/}
module-whatis {URL: https://gcc.gnu.org/}

set root /prefix/software/GCC/12.3.0

conflict GCC

if { ![ is-loaded GCCcore/12.3.0 ] } {
module load GCCcore/12.3.0
}

if { ![ is-loaded binutils/2.40-GCCcore-12.3.0 ] } {
module load binutils/2.40-GCCcore-12.3.0
}

setenv EBROOTGCC "$root"
setenv EBVERSIONGCC "12.3.0"
setenv EBDEVELGCC "$root/easybuild/GCC-12.3.0-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
37 changes: 37 additions & 0 deletions test/framework/modules/GCCcore/12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
as well as libraries for these languages (libstdc++, libgcj,...).


More information
================
- Homepage: https://gcc.gnu.org/
}
}

module-whatis {Description: The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada,
as well as libraries for these languages (libstdc++, libgcj,...).}
module-whatis {Homepage: https://gcc.gnu.org/}
module-whatis {URL: https://gcc.gnu.org/}

set root /prefix/software/GCCcore/12.3.0

conflict GCCcore

prepend-path CMAKE_LIBRARY_PATH $root/lib64
prepend-path CMAKE_PREFIX_PATH $root
prepend-path LD_LIBRARY_PATH $root/lib64
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path XDG_DATA_DIRS $root/share

setenv EBROOTGCCCORE "$root"
setenv EBVERSIONGCCCORE "12.3.0"
setenv EBDEVELGCCCORE "$root/easybuild/GCCcore-12.3.0-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
38 changes: 38 additions & 0 deletions test/framework/modules/OpenBLAS/0.3.23-GCC-12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.


More information
================
- Homepage: http://www.openblas.net/
}
}

module-whatis {Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.}
module-whatis {Homepage: http://www.openblas.net/}
module-whatis {URL: http://www.openblas.net/}

set root /prefix/software/OpenBLAS/0.3.23-GCC-12.3.0

conflict OpenBLAS

if { ![ is-loaded GCC/12.3.0 ] } {
module load GCC/12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig

setenv EBROOTOPENBLAS "$root"
setenv EBVERSIONOPENBLAS "0.3.23"
setenv EBDEVELOPENBLAS "$root/easybuild/OpenBLAS-0.3.23-GCC-12.3.0-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
70 changes: 70 additions & 0 deletions test/framework/modules/OpenMPI/4.1.5-GCC-12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
The Open MPI Project is an open source MPI-3 implementation.


More information
================
- Homepage: https://www.open-mpi.org/
}
}

module-whatis {Description: The Open MPI Project is an open source MPI-3 implementation.}
module-whatis {Homepage: https://www.open-mpi.org/}
module-whatis {URL: https://www.open-mpi.org/}

set root /scratch/brussel/vo/000/bvo00005/vsc10009/ebtest/tclmodules/software/OpenMPI/4.1.5-GCC-12.3.0

conflict OpenMPI

if { ![ is-loaded GCC/12.3.0 ] } {
module load GCC/12.3.0
}

if { ![ is-loaded zlib/1.2.13-GCCcore-12.3.0 ] } {
module load zlib/1.2.13-GCCcore-12.3.0
}

if { ![ is-loaded hwloc/2.9.1-GCCcore-12.3.0 ] } {
module load hwloc/2.9.1-GCCcore-12.3.0
}

if { ![ is-loaded libevent/2.1.12-GCCcore-12.3.0 ] } {
module load libevent/2.1.12-GCCcore-12.3.0
}

if { ![ is-loaded UCX/1.14.1-GCCcore-12.3.0 ] } {
module load UCX/1.14.1-GCCcore-12.3.0
}

if { ![ is-loaded libfabric/1.18.0-GCCcore-12.3.0 ] } {
module load libfabric/1.18.0-GCCcore-12.3.0
}

if { ![ is-loaded PMIx/4.2.4-GCCcore-12.3.0 ] } {
module load PMIx/4.2.4-GCCcore-12.3.0
}

if { ![ is-loaded UCC/1.2.0-GCCcore-12.3.0 ] } {
module load UCC/1.2.0-GCCcore-12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig
prepend-path XDG_DATA_DIRS $root/share

setenv EBROOTOPENMPI "$root"
setenv EBVERSIONOPENMPI "4.1.5"
setenv EBDEVELOPENMPI "$root/easybuild/OpenMPI-4.1.5-GCC-12.3.0-easybuild-devel"

setenv SLURM_MPI_TYPE "pmix"
# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
1 change: 1 addition & 0 deletions test/framework/modules/PMIx/4.2.4-GCCcore-12.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#%Module
43 changes: 43 additions & 0 deletions test/framework/modules/ScaLAPACK/2.2.0-gompi-2023a-fb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#%Module
proc ModulesHelp { } {
puts stderr {

Description
===========
The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines
redesigned for distributed memory MIMD parallel computers.


More information
================
- Homepage: https://www.netlib.org/scalapack/
}
}

module-whatis {Description: The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines
redesigned for distributed memory MIMD parallel computers.}
module-whatis {Homepage: https://www.netlib.org/scalapack/}
module-whatis {URL: https://www.netlib.org/scalapack/}

set root /prefix/software/ScaLAPACK/2.2.0-gompi-2023a-fb

conflict ScaLAPACK

if { ![ is-loaded gompi/2023a ] } {
module load gompi/2023a
}

if { ![ is-loaded FlexiBLAS/3.3.1-GCC-12.3.0 ] } {
module load FlexiBLAS/3.3.1-GCC-12.3.0
}

prepend-path CMAKE_PREFIX_PATH $root
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig

setenv EBROOTSCALAPACK "$root"
setenv EBVERSIONSCALAPACK "2.2.0"
setenv EBDEVELSCALAPACK "$root/easybuild/ScaLAPACK-2.2.0-gompi-2023a-fb-easybuild-devel"

# Built with EasyBuild version 4.9.0.dev0-rea8433dcf5e6edea3e72ad9bd9e23023ecc6b228
Loading
Loading