Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core MPI routines #125

Merged
merged 19 commits into from
Mar 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ addons:
- gfortran
- libblas-dev
- liblapack-dev
- openmpi-bin
- libopenmpi-dev
env:
## Uncomment the following line if you want to run also the interface tests
# - W90TESTSWITHINTERFACE=true
- W90TESTSWITHINTERFACE=false
- W90TESTSWITHINTERFACE=false W90BINARYPARALLEL=false
- W90TESTSWITHINTERFACE=false W90BINARYPARALLEL=true
install:
# Possibly install QE and other interface code
- ./test-suite/external-codes/get-external-codes.sh
# Install Wannier
- cp config/make.inc.gfort.travisci make.inc
#- cp config/make.inc.gfort.travisci make.inc
- ./test-suite/travis_copy_make.inc.sh
- make -j default
script:
- ./test-suite/run_tests_travis.sh
git:
depth: 3

12 changes: 9 additions & 3 deletions CHANGE.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

The Maximally-Localised Generalised Wannier Functions Code

v2.x.y (25th January 2017)
v2.x.y (DATE)
* G0W0 interface implemented (A. Marrazzo (EPFL, CH) and S. Tsirkin (DIPC, Spain)).
Added two utilities (gw2wannier90.py and k_mapper.py) and example 23 on G0W0 bands interpolation with Yambo.
Added two utilities (gw2wannier90.py and k_mapper.py) and example 23 on
G0W0 bands interpolation with Yambo.
* Parallelized the disentanglement and wannierise subroutines
with respect to k-points. Other parts of the code have been
modified so that only the root process writes in the .wout file.
wannier90.x can now be run in parallel (see user guide)
(contributed by Guillaume Geranton, FZ Julich)
v2.1.0 (13th January 2017)
* Implementation of the symmetry-adapted Wannier functions
(see R. Sakuma, Phys. Rev. B 87, 235109 (2013), courtesy
of R. Sakuma (Lund University, Sweden), T. Koretsune (Riken, JP),
Y. Nomura (U. Tokyo, JP), Y. Nohara (Atomic-Scale Material
Y. Nomura (U. Tokyo, JP), Y. Nohara (Atomic-Scale Material
Simulations, Co., Ltd.), R. Arita (Riken, JP))
* Streamlined the interface between wannier90 and tight-binding
codes such as pythtb (new input variable: write_tb). Also,
Expand Down
21 changes: 21 additions & 0 deletions config/make.inc.gfort.traviscimpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#===================================
# gfortran for the travis-ci service
# This file for MPI builds
#===================================
F90 = gfortran

COMMS = mpi
MPIF90 = mpif90

# Options for debugging When we move to 4.9 add -fsanitize=leak
FCOPTS = -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
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

#=======================
# System LAPACK and BLAS
# e.g. use
# sudo apt-get install libblas-dev liblapack-dev
# on Ubuntu
#=======================
LIBS = -llapack -lblas

6 changes: 2 additions & 4 deletions doc/tutorial/tutorial.tex
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@

\sectiontitle{Parallel execution}
\label{sec:parallel}
Presently, {\tt wannier90.x} is a serial-only executable, so it
\emph{cannot} be run in parallel using MPI libraries. On the contrary,
{\tt postw90.x} can be run in parallel to speed up the calculations,
using the MPI libraries.
{\tt postw90.x} and {\tt wannier90.x} can be run in parallel to speed up
the calculations, using the MPI libraries.

To enable the parallel version to be built, you must specify some
flags in the {\tt make.inc} file of {\tt wannier90} and {\tt postw90};
Expand Down
28 changes: 24 additions & 4 deletions doc/user_guide/parameters.tex
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
\chapter{Parameters}\label{chap:parameters}

\section{Usage}
{\tt
\begin{quote}
wannier90.x [-pp] [seedname]
\end{quote} }
{\tt wannier90.x} can be run in parallel using MPI libraries to
reduce the computation time.

For serial execution use: {\tt wannier90.x [-pp] [seedname]}

\begin{itemize}
\item{ {\tt seedname}: If a seedname string is given the code will read its input
from a file {\tt seedname.win}. The default value is {\tt wannier}. One can also equivalently provide the string
Expand All @@ -14,6 +15,25 @@ \section{Usage}
This information is written to the file {\tt seedname.nnkp}.}
\end{itemize}

For parallel execution use: {\tt mpirun -np NUMPROCS wannier90.x [-pp] [seedname]}

\begin{itemize} \item
{\tt NUMPROCS}: substitute with the number of processors that you want
to use.
\end{itemize}

Note that the {\tt mpirun} command and command-line flags may be
different in your MPI implementation: read your MPI manual or ask your
computer administrator.

Note also that this requires that the {\tt wannier90.x} executable has been
compiled in its parallel version (follow the instructions in the file
{\tt README.install} in the main directory of the wannier90
distribution) and
that the MPI libraries and binaries are installed and correctly
configured on your machine.


\section{{\tt seedname.win} File\label{sec:seednamefile}}
The \wannier\ input file {\tt seedname.win} has a flexible free-form
structure.
Expand Down
6 changes: 3 additions & 3 deletions doc/user_guide/postw90params.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ \chapter{Parameters}
\section{Introduction}

The \texttt{wannier90.x} code described in Part~\ref{part:w90}
calculates the maximally-localized Wannier functions. The \texttt{wannier90.x} code is a
serial executable (i.e., it cannot be executed in parallel on different
CPUs).
calculates the maximally-localized Wannier functions. %The \texttt{wannier90.x} code is a
%serial executable (i.e., it cannot be executed in parallel on different
%CPUs).

The \texttt{postw90.x} executable contains instead a series of modules
that take the Wannier functions calculated by \texttt{wannier90.x} and
Expand Down
15 changes: 8 additions & 7 deletions src/Makefile.2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
include ../../make.inc

OBJS = constants.o io.o utility.o parameters.o hamiltonian.o overlap.o \
kmesh.o disentangle.o ws_distance.o wannierise.o plot.o transport.o sitesym.o
kmesh.o disentangle.o ws_distance.o wannierise.o plot.o transport.o sitesym.o comms.o


OBJS2 = wannier_lib.o

Expand All @@ -31,8 +32,8 @@ TEMP2 = $(F90)
endif


wannier libs w90chk2chk serialobjs: POSTOPTS =
wannier libs w90chk2chk serialobjs: COMPILER = $(F90)
wannier libs w90chk2chk serialobjs: POSTOPTS = $(TEMP1)
wannier libs w90chk2chk serialobjs: COMPILER = $(TEMP2)
wannier: ../../wannier90.x
w90chk2chk: ../../w90chk2chk.x

Expand All @@ -42,7 +43,7 @@ serialobjs: $(OBJS)
$(COMPILER) ../w90chk2chk.F90 $(LDOPTS) $(OBJS) $(LIBS) -o ../../w90chk2chk.x

../../wannier90.x: $(OBJS) ../wannier_prog.F90
$(COMPILER) ../wannier_prog.F90 $(LDOPTS) $(OBJS) $(LIBS) -o ../../wannier90.x
$(COMPILER) ../wannier_prog.F90 $(POSTOPTS) $(LDOPTS) $(OBJS) $(LIBS) -o ../../wannier90.x

post: POSTOPTS = $(TEMP1)
post: COMPILER = $(TEMP2)
Expand Down Expand Up @@ -88,7 +89,7 @@ io.o: ../io.F90 constants.o
utility.o: ../utility.F90 constants.o io.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../utility.F90

parameters.o: ../parameters.F90 constants.o io.o utility.o
parameters.o: ../parameters.F90 constants.o io.o utility.o comms.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../parameters.F90

hamiltonian.o: ../hamiltonian.F90 ws_distance.o constants.o io.o utility.o parameters.o
Expand All @@ -100,10 +101,10 @@ overlap.o: ../overlap.F90 constants.o io.o utility.o parameters.o sitesym.o
kmesh.o: ../kmesh.F90 constants.o io.o utility.o parameters.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../kmesh.F90

disentangle.o: ../disentangle.F90 constants.o io.o parameters.o sitesym.o
disentangle.o: ../disentangle.F90 constants.o io.o parameters.o sitesym.o comms.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../disentangle.F90

wannierise.o: ../wannierise.F90 hamiltonian.o constants.o io.o utility.o parameters.o sitesym.o
wannierise.o: ../wannierise.F90 hamiltonian.o constants.o io.o utility.o parameters.o sitesym.o comms.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../wannierise.F90

plot.o: ../plot.F90 constants.o io.o utility.o parameters.o hamiltonian.o ws_distance.o
Expand Down
Loading