Skip to content

Commit

Permalink
Merge pull request #531 from wannier-developers/libwork2
Browse files Browse the repository at this point in the history
Large number of updates in preparation for Wannier v4.0
  • Loading branch information
jryates authored Jan 15, 2025
2 parents 715f4b4 + 5bf85ed commit 7f40c3c
Show file tree
Hide file tree
Showing 121 changed files with 114,043 additions and 3,794 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
wannier90.x
postw90.x
.DS_Store
libwannier*.a
libwannier*.so.*
make.inc
postw90.x
w90chk2chk.x
w90spn2spn.x
libwannier.a
libwan2.a
libwannier.so
libwannier.dylib
wannier90.x
*~
*.x.dSYM
.vscode
*.mod
*.gcno
*.gcda
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ifndef ROOTDIR
ROOTDIR=.
endif

# include make.inc to determine if (last) build was serial or parallel via def/undef COMMS
include make.inc

REALMAKEFILE=../Makefile.2

TAR := $(shell if which gnutar 1>/dev/null 2> /dev/null; then echo gnutar; else echo tar; fi )
Expand All @@ -26,8 +29,8 @@ install: default
if [ -f "utility/w90pov/w90pov" ]; then install -m755 "utility/w90pov/w90pov" "$(DESTDIR)$(PREFIX)/bin/w90pov"; fi;
if [ -f "utility/w90vdw/w90vdw.x" ]; then install -m755 "utility/w90vdw/w90vdw.x" "$(DESTDIR)$(PREFIX)/bin/w90vdw.x"; fi;
install -d $(DESTDIR)$(PREFIX)/lib/
if [ -f "libwannier.a" ]; then install -m644 "libwannier.a" "$(DESTDIR)$(PREFIX)/lib/libwannier.a"; fi;
if [ -f "libwannier.a" ]; then $(MAKE) pkgconfig; fi;
if [ -f "$(LIBRARYV2)" ]; then install -m644 "$(LIBRARYV2)" "$(DESTDIR)$(PREFIX)/lib/$(LIBRARYV2)"; fi;
if [ -f "$(LIBRARYV2)" ]; then $(MAKE) pkgconfig; fi;

all: wannier lib post w90chk2chk w90pov w90vdw w90spn2spn

Expand All @@ -54,6 +57,9 @@ w90pov:
w90vdw:
(cd $(ROOTDIR)/utility/w90vdw && $(MAKE) )

w90py: dynlib
(cd $(ROOTDIR)/wrap && $(MAKE) )

libs: lib

PKGCONFIG_FILENAME = wannier.pc
Expand Down Expand Up @@ -84,14 +90,12 @@ clean:
$(MAKE) -f $(REALMAKEFILE) clean && \
cd ../ && rm -rf obj ; \
fi )
cd $(ROOTDIR)/docs && rm -r site
$(MAKE) -C $(ROOTDIR)/utility/w90pov clean
$(MAKE) -C $(ROOTDIR)/utility/w90vdw clean
cd $(ROOTDIR)/test-suite && ./clean_tests

veryclean: clean
cd $(ROOTDIR) && rm -f wannier90.x postw90.x libwannier.a libwan2.a w90chk2chk.x w90spn2spn.x
cd $(ROOTDIR)/docs && rm -r site
cd $(ROOTDIR) && rm -f wannier90.x postw90.x w90chk2chk.x w90spn2spn.x libwannier90.{a,so.4} libwannier90_mpi.{a,so.4} *.{gcda,gcno}
cd $(ROOTDIR)/test-suite && ./clean_tests -i

thedoc:
Expand Down Expand Up @@ -204,7 +208,11 @@ test-parallel: w90chk2chk wannier post
(cd $(ROOTDIR)/test-suite && ./run_tests --category=par --numprocs=4 )

# Alias
ifdef COMMS
tests: test-serial test-parallel
else
tests: test-serial
endif

