siesta-4.1-b4 arch.make file for intel compiler and intel mpi

Asked by Virendra Kumar

I Am trying to compile siesta-4.1-b4 on HPC with Intel compiler and Intel MPI for that i required arch.make file please share this arch file.

Question information

Language:
English Edit question
Status:
Answered
For:
Siesta Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
rocco (rocco.martinazzo) said :
#1

The arch.make file below worked for me, check only your Intel/MKL installation and follow the instructions on the SIESTA user's guide on how to install NetCDF with full CDF4 support and flook.

Cheers

#
# Copyright (C) 1996-2016 The SIESTA group
# This file is distributed under the terms of the
# GNU General Public License: see COPYING in the top directory
# or http://www.gnu.org/copyleft/gpl.txt.
# See Docs/Contributors.txt for a list of contributors.
#
#-------------------------------------------------------------------
# arch.make file for gfortran compiler.
# To use this arch.make file you should rename it to
# arch.make
# or make a sym-link.
# For an explanation of the flags see DOCUMENTED-TEMPLATE.make

.SUFFIXES:
.SUFFIXES: .f .F .o .c .a .f90 .F90

SIESTA_ARCH = unknown

CC = mpicc
FPP = $(FC) -E -P
FC = mpif90

#FC_SERIAL = ifort

MPI_INTERFACE = libmpi_f90.a
MPI_INCLUDE = .

FFLAGS = -O2 -fPIC -fp-model source

AR = ar
RANLIB = ranlib

SYS = nag

SP_KIND = 4
DP_KIND = 8
KINDS = $(SP_KIND) $(DP_KIND)

LDFLAGS =

COMP_LIBS = libsiestaLAPACK.a libsiestaBLAS.a
COMP_LIBS =

FPPFLAGS = $(DEFS_PREFIX)-DFC_HAVE_ABORT
FPPFLAGS += -DMPI

# ---- MKL libraries -------------

MKLROOT=/prg/intel/Composer_2015/mkl/lib/intel64
MKL_LIBS=$(MKLROOT)/libmkl_intel_lp64.a $(MKLROOT)/libmkl_core.a
BLAS_LIBS=$(MKLROOT)/libmkl_blas95_lp64.a
LAPACK_LIBS=$(MKLROOT)/libmkl_lapack95_lp64.a
THREAD_LIBS=$(MKLROOT)/libmkl_intel_thread.a
SCALAPACK_LIBS=$(MKLROOT)/libmkl_scalapack_lp64.a
BLACS_LIBS=$(MKLROOT)/libmkl_blacs_intelmpi_lp64.a

# Static linking, gives rise to an executable of ca. 40 Mb

LIBS =-Wl,--start-group $(MKL_LIBS) $(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(THREAD_LIBS) -Wl,--end-group
LIBS += -liomp5

# Dynamic linking where possible, executable size reduced to 13 Mb

LIBS = -L$(MKLROOT) -lmkl_intel_lp64 -lmkl_core -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
LIBS += -Wl,--start-group $(LAPACK_LIBS) $(BLAS_LIBS) -Wl,--end-group
LIBS += -L$(MKLROOT) -lmkl_intel_thread
LIBS += -liomp5

# ---------------------------

COMP_LIBS += libfdict.a

# Dependency rules ---------

FFLAGS_DEBUG = -g -O1 -fp-model source # your appropriate flags here...

# The atom.f code is very vulnerable. Particularly the Intel compiler
# will make an erroneous compilation of atom.f with high optimization
# levels.
atom.o: atom.F
        $(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
state_analysis.o: state_analysis.F
        $(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<

.c.o:
        $(CC) -c $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $<
.F.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
.F90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $<
.f.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f) $<
.f90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90) $<

INCFLAGS += -I/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/netcdf/4.6.1/include
LDFLAGS += -L/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/zlib/1.2.11/lib -Wl,-rpath=/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/zlib/1.2.11/lib
LDFLAGS += -L/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/hdf5/1.8.21/lib -Wl,-rpath=/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/hdf5/1.8.21/lib
LDFLAGS += -L/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/netcdf/4.6.1/lib -Wl,-rpath=/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/netcdf/4.6.1/lib
LIBS += -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
COMP_LIBS += libncdf.a libfdict.a
FPPFLAGS += -DCDF -DNCDF -DNCDF_4

# this definition is for utilities
NETCDF_LIBS=-L/prg/Source/SIESTA/siesta-4.1-b4/NetCDF/build/netcdf/4.6.1/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz

INCFLAGS += -I/prg/Source/SIESTA/siesta-4.1-b4/Flook/build/flook/0.7.0/include
LDFLAGS += -L/prg/Source/SIESTA/siesta-4.1-b4/Flook/build/flook/0.7.0/lib -Wl,-rpath=/prg/Source/SIESTA/siesta-4.1-b4/Flook/build/flook/0.7.0/lib
LIBS += -lflookall -ldl
COMP_LIBS += libfdict.a
FPPFLAGS += -DSIESTA__FLOOK

Revision history for this message
rocco (rocco.martinazzo) said :
#2

I've just found that without linking the sequential MKL libraries the code does not work properly when turning off the parallelization over k (Diag.ParallelOverK option). Just add "-lmkl_sequential " to the set of dynamically linked MKL libraries.

Can you help with this problem?

Provide an answer of your own, or ask Virendra Kumar for more information if necessary.

To post a message you must log in.