Merge pull request #272 from OrderN/ic-system-make
Version Control system.make for different machines
This commit is contained in:
commit
00329bba12
|
@ -62,8 +62,7 @@ jobs:
|
|||
- name: Build
|
||||
working-directory: ${{github.workspace}}/src
|
||||
run: |
|
||||
cp gha.make system.make
|
||||
make -j ${{matrix.np}}
|
||||
make -j ${{matrix.np}} SYSTEM=gha
|
||||
|
||||
- name: Run test 001
|
||||
working-directory: ${{github.workspace}}/testsuite/test_001_bulk_Si_1proc_Diag
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
bin/*
|
||||
deps.obj.inc
|
||||
*~
|
||||
*~
|
||||
src/system/system.make
|
|
@ -44,8 +44,14 @@ a working MPI installation including a Fortran90 compiler (often
|
|||
Additionally, Conquest can use LibXC if it is available (v2.x or
|
||||
later).
|
||||
|
||||
The library locations are set in the ``system.make`` file in the ``src/``
|
||||
directory, along with other parameters needed for compilation.
|
||||
The library locations are set in the ``system.<systemname>.make`` file in the ``src/system``
|
||||
directory, along with other parameters needed for compilation. ``system.<systemname>.make``
|
||||
files are provided for some HPC systems used by the community, but if you want to run
|
||||
locally or on a different system, you need to provide an appropriate ``system.<systemname>.make``
|
||||
file. Use ``src/system/system.example.make`` as a starting point. Get the ``<systemname>``
|
||||
by running ``hostname -d`` in your prompt, then name your file appropriately and move it to
|
||||
the ``src/system`` directory. If ``hostname -d`` returns empty (e.g. you are running on a
|
||||
local machine), the system-specific makefile should be named ``system.make``.
|
||||
|
||||
* ``FC`` (typically ``FC=mpif90`` will be all that is required)
|
||||
* ``COMPFLAGS`` (set these to specify compiler options such as
|
||||
|
|
24
src/Makefile
24
src/Makefile
|
@ -24,7 +24,19 @@ MULT_KERN = default
|
|||
DIAG_DUMMY =
|
||||
|
||||
#Include system-dependent variables
|
||||
include system.make
|
||||
#Get the system name automatically.
|
||||
SYSTEM = $(shell hostname -d)
|
||||
ifneq ($(SYSTEM),)
|
||||
SYSTEM_PATH = system/system.$(SYSTEM).make
|
||||
else
|
||||
SYSTEM_PATH = system/system.make
|
||||
endif
|
||||
ifneq ("$(wildcard $(SYSTEM_PATH))","")
|
||||
$(info Building on SYSTEM $(SYSTEM), using makefile $(SYSTEM_PATH))
|
||||
include $(SYSTEM_PATH)
|
||||
else
|
||||
$(error Cannot find $(SYSTEM_PATH) file for system $(SYSTEM). Please make one, using system/system.example.make as an example)
|
||||
endif
|
||||
|
||||
#Include lists of object files
|
||||
include matrix.obj
|
||||
|
@ -53,7 +65,7 @@ NODE_OBJECTS_NODS = main.o datatypes_module.o numbers_module.o
|
|||
SRCS_NODS = $(NODE_OBJECTS_NODS:.o=.f90) basic_types.f90 datatypes_module.f90 matrix_data_module.f90 numbers_module.f90
|
||||
|
||||
#Dependency rule
|
||||
deps.obj.inc: $(SRCS_NODS) system.make
|
||||
deps.obj.inc: $(SRCS_NODS) $(SYSTEM_PATH)
|
||||
touch $(COMMENT)
|
||||
$(ECHOSTR) "module datestamp" > datestamp.f90
|
||||
$(ECHOSTR) " implicit none" >> datestamp.f90
|
||||
|
@ -92,7 +104,7 @@ initial_read_module.o:initial_read_module.f90 datestamp.o
|
|||
# $(FC) $(COMPFLAGS) -c datestamp.f90
|
||||
|
||||
tar:
|
||||
tar cvf ../$(TARNAME) *.f *.f90 *.obj Makefile* makemake system.make system/*.make FFT/*.f FFT/Makefile template* utilities/*f90 utilities/Makefile
|
||||
tar cvf ../$(TARNAME) *.f *.f90 *.obj Makefile* makemake $(SYSTEM_PATH) system/*.make FFT/*.f FFT/Makefile template* utilities/*f90 utilities/Makefile
|
||||
gzip ../$(TARNAME)
|
||||
|
||||
clean:
|
||||
|
@ -141,7 +153,7 @@ notimers:
|
|||
grep -vi 'timer_' $${objectfile} > $(NOTIMERS_DIR)/$${objectfile}; \
|
||||
done
|
||||
@rm -f $(NOTIMERS_DIR)/timer_*.f90
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake system.make $(NOTIMERS_DIR)/
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake $(SYSTEM_PATH) $(NOTIMERS_DIR)/
|
||||
@echo "New sources without timers are in $(NOTIMERS_DIR)"
|
||||
|
||||
nostdtimers:
|
||||
|
@ -159,7 +171,7 @@ nostdtimers:
|
|||
grep -vi 'timer_std' $${objectfile} > $(NOSTDTIMERS_DIR)/$${objectfile}; \
|
||||
done
|
||||
@rm -f ${NOSTDTIMERS_DIR}/timer_std*.f90
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake system.make $(NOSTDTIMERS_DIR)/
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f makemake $(SYSTEM_PATH) $(NOSTDTIMERS_DIR)/
|
||||
@echo "New sources without standard timers are in $(NOSTDTIMERS_DIR)"
|
||||
|
||||
noloctimers:
|
||||
|
@ -171,7 +183,7 @@ noloctimers:
|
|||
do \
|
||||
grep -vi 'tmr_l' $${sourcefile} > $(NOLOCTIMERS_DIR)/$${sourcefile}; \
|
||||
done
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f *.obj makemake system.make $(NOLOCTIMERS_DIR)/
|
||||
@cp -pfr FFT Makefile Makefile.Doc utilities *.f *.obj makemake $(SYSTEM_PATH) $(NOLOCTIMERS_DIR)/
|
||||
@echo "New sources without local timers are in $(NOLOCTIMERS_DIR)"
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
#
|
||||
# This is an example system-specific makefile. You will need to adjust
|
||||
# it for the actual system you are running on.
|
||||
|
||||
# Set compilers
|
||||
FC=mpif90
|
||||
F77=mpif77
|
||||
|
||||
# Linking flags
|
||||
LINKFLAGS= -L/usr/local/lib
|
||||
ARFLAGS=
|
||||
# OpenMP flags
|
||||
# Set this to "OMPFLAGS= " if compiling without openmp
|
||||
# Set this to "OMPFLAGS= -fopenmp" if compiling with openmp
|
||||
OMPFLAGS=
|
||||
|
||||
# Compilation flags
|
||||
# NB for gcc10 you need to add -fallow-argument-mismatch
|
||||
COMPFLAGS= -O3 $(XC_COMPFLAGS)
|
||||
COMPFLAGS= -O3 $(OMPFLAGS) $(XC_COMPFLAGS)
|
||||
COMPFLAGS_F77= $(COMPFLAGS)
|
||||
|
||||
# Set BLAS and LAPACK libraries
|
||||
|
@ -18,12 +20,9 @@ COMPFLAGS_F77= $(COMPFLAGS)
|
|||
# BLAS= -lvecLibFort
|
||||
# Intel MKL use the Intel tool
|
||||
# Generic
|
||||
# BLAS= -llapack -lblas
|
||||
BLAS= -llapack -lblas
|
||||
|
||||
# Full library call; remove scalapack if using dummy diag module
|
||||
LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
|
||||
|
||||
# LibXC compatibility (LibXC below) or Conquest XC library
|
||||
# LibXC: choose between LibXC compatibility below or Conquest XC library
|
||||
|
||||
# Conquest XC library
|
||||
#XC_LIBRARY = CQ
|
||||
|
@ -32,7 +31,7 @@ LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
|
|||
|
||||
# LibXC compatibility
|
||||
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
|
||||
# XC_LIBRARY = LibXC_v4
|
||||
#XC_LIBRARY = LibXC_v4
|
||||
XC_LIBRARY = LibXC_v5
|
||||
XC_LIB = -lxcf90 -lxc
|
||||
XC_COMPFLAGS = -I/usr/local/include
|
||||
|
@ -41,6 +40,14 @@ XC_COMPFLAGS = -I/usr/local/include
|
|||
FFT_LIB=-lfftw3
|
||||
FFT_OBJ=fft_fftw3.o
|
||||
|
||||
# Full library call; remove -lscalapack if using dummy diag module.
|
||||
# If using OpenMPI, use -lscalapack-openmpi instead.
|
||||
LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
|
||||
|
||||
# Linking flags
|
||||
LINKFLAGS= -L/usr/local/lib $(OMPFLAGS)
|
||||
ARFLAGS=
|
||||
|
||||
# Matrix multiplication kernel type
|
||||
MULT_KERN = default
|
||||
# Use dummy DiagModule or not
|
|
@ -1,3 +1,5 @@
|
|||
# System-specific makefile for the GitHub Actions runners.
|
||||
|
||||
# Linking flags
|
||||
LINKFLAGS=-fopenmp -L/usr/lib -L/usr/lib/x86_64-linux-gnu
|
||||
ARFLAGS=
|
|
@ -0,0 +1,41 @@
|
|||
# This is a system.make file for the MMM young Tier 2 machine. See
|
||||
# https://www.rc.ucl.ac.uk/docs/Clusters/Young/ for details
|
||||
|
||||
# Set compilers
|
||||
FC=mpif90
|
||||
F77=mpif77
|
||||
|
||||
# OpenMP flags
|
||||
OMPFLAGS= -fopenmp
|
||||
|
||||
# Linking flags
|
||||
LINKFLAGS= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -ldl $(OMPFLAGS) $(XC_LIB)
|
||||
ARFLAGS=
|
||||
|
||||
# Compilation flags
|
||||
# NB for gcc10 you need to add -fallow-argument-mismatch
|
||||
COMPFLAGS= -g -O2 $(OMPFLAGS) $(XC_COMPFLAGS) -I"${MKLROOT}/include"
|
||||
COMPFLAGS_F77= $(COMPFLAGS)
|
||||
|
||||
# LibXC compatibility
|
||||
# Choose LibXC version: v4 or v5
|
||||
XC_LIBRARY = LibXC_v4
|
||||
XC_LIB = -L/shared/ucl/apps/libxc/4.2.3/intel-2018/lib -lxcf90 -lxc
|
||||
XC_COMPFLAGS = -I/shared/ucl/apps/libxc/4.2.3/intel-2018/include
|
||||
|
||||
#XC_LIBRARY = LibXC_v5
|
||||
#XC_LIB = -L/home/cceaosk/libxc-5.2.3/install/lib64/ -lxc -lxcf90
|
||||
#XC_COMPFLAGS = -I/home/cceaosk/libxc-5.2.3/install/include/
|
||||
|
||||
# Set FFT library
|
||||
FFT_LIB=-lmkl_rt
|
||||
FFT_OBJ=fft_fftw3.o
|
||||
|
||||
# Matrix multiplication kernel type
|
||||
MULT_KERN = ompGemm_m
|
||||
# Use dummy DiagModule or not
|
||||
DIAG_DUMMY =
|
||||
|
||||
# Full library call; remove scalapack if using dummy diag module
|
||||
LIBS= $(FFT_LIB) $(XC_LIB)
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# This is a system.make file for the UCL Kathleen machine. See
|
||||
# https://www.rc.ucl.ac.uk/docs/Clusters/Kathleen/ for details
|
||||
|
||||
|
||||
# Set compilers
|
||||
FC=mpif90
|
||||
F77=mpif77
|
||||
|
||||
# OpenMP flags
|
||||
# Set this to "OMPFLAGS= " if compiling without openmp
|
||||
# Set this to "OMPFLAGS= -fopenmp" if compiling with openmp
|
||||
OMPFLAGS= -fopenmp
|
||||
|
||||
# Compilation flags
|
||||
# NB for gcc10 you need to add -fallow-argument-mismatch
|
||||
COMPFLAGS= -O3 -g $(OMPFLAGS) $(XC_COMPFLAGS) -I"${MKLROOT}/include"
|
||||
COMPFLAGS_F77= $(COMPFLAGS)
|
||||
|
||||
# Set BLAS and LAPACK libraries
|
||||
# MacOS X
|
||||
# BLAS= -lvecLibFort
|
||||
# Intel MKL use the Intel tool
|
||||
# Generic
|
||||
#BLAS= -llapack -lblas
|
||||
|
||||
# LibXC: choose between LibXC compatibility below or Conquest XC library
|
||||
|
||||
# Conquest XC library
|
||||
XC_LIBRARY = CQ
|
||||
XC_LIB =
|
||||
XC_COMPFLAGS =
|
||||
|
||||
# LibXC compatibility
|
||||
# Choose LibXC version: v4 (deprecated) or v5/6 (v5 and v6 have the same interface)
|
||||
# XC_LIBRARY = LibXC_v4
|
||||
#XC_LIBRARY = LibXC_v5
|
||||
#XC_LIB = -lxcf90 -lxc
|
||||
#XC_COMPFLAGS = -I/usr/local/include
|
||||
|
||||
# Set FFT library
|
||||
FFT_LIB=-lmkl_rt
|
||||
FFT_OBJ=fft_fftw3.o
|
||||
|
||||
# Full library call; remove scalapack if using dummy diag module
|
||||
# If using OpenMPI, use -lscalapack-openmpi instead.
|
||||
#LIBS= $(FFT_LIB) $(XC_LIB) -lscalapack $(BLAS)
|
||||
LIBS= $(FFT_LIB) $(XC_LIB)
|
||||
|
||||
# Linking flags
|
||||
LINKFLAGS= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -ldl $(OMPFLAGS) $(XC_LIB)
|
||||
ARFLAGS=
|
||||
|
||||
# Matrix multiplication kernel type
|
||||
MULT_KERN = ompGemm
|
||||
# Use dummy DiagModule or not
|
||||
DIAG_DUMMY =
|
||||
# Use dummy omp_module or not.
|
||||
# Set this to "OMP_DUMMY = DUMMY" if compiling without openmp
|
||||
# Set this to "OMP_DUMMY = " if compiling with openmp
|
||||
OMP_DUMMY =
|
||||
|
Loading…
Reference in New Issue