1#
2# MareNostrum IV at BSC, Intel suite
3#
4SIESTA_ARCH=prace-intel
5#
6# Machine specific settings might be:
7#
8# 1. Inherited from environmental variables
9#    (paths, libraries, etc)
10# 2. Set from a 'fortran.mk' file that is
11#    included below (compiler names, flags, etc) (Uncomment first)
12#
13# (intel/2017.4 environment)
14# ml netcdf
15# ml flook
16# ml elpa
17# ml fftw
18#
19#--------------------------------------------------------
20# Use these symbols to request particular features
21# To turn on, set '=1'.
22#--------------
23# These are mandatory for PSML and MaX Versions,
24# but they should be turned off for 4.1
25WITH_PSML=
26WITH_GRIDXC=
27#-------------
28#
29WITH_EXTERNAL_ELPA=1
30WITH_ELSI=
31WITH_FLOOK=1
32WITH_MPI=1
33WITH_NETCDF=1
34WITH_SEPARATE_NETCDF_FORTRAN=
35WITH_NCDF=1
36WITH_LEGACY_GRIDXC_INSTALL=
37WITH_GRID_SP=
38#
39#===========================================================
40# Make sure you have the appropriate library symbols
41# (Either explicitly here, or through shell variables, perhaps
42#  set by a module system)
43# Define also compiler names and flags
44#--------------------------------------------------------
45#XMLF90_ROOT=
46#PSML_ROOT=
47#GRIDXC_ROOT=
48#ELSI_ROOT=
49#ELPA_ROOT=
50#ELPA_INCLUDE_DIRECTORY=
51#FLOOK_ROOT=
52#-------------------------------------------------------
53# Netcdf is subtle: Apparently they have all the dependencies (hdf5, etc) encoded in
54# the fortran library, so it is only necessary to specify NETCDF_ROOT (with 'ml netcdf')
55# BUT the spec has to be -L$(NETCDF_ROOT)/lib -lnetcdff
56# An explicit (static) library load will not work
57#
58SCALAPACK_LIBS=-L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
59LAPACK_LIBS=-L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
60FFTW_ROOT=/apps/FFTW/3.3.6/INTEL/IMPI
61# Needed for PEXSI (ELSI) support
62LIBS_CPLUS=-lstdc++
63#--------------------------------------------------------
64#
65# Define compiler names and flags
66#
67FC_PARALLEL=mpiifort
68FC_SERIAL=ifort
69#
70FPP = $(FC_SERIAL) -E -P -x c
71#
72# (add -qopenmp to all three for OpenMP support)
73FFLAGS = -g -traceback -O2 -prec-div -prec-sqrt -fp-model source
74FFLAGS_DEBUG= -g -traceback -O1 -prec-div -prec-sqrt -fp-model source
75LDFLAGS=
76#
77# Delicate files with Intel compiler ----------------------------
78#
79atom.o: atom.F
80	$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
81state_analysis.o: state_analysis.F
82	$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
83create_Sparsity_SC.o: create_Sparsity_SC.F90
84	$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS)  $<
85#
86RANLIB=echo
87