Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Switched to BLIS+reference LAPACK.
- Loading branch information
1 parent
6dfaed8
commit 6a4d62b
Showing
7 changed files
with
98 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
if (DEFINED USE_FORTRAN) | ||
set(SPLATT_NOWARN ${USE_FORTRAN}) | ||
|
||
# Enable linking against Fortran | ||
enable_language(Fortran) | ||
|
||
# Link against a supplied Fortran library. | ||
if (DEFINED USER_FORTRAN_LIB) | ||
message(STATUS "Using user supplied Fortran library=${USER_FORTRAN_LIB}") | ||
set(SPLATT_LIBS ${SPLATT_LIBS} ${USER_FORTRAN_LIB}) | ||
|
||
# Try popular ones. | ||
else() | ||
|
||
# TODO search better | ||
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") | ||
set(SPLATT_LIBS ${SPLATT_LIBS} ifcore) | ||
else() | ||
set(SPLATT_LIBS ${SPLATT_LIBS} gfortran) | ||
endif() | ||
endif() | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,37 @@ | ||
#!/bin/bash | ||
|
||
LAPACK_VERSION=3.6.1 | ||
LAPACK_LOC=http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz | ||
|
||
if [ "$#" -eq 0 ]; then | ||
echo "usage: <build directory>"; | ||
echo "usage: <build directory> [int size]"; | ||
exit 1; | ||
fi | ||
|
||
wget ${LAPACK_LOC} --output-document=$1/lapack.tgz; | ||
|
||
pushd $1/ | ||
tar xf lapack.tgz | ||
rm lapack.tgz; | ||
BUILD_DIR=$1 | ||
mkdir -p ${BUILD_DIR} | ||
|
||
mv lapack-${LAPACK_VERSION} lapack | ||
pushd lapack | ||
cmake . | ||
make -j | ||
BISIZE=32 | ||
if [ "$#" -gt 1 ]; then | ||
BISIZE=$2 | ||
fi | ||
|
||
# | ||
# Build BLIS for its BLAS interface. | ||
# | ||
git clone https://github.com/flame/blis.git ${BUILD_DIR}/blis | ||
pushd $1/blis | ||
CC=gcc ./configure -p .. --enable-threading=openmp --blas-int-size=${BISIZE} auto | ||
make -j | ||
make install | ||
popd | ||
|
||
# | ||
# Build reference LAPACK implementation. | ||
# | ||
git clone https://github.com/Reference-LAPACK/lapack.git ${BUILD_DIR}/lapack | ||
pushd ${BUILD_DIR}/lapack | ||
# Setup LAPACK build to use BLIS. | ||
BLIS_LIB=${BUILD_DIR}/lib/libblis.a | ||
sed "s@../../librefblas.a@${BLIS_LIB}@" make.inc.example > make.inc | ||
make -j lapacklib | ||
mv liblapack.a ../lib/ | ||
popd | ||
|