Skip to content

Commit

Permalink
GNU-based build w/ GPU-support (ELPA).
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Oct 25, 2024
1 parent ae8be2b commit bdde016
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 27 deletions.
23 changes: 14 additions & 9 deletions config/elpa/configure-elpa-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ if [ "${HERE}" = "${DEST}" ]; then
fi
fi

INTEL=0
if [ "0" != "${GPU}" ] && [ "0" != "${INTEL}" ] && [ -e "${HERE}/configure-elpa.sh" ] && \
[ "$(command -v icpx)" ] && [ "$(command -v icx)" ] && [ "$(command -v ifx)" ];
then
export INTEL=0
eval "${HERE}/configure-elpa.sh ${PRFX}"
exit $?
eval "${HERE}/configure-elpa.sh"
if make -j "$(nproc)" && make install; then INTEL=2; fi
make clean
fi

# attempt to detect MKLROOT
Expand Down Expand Up @@ -128,11 +129,15 @@ if [ -e "${HERE}/config.h" ]; then
ln -s ${ELPA}-${VERSION} elpa
cd ${CWD}
fi
mkdir -p ${DEST}/lib
cd ${DEST}/lib
ln -fs libelpa_openmp.so libelpa.so
ln -fs libelpa_openmp.a libelpa.a
ln -fs libelpa.so libelpa_mt.so
ln -fs libelpa.a libelpa_mt.a
if [ "0" != "${INTEL}" ]; then
SRCDIR=${HERE}/../elpa/intel
else
SRCDIR=.
fi
mkdir -p ${DEST}/lib && cd ${DEST}/lib
ln -fs ${SRCDIR}/libelpa_openmp.so libelpa.so
ln -fs ${SRCDIR}/libelpa_openmp.a libelpa.a
ln -fs ${SRCDIR}/libelpa.so libelpa_mt.so
ln -fs ${SRCDIR}/libelpa.a libelpa_mt.a
fi
fi
22 changes: 13 additions & 9 deletions config/elpa/configure-elpa-hsw-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ fi
if [ "0" != "${GPU}" ] && [ "0" != "${INTEL}" ] && [ -e "${HERE}/configure-elpa-hsw.sh" ] && \
[ "$(command -v icpx)" ] && [ "$(command -v icx)" ] && [ "$(command -v ifx)" ];
then
export INTEL=0
eval "${HERE}/configure-elpa-hsw.sh ${PRFX}"
exit $?
eval "${HERE}/configure-elpa-hsw.sh"
if make -j "$(nproc)" && make install; then INTEL=2; fi
make clean
fi

# attempt to detect MKLROOT
Expand Down Expand Up @@ -120,11 +120,15 @@ if [ -e "${HERE}/config.h" ]; then
ln -s ${ELPA}-${VERSION} elpa
cd ${CWD}
fi
mkdir -p ${DEST}/lib
cd ${DEST}/lib
ln -fs libelpa_openmp.so libelpa.so
ln -fs libelpa_openmp.a libelpa.a
ln -fs libelpa.so libelpa_mt.so
ln -fs libelpa.a libelpa_mt.a
if [ "0" != "${INTEL}" ]; then
SRCDIR=${HERE}/../elpa/intel
else
SRCDIR=.
fi
mkdir -p ${DEST}/lib && cd ${DEST}/lib
ln -fs ${SRCDIR}/libelpa_openmp.so libelpa.so
ln -fs ${SRCDIR}/libelpa_openmp.a libelpa.a
ln -fs ${SRCDIR}/libelpa.so libelpa_mt.so
ln -fs ${SRCDIR}/libelpa.a libelpa_mt.a
fi
fi
22 changes: 13 additions & 9 deletions config/elpa/configure-elpa-skx-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ fi
if [ "0" != "${GPU}" ] && [ "0" != "${INTEL}" ] && [ -e "${HERE}/configure-elpa-skx.sh" ] && \
[ "$(command -v icpx)" ] && [ "$(command -v icx)" ] && [ "$(command -v ifx)" ];
then
export INTEL=0
eval "${HERE}/configure-elpa-skx.sh ${PRFX}"
exit $?
eval "${HERE}/configure-elpa-skx.sh"
if make -j "$(nproc)" && make install; then INTEL=2; fi
make clean
fi

# attempt to detect MKLROOT
Expand Down Expand Up @@ -120,11 +120,15 @@ if [ -e "${HERE}/config.h" ]; then
ln -s ${ELPA}-${VERSION} elpa
cd ${CWD}
fi
mkdir -p ${DEST}/lib
cd ${DEST}/lib
ln -fs libelpa_openmp.so libelpa.so
ln -fs libelpa_openmp.a libelpa.a
ln -fs libelpa.so libelpa_mt.so
ln -fs libelpa.a libelpa_mt.a
if [ "0" != "${INTEL}" ]; then
SRCDIR=${HERE}/../elpa/intel
else
SRCDIR=.
fi
mkdir -p ${DEST}/lib && cd ${DEST}/lib
ln -fs ${SRCDIR}/libelpa_openmp.so libelpa.so
ln -fs ${SRCDIR}/libelpa_openmp.a libelpa.a
ln -fs ${SRCDIR}/libelpa.so libelpa_mt.so
ln -fs ${SRCDIR}/libelpa.a libelpa_mt.a
fi
fi

0 comments on commit bdde016

Please sign in to comment.