# # 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. # .SUFFIXES: .SUFFIXES: .f .F .o .a .f90 .F90 # THIS file worked in Yokohama City University, on a Ubuntu 16.04 system # you need to do $sudo apt upgrade$ and then install these libraries: # sudo apt install build-essential checkinstall # sudo apt install openmpi-common openmpi-bin libopenmpi-dev libnetcdf-dev netcdf-bin # sudo apt install libnetcdf-dev libnetcdff-dev libscalapack-mpi-dev libblas-dev liblapack-dev # sudo apt install openmpi-doc libopenmpi-dev libmpich-dev # # SIESTA_ARCH=YCU-linux-gnu--Gfortran FPP= FPP_OUTPUT= FC=mpif90 RANLIB=echo SYS=nag SP_KIND=4 DP_KIND=8 KINDS=$(SP_KIND) $(DP_KIND) # Add any other sensible compilation flags here FFLAGS=-g -O2 FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF -DGRID_DP -DPHI_GRID_SP LDFLAGS= ARFLAGS_EXTRA= FCFLAGS_fixed_f= FCFLAGS_free_f90= FPPFLAGS_fixed_F= FPPFLAGS_free_F90= #/usr/lib/x86_64-linux-gnu/openmpi/include ######################################################################################################### #### IN SOME SYSTEM YOU SHOULD USE folder /usr/lib/x86_64-linux-gnu instead of /usr/lib/ # ######################################################################################################### INCFLAGS=-I/usr/include -I. -I/usr/lib/openmpi/include # INCFLAGS=-I/usr/include -I. -I/usr/lib/x86_64-linux-gnu/openmpi/include LAPACK_LIBS=/usr/lib/lapack/liblapack.a # LAPACK_LIBS=/usr/lib/x86_64-linux-gnu/lapack/liblapack.a ######################################################################################################### ######################################################################################################### BLAS_LIBS=-lblas BLACS_LIBS=-lblacsF77init-openmpi -lblacsCinit-openmpi -lblacs-openmpi SCALAPACK_LIBS=-lscalapack-openmpi #COMP_LIBS=dc_lapack.a COMP_LIBS += libsiestaLAPACK.a NETCDF_LIBS=-lnetcdff -lnetcdf NETCDF_INTERFACE=libnetcdf_f90.a LIBS= $(NETCDF_LIBS) -lpthread $(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) #SIESTA needs an F90 interface to MPI #This will give you SIESTA's own implementation #If your compiler vendor offers an alternative, you may change #to it here. MPI_INTERFACE=libmpi_f90.a MPI_INCLUDE=. #Dependency rules are created by autoconf according to whether #discrete preprocessing is necessary or not. .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) $< # # #TEMPLATES= mpi__type_s.f90 mpi__type_sv.f90 mpi__type_v.f90 mpi__type_vs.f90 # #INCFLAGS:= $(INCFLAGS) -I$(MPI_INCLUDE) # #Interfaces.f90 V_S.uses VS.uses: $(TEMPLATES) # if [ -z "$(KINDS)" ] ; then $(MAKE) kind_explorer ; fi # $(MAKE) int_explorer # sh ${