Skip to content

Commit

Permalink
Merge pull request #4 from RSE-Cambridge/fix-build-process
Browse files Browse the repository at this point in the history
Fix build process: autoconf deprecated and templates provided
  • Loading branch information
fspiga authored Jul 1, 2017
2 parents 9d25bf6 + e7b6208 commit 3d239f5
Show file tree
Hide file tree
Showing 49 changed files with 229 additions and 12,833 deletions.
23 changes: 8 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ default :
# If "|| exit 1" is not present, the error code from make in subdirectories
# is not returned and make goes on even if compilation has failed

pw : bindir libfft libla mods liblapack libs libiotk
pw : bindir libfft libla mods libs libiotk
if test -d PW ; then \
( cd PW ; $(MAKE) TLDEPS= all || exit 1) ; fi

pw-lib : bindir libfft libla mods liblapack libs libiotk
pw-lib : bindir libfft libla mods libs libiotk
if test -d PW ; then \
( cd PW ; $(MAKE) TLDEPS= pw-lib || exit 1) ; fi

Expand Down Expand Up @@ -117,7 +117,7 @@ all : pw
# compile modules, libraries, directory for binaries, etc
###########################################################

libla : touch-dummy libeigensolver_gpu liblapack
libla : touch-dummy libeigensolver_gpu
( cd LAXlib ; $(MAKE) TLDEPS= all || exit 1 )

libfft : touch-dummy
Expand All @@ -139,10 +139,10 @@ bindir :
# Targets for external libraries
############################################################

libblas : liblapack
#libblas : liblapack

liblapack: touch-dummy
cd install ; $(MAKE) -f extlibs_makefile $@
#liblapack: touch-dummy
# cd install ; $(MAKE) -f extlibs_makefile $@

libeigensolver_gpu: touch-dummy
cd install ; $(MAKE) -f extlibs_makefile $@
Expand Down Expand Up @@ -213,19 +213,12 @@ clean :
veryclean : clean
- @(cd install ; $(MAKE) -f extlibs_makefile veryclean)
- rm -rf install/patch-plumed
- cd install ; rm -f config.log configure.msg config.status \
CPV/version.h ChangeLog* intel.pcl */intel.pcl
- rm -rf include/configure.h install/make_wannier90.inc
- cd install ; rm -fr autom4te.cache
- cd pseudo; ./clean_ps ; cd -
- cd install ; rm -f CPV/version.h ChangeLog* intel.pcl */intel.pcl
- cd install; ./clean.sh ; cd -
- cd include; ./clean.sh ; cd -
- rm -f espresso.tar.gz
- rm -rf make.inc
# - rm -rf make.inc

# remove everything not in the original distribution
distclean : veryclean
# ( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )

tar :
@if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi
Expand Down
4 changes: 4 additions & 0 deletions Modules/environment.f90
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ SUBROUTINE parallel_info ( )
WRITE( stdout, '(/5X,"Parallel version (MPI), running on ",&
&I5," processors")' ) nproc
#endif
#if defined(USE_CUDA)
WRITE( stdout, '(/5X,"GPU accelerated version",/5x)')
#endif
!
#if defined(USE_CUDA)
WRITE( stdout, '(/5X,"GPU accelerated version",/5x)')
#endif
Expand Down
1 change: 0 additions & 1 deletion Modules/make.depend
Original file line number Diff line number Diff line change
Expand Up @@ -489,4 +489,3 @@ xsf.o : kind.o
ylmr2.o : constants.o
ylmr2.o : kind.o
zdotc_wrapper.o : kind.o
environment.o : ../include/configure.h
8 changes: 8 additions & 0 deletions PW/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,18 @@ wannier_occ.o \
wannier_enrg.o \
wyckoff.o


QEMODS=../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a

TLDEPS=bindir mods libs liblapack libblas

# If F90FLAGS_WORKAROUND is defined some files are compiled differently
# # as workaround for compiler bugs
ifdef F90FLAGS_WORKAROUND
read_file_new.o pw_restart.o :
$(MPIF90) $(F90FLAGS_WORKAROUND) -c $(*).f90 -o $(*).o
endif

all : tldeps pw.x manypw.x generate_vdW_kernel_table.x generate_rVV10_kernel_table.x