dist-lite:
@(cd $(ROOTDIR) && $(TAR) -cz --transform='s,^\./,wannier90/,' -f wannier90.tar.gz \
Expand Down
17 changes: 10 additions & 7 deletions README.install
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,16 @@ Parallel builds
Methods 1 and 2 require module files built by the same version of compiler that
is to be used to compile wannier90.

The specific interface to be used must be chosen by setting COMMS in make.inc
to one of "mpi08", "mpi90" or "mpih" (plain "mpi" is the same as "mpi90").

Particularly when wannier90 is to be used in library mode, the MPI interface
specified by COMMS must be the same as that used in the calling code; otherwise
using the fortran08 is recommended.

If you intend to link to libwannier90 from another program, then you may wish to
ensure that the MPI interface level (standard) used in compiling Wannier90
matches that of the calling program. Three levels of Fortran MPI standard are
supported by Wannier90: Fortran90 (which uses a Fortran module), Fortran2008
(which uses a Fortran module that includes f2008 types for the different MPI
objects) and a legacy Fortran77 interface (which uses the 'mpi.h' include file).
To specify a particular interface set:
COMMS=mpi08
COMMS=mpi90 (default, same as COMMS=mpi)
COMMS=mpih

Linux x86,x86-64
----------------
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.alpha
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ F90 = f90
FCOPTS = -fast
LDOPTS = -fast
LIBS = -lcxml

# f90wrap location
F90WRAP = f90wrap
4 changes: 4 additions & 0 deletions config/make.inc.g95
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ FCOPTS = -O2
LDOPTS = -O2



# f90wrap location
F90WRAP = f90wrap

#=======================
# ATLAS Blas and LAPACK
#=======================
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.gfort
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ LDOPTS =
#LDOPTS = -fstrict-aliasing -fno-omit-frame-pointer -fno-realloc-lhs -fcheck=bounds,do,recursion,pointer -ffree-form -Wall -Waliasing -Wsurprising -Wline-truncation -Wno-tabs -Wno-uninitialized -Wno-unused-dummy-argument -Wno-unused -Wno-character-truncation -O1 -g -fbacktrace


# f90wrap location
F90WRAP = f90wrap

#=======================
# ATLAS Blas and LAPACK
#=======================
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.gfort.dynlib
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ LDOPTS = -fPIC
#LDOPTS = -fstrict-aliasing -fno-omit-frame-pointer -fno-realloc-lhs -fcheck=bounds,do,recursion,pointer -ffree-form -Wall -Waliasing -Wsurprising -Wline-truncation -Wno-tabs -Wno-uninitialized -Wno-unused-dummy-argument -Wno-unused -Wno-character-truncation -O1 -g -fbacktrace


# f90wrap location
F90WRAP = f90wrap

#=======================
# ATLAS Blas and LAPACK
#=======================
Expand Down
20 changes: 0 additions & 20 deletions config/make.inc.gfort.travisci

This file was deleted.

3 changes: 3 additions & 0 deletions config/make.inc.ifort
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ LDOPTS=-O2
LIBDIR = /opt/intel/mkl/lib/intel64
LIBS = -L$(LIBDIR) -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lpthread

# f90wrap location
F90WRAP = f90wrap

#=======================
# ATLAS Blas and LAPACK
#=======================
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.ifort_tcm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ LDOPTS =
#FCOPTS=-Ddebug -O0 -g -fno-omit-frame-pointer -debug extended -traceback -C -Ddebug -stand f95 -warn all
#LDOPTS=-Ddebug -O0 -g -fno-omit-frame-pointer -debug extended -traceback -C -Ddebug -stand f95 -warn all

# f90wrap location
F90WRAP = f90wrap

#========================================================
# Intel mkl libraries. Set LIBPATH if not in default path
#========================================================
Expand Down
24 changes: 24 additions & 0 deletions config/make.inc.ifx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

#=====================================================
# For Linux x86_64 with intel ifx
#=====================================================
F90=ifx

COMMS=mpi08
MPIF90=mpiifx

# use of runtime checks deactivates optimisation for speed in ifx
# disable "warning #8889: Explicit interface or EXTERNAL declaration is required."
# disable "warning #10182: disabling optimization; runtime debug checks enabled"
# disable "remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'"
FCOPTS=-fPIC -check all -warn all -g -diag-disable 8889,10182,10440
FCOPTS=-O3 -fPIC -warn all -diag-disable 8889
LDOPTS=$(FCOPTS)

#========================================================
# Intel mkl libraries. Set MKLROOT per hand if necessary
#========================================================
LIBS = -L$(MKLROOT) -lmkl_core -lmkl_intel_lp64 -lmkl_sequential

# f90wrap location
F90WRAP = f90wrap
3 changes: 3 additions & 0 deletions config/make.inc.macosx.homebrew
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ MPIF90=mpifort
DYNLIBRARYEXTENSION=dylib
SHAREDLIBFLAGS=-dynamiclib

# f90wrap location
F90WRAP = f90wrap

## Note: we could use -framework Accelerate, but we should
## then compile with the -ff2c option to gfortran to use
## C-style conventions for functions returning complex values -
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.macosx.macports
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ FCOPTS=-O2 -ff2c
LDOPTS=-O2 -ff2c
LIBS = -framework Accelerate

# f90wrap location
F90WRAP = f90wrap

# other options: do not use -ff2c but instead:
# port vecLibfort (wrapper to Accelerate): LIBS = -L/opt/local/lib -lvecLibFort
# port atlas: LIBS = -L/opt/local/lib -lsatlas
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.nag
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ LIBS = -L$(LIBDIR) -llapack -lf77blas -lcblas -latlas
#LIBS = -L$(LIBDIR) -llapack -lblas


# f90wrap location
F90WRAP = f90wrap

# ACML for blas and lapack
LIBS = -lacml
3 changes: 3 additions & 0 deletions config/make.inc.pathscale
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ FCOPTS = -O3
LDOPTS =
LIBS = -lacml

# f90wrap location
F90WRAP = f90wrap

# ACML libraries are freely available from http://www.amd.com
3 changes: 3 additions & 0 deletions config/make.inc.pgf90
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ F90 = pgf90
FCOPTS = -fast
LDOPTS =

# f90wrap location
F90WRAP = f90wrap

# Debug options
#FCOPTS = -g -Mbounds -Mchkptr -Minform=warn -Mstandard
#LDOPTS = -g -Mbounds -Mchkptr -Minform=warn -Mstandard
Expand Down
3 changes: 3 additions & 0 deletions config/make.inc.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ LIBS = -L$(LIBDIR) -llapack -lessl
# http://www.netlib.org/lapack/
# and (optionally) the essl wrappers
# http://www.netlib.org/lapack/essl/

# f90wrap location
F90WRAP = f90wrap
Loading

0 comments on commit 7f40c3c

Please sign in to comment.