Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit f54ed50

Browse files
committed
Strict compatibility with v5.4
1 parent f6409ba commit f54ed50

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

PW/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ vloc_psi_gamma_cuda_opt2.o \
5050
nls_precompute.o \
5151
5252

53-
QEMODS=../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../Modules/libqemodgpu.a
53+
QEMODS=../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../Modules/libqemodgpu.a
5454

5555
TLDEPS=bindir gpu-mods mods libs libphiGEMM libMAGMA liblapack libblas libenviron
5656

57-
LIBOBJS = ../../flib/ptools.a ../../flib/flib.a ../../clib/clib.a ../../iotk/src/libiotk.a
57+
LIBOBJS = ../../clib/clib.a ../../iotk/src/libiotk.a
5858

5959
all : tldeps pw-gpu.x
6060

install/Makefile.gpu.in

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ default :
2525
# Redirect to GPU build
2626
pw : pw-gpu
2727

28-
pw-lib : bindir mods liblapack libblas libphiGEMM libMAGMA gpu-mods libs libiotk libenviron
28+
pw-gpu : bindir mods liblapack libblas libphiGEMM libMAGMA gpu-mods libs libiotk libenviron
2929
ifeq ($(PHIGEMM_SYMBOLS),1)
3030
grep -rl -E 'gemm|GEMM' ./PW/src/*.f90 | python ./GPU/scripts/addPhigemmSymbs.py
3131
endif
3232
if test -d PW ; then \
3333
( cd PW/src ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= libpw.a ; \
34-
else $(MAKE) $(MFLAGS) TLDEPS= libpw.a ; fi ) ; fi
35-
36-
pw-gpu : bindir mods liblapack libblas libphiGEMM libMAGMA gpu-mods libs libiotk libenviron pw-lib
34+
else $(MAKE) $(MFLAGS) TLDEPS= libpw.a ; fi ) ; fi
3735
if test -d GPU/PW ; then \
3836
( cd GPU/PW ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
3937
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi ) ; fi
@@ -91,21 +89,23 @@ all-gpu : pwall-gpu cp-gpu
9189
# compile modules, libraries, directory for binaries, etc
9290
###########################################################
9391

92+
libla : touch-dummy libelpa
93+
( cd LAXlib ; $(MAKE) TLDEPS= all || exit 1 )
94+
9495
libfft : touch-dummy
9596
( cd FFTXlib ; $(MAKE) TLDEPS= all || exit 1 )
9697

97-
mods : libiotk libelpa libfft
98+
mods : libiotk libelpa libfft libla
9899
ifeq ($(PHIGEMM_SYMBOLS),1)
99100
grep -rl -E 'gemm|GEMM' ./Modules/*.f90 | python ./GPU/scripts/addPhigemmSymbs.py
101+
grep -rl -E 'gemm|GEMM' ./LAXlib/*.f90 | python ./GPU/scripts/addPhigemmSymbs.py
100102
endif
101103
( cd Modules ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
102104
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi )
103105

104106
libs : mods
105107
( cd clib ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
106108
else $(MAKE) $(MFLAGS) TLDEPS= all ; fi )
107-
( cd flib ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= $(FLIB_TARGETS) ; \
108-
else $(MAKE) $(MFLAGS) TLDEPS= $(FLIB_TARGETS) ; fi )
109109

110110
gpu-mods : mods
111111
( cd GPU/Modules ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= all ; \
@@ -208,8 +208,8 @@ links : bindir
208208
clean : clean-gpu
209209
touch make.sys
210210
for dir in \
211-
CPV FFTXlib Modules PW PH NEB \
212-
clib flib upftools \
211+
CPV LAXlib FFTXlib Modules PW PH NEB \
212+
clib upftools \
213213
dev-tools extlibs Environ \
214214
; do \
215215
if test -d $$dir ; then \
@@ -230,7 +230,7 @@ clean-gpu :
230230
touch make.sys
231231
ifeq ($(PHIGEMM_SYMBOLS),1)
232232
for dir in \
233-
CPV/src Modules PW/src PHonon/PH NEB/src \
233+
LAXlib CPV/src Modules PW/src PHonon/PH NEB/src \
234234
; do \
235235
grep -rl -E 'gemm|GEMM' $$dir/*.f90 | python ./GPU/scripts/remPhigemmSymbs.py ; \
236236
done

install/configure

+12-1
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,17 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
28792879

28802880

28812881

2882+
# Extract version
2883+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Quantum ESPRESSO version" >&5
2884+
$as_echo_n "checking Quantum ESPRESSO version... " >&6; }
2885+
version=`grep version_number ${topdir}/Modules/version.f90 | cut -d\' -f2`
2886+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5
2887+
$as_echo "$version" >&6; }
2888+
case $version in
2889+
5.4.0 ) ;;
2890+
*) as_fn_error $? "Cannot compile against this version of Quantum ESPRESSO. Use v5.4" "$LINENO" 5 ;;
2891+
esac
2892+
28822893
# many HPC systems are configured so that running parallel programs
28832894
# interactively is disabled: on those systems, AC_PROG_FC / _F77 / _CC
28842895
# would fail because they can't run the compiled executables.
@@ -9751,7 +9762,7 @@ $as_echo "$as_me: WARNING: CUDA has not been detected" >&2;}
97519762
cuda_path=`dirname $NVCC`
97529763
cuda_path=`dirname $cuda_path`
97539764

9754-
cuda_libs="-L$cuda_path/lib64 -lcublas -lcufft -lcudart"
9765+
cuda_libs="-L$cuda_path/lib64 -lcublas -lcufft -lcudart -lstdc++"
97559766

97569767
try_dflags="$try_dflags -D__CUDA"
97579768
have_cuda=1

install/configure.ac

+10-1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,15 @@ if test "$topdir" = "" ; then topdir="`pwd`/../" ; fi
243243
# check system type (no cross-compilation for now)
244244
AC_CANONICAL_BUILD
245245

246+
# Extract version
247+
AC_MSG_CHECKING([Quantum ESPRESSO version])
248+
version=`grep version_number ${topdir}/Modules/version.f90 | cut -d\' -f2`
249+
AC_MSG_RESULT([$version])
250+
case $version in
251+
5.4.0 ) ;;
252+
*) AC_MSG_ERROR([Cannot compile against this version of Quantum ESPRESSO. Use v5.4]) ;;
253+
esac
254+
246255
# many HPC systems are configured so that running parallel programs
247256
# interactively is disabled: on those systems, AC_PROG_FC / _F77 / _CC
248257
# would fail because they can't run the compiled executables.
@@ -2204,7 +2213,7 @@ then
22042213
cuda_path=`dirname $NVCC`
22052214
cuda_path=`dirname $cuda_path`
22062215

2207-
cuda_libs="-L$cuda_path/lib64 -lcublas -lcufft -lcudart"
2216+
cuda_libs="-L$cuda_path/lib64 -lcublas -lcufft -lcudart -lstdc++"
22082217

22092218
try_dflags="$try_dflags -D__CUDA"
22102219
have_cuda=1

install/make.sys.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ PHIGEMM_INTERNAL = @phigemm_switch@
161161
PHIGEMM_SYMBOLS = @phigemm_symbols@
162162
MAGMA_INTERNAL = @magma_switch@
163163

164-
LIBOBJS = ../flib/ptools.a ../flib/flib.a ../clib/clib.a ../iotk/src/libiotk.a
164+
LIBOBJS = ../flib/ptools.a ../clib/clib.a ../iotk/src/libiotk.a
165165
LIBS = $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FFT_LIBS) $(BLAS_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(LD_LIBS)
166166

167167
# wget or curl - useful to download from network

0 commit comments

Comments
 (0)