pw.x : $(PWOBJS) libpw.a $(LIBOBJS) $(QEMODS)
Expand Down
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,18 @@ strongly recommend for its memory capacity and performance.
This version of QE-GPU runs **exclusively** in parallel, Open MPI is required
and also Intel MKL.

### Installation

The installation process follows the same procedure as Quantum ESPRESSO suite:
### Installation

```
./configure --enable-gpu
make pw
```
To compile QE-GPU, copy a `make.inc` template from "install/" directory into the main directory and run make.

"make" alone prints a list of acceptable targets with various level of GPU
support. Binaries go in "bin/". Additional configure options are made
available to customize the building process:
These make.inc templates are available:
* `make.inc_x86-64` to compile on any x86-64 machines with NVIDIA GPU (`GPU_ARCH={35, 60}`)
* `make.inc_x86-64_CPU-only` to compile on x86-64 without GPU support
* `make.inc_CRAY_PizDaint` to compile on Piz Daint at CSCS, CRAY XC30 with P100 PCI GPU support (`GPU_ARCH=60`)
* `make.inc_POWER_DAVIDE` to compile on PRACE D.A.V.I.D.E. at E4, POWER8 system with GPU support (`GPU_ARCH=60`)

* `--enable-gpu=<kepler|pascal>` to enable GPU support (default: "pascal"
architecture selected)
By invoking _make_ alone a list of acceptable targets will be displayed. Binaries go in "bin/". Read comments in the `make.inc` templates to customize it further based on your ebvironment and where math libraries are located. The architectures/environments supported are x86-64, POWER and CRAY.

The QE-GPU package has been reduced in size to the minimum essential. For more
information, please refer to the general documentation provided with the full
Expand Down
74 changes: 0 additions & 74 deletions configure

This file was deleted.

22 changes: 22 additions & 0 deletions include/c_defs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* include/c_defs.h. Generated from c_defs.h.in by configure. */
/*
Copyright (C) 2006 Quantum-ESPRESSO group
This file is distributed under the terms of the
GNU General Public License. See the file `License'
in the root directory of the present distribution,
or http://www.gnu.org/copyleft/gpl.txt .
*/

/* File c_defs.h.in is used by configure to generate c_defs.h
Variables that configure defines should be #undef-ined in
include/c_defs.h.in !!! */

/* fortran-to-C naming convention, for functions with and without
underscores in the name (some compilers treat them differently) */

#define F77_FUNC(name,NAME) name ## _
#define F77_FUNC_(name,NAME) name ## _

/* do we have the mallinfo structure (see clib/memstat.c) ? */

#define HAVE_MALLINFO 1
47 changes: 0 additions & 47 deletions include/configure.h.in

This file was deleted.

2 changes: 2 additions & 0 deletions include/fft_defs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#define C_POINTER integer*8
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FLAGS = -O3 -mp -pgf90libs -Mcuda=cc@gpu_arch_num@,cuda8.0,ptxinfo,maxregcount:64 -Mlarge_arrays
CUFLAGS = -O3 -arch=sm_@gpu_arch_num@
FLAGS2 = -O3 -mp -pgf90libs -Mcuda=cc@gpu_arch_num@,cuda8.0,ptxinfo,maxregcount:64,nollvm -Mlarge_arrays
include ../../make.inc

FLAGS = -O3 -mp -pgf90libs -Mcuda=cc$(GPU_ARCH),cuda8.0,ptxinfo,maxregcount:64 -Mlarge_arrays
CUFLAGS = -O3 -arch=sm_$(GPU_ARCH)
FLAGS2 = -O3 -mp -pgf90libs -Mcuda=cc$(GPU_ARCH),cuda8.0,ptxinfo,maxregcount:64,nollvm -Mlarge_arrays
#OPTFLAGS = -DUSE_NVTX

.NOTPARALLEL: all
Expand All @@ -20,4 +22,4 @@ lib_eigsolve.a: $(OBJS)
ar -cr lib_eigsolve.a $(OBJS)

clean:
rm lib_eigsolve.a *.mod *.o
rm -f lib_eigsolve.a *.mod *.o
35 changes: 0 additions & 35 deletions install/aclocal.m4

This file was deleted.

Loading

0 comments on commit 3d239f5

Please sign in to comment.