Skip to content

Commit

Permalink
Merge branch 'develop' into tbh-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Julen-ia committed Feb 17, 2021
2 parents ced5209 + c90de35 commit 4ea4190
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 99 deletions.
File renamed without changes.
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
pull_request:
push:
branches:
- develop
- master
- gh-actions

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

build:
runs-on: ubuntu-latest
strategy:
matrix:
w90-binary-parallel: [ 'false', 'true' ]
name: Build and test `parallel=${{ matrix.w90-binary-parallel }}`
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install \
gfortran \
libblas-dev \
liblapack-dev \
openmpi-bin \
libopenmpi-dev
pip install --upgrade pip
pip install \
numpy \
matplotlib \
- name: build
env:
W90BINARYPARALLEL: ${{ matrix.w90-binary-parallel }}
run: |
if [ "$W90BINARYPARALLEL" == "true" ] ; then
cp ./.github/workflows/config/make.inc.gfort+openmpi ./make.inc
else
cp ./.github/workflows/config/make.inc.gfort ./make.inc
fi
make -j default w90chk2chk libs
- name: run tests
env:
W90BINARYPARALLEL: ${{ matrix.w90-binary-parallel }}
run: |
./.github/workflows/run_tests.sh
- name: compute coverage
uses: codecov/codecov-action@v1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

## Set here, if needed, the location of the executables
TESTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
TESTDIR=$(pwd)/test-suite/
echo $TESTDIR
cd "$TESTDIR"

echo "****************************************"
Expand All @@ -26,7 +26,7 @@ cd "$TESTDIR"
echo "************************"
echo "* RUNNING SERIAL TESTS *"
echo "************************"
./run_tests --category=default
./run_tests --category=default

if [ "$W90BINARYPARALLEL" == "true" ]
then
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: check-yaml
- id: trailing-whitespace
files: (?x)^(
config/make[.]inc[.\w]*|
Expand All @@ -12,12 +14,11 @@
examples/example\d\d[-]?\w*/.+win
)$
- repo: git://github.com/pseewald/fprettify
sha: v0.3.3
rev: v0.3.3
hooks:
- id: fprettify
args: ['--indent', '2']
exclude: (?x)^(
pwscf/.*
)$
verbose: true
entry: ./test-suite/tools/fprettify-wrapper.py
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions doc/user_guide/parameters.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1282,10 +1282,10 @@ \section{Post-Processing}
quantity to plot. For a spinor WF with components $[\phi,\psi]$ the quatity plotted is
\begin{itemize}
\item[{\bf --}] \verb#total# (default). $\sqrt{[|\phi|^2+|\psi|^2}$
\item[{\bf --}] \verb#up#. $|\phi|\times sign(Re\{\phi\})$ if $\verb#wannier_plot_spinor_mode#=\verb#true#$,
\item[{\bf --}] \verb#up#. $|\phi|\times sign(Re\{\phi\})$ if $\verb#wannier_plot_spinor_phase#=\verb#true#$,
otherwise $|\phi|$
\item[{\bf --}] \verb#down#. $|\psi|\times sign(Re\{\psi\})$ if
$\verb#wannier_plot_spinor_mode#=\verb#true#$, otherwise $|\psi|$
$\verb#wannier_plot_spinor_phase#=\verb#true#$, otherwise $|\psi|$
\end{itemize}
Note: making a visual representation of a spinor WF is not as
straightforward as for a scalar WF. While a scalar WF is typically a
Expand Down
6 changes: 4 additions & 2 deletions src/parameters.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6410,8 +6410,10 @@ subroutine param_dist

if (nfermi > 0) call comms_bcast(fermi_energy_list(1), nfermi)
if (kubo_nfreq > 0) call comms_bcast(kubo_freq_list(1), kubo_nfreq)
call comms_bcast(gyrotropic_freq_list(1), gyrotropic_nfreq)
call comms_bcast(gyrotropic_band_list(1), gyrotropic_num_bands)
if (gyrotropic_nfreq > 0) &
call comms_bcast(gyrotropic_freq_list(1), gyrotropic_nfreq)
if (gyrotropic_num_bands > 0) &
call comms_bcast(gyrotropic_band_list(1), gyrotropic_num_bands)
if (num_dos_project > 0) call comms_bcast(dos_project(1), num_dos_project)
if (.not. effective_model) then
if (eig_found) then
Expand Down
13 changes: 6 additions & 7 deletions src/plot.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1494,11 +1494,11 @@ subroutine internal_cube_format()
endif
! Number of grid points in each direction, lattice vector
write (file_unit, '(i4,3f13.5)') ilength(1), real_lattice(1, 1)/(real(ngx, dp)*bohr), &
real_lattice(1, 2)/(real(ngy, dp)*bohr), real_lattice(1, 3)/(real(ngz, dp)*bohr)
write (file_unit, '(i4,3f13.5)') ilength(2), real_lattice(2, 1)/(real(ngx, dp)*bohr), &
real_lattice(2, 2)/(real(ngy, dp)*bohr), real_lattice(2, 3)/(real(ngz, dp)*bohr)
write (file_unit, '(i4,3f13.5)') ilength(3), real_lattice(3, 1)/(real(ngx, dp)*bohr), &
real_lattice(3, 2)/(real(ngy, dp)*bohr), real_lattice(3, 3)/(real(ngz, dp)*bohr)
real_lattice(1, 2)/(real(ngx, dp)*bohr), real_lattice(1, 3)/(real(ngx, dp)*bohr)
write (file_unit, '(i4,3f13.5)') ilength(2), real_lattice(2, 1)/(real(ngy, dp)*bohr), &
real_lattice(2, 2)/(real(ngy, dp)*bohr), real_lattice(2, 3)/(real(ngy, dp)*bohr)
write (file_unit, '(i4,3f13.5)') ilength(3), real_lattice(3, 1)/(real(ngz, dp)*bohr), &
real_lattice(3, 2)/(real(ngz, dp)*bohr), real_lattice(3, 3)/(real(ngz, dp)*bohr)

! Atomic number, valence charge, position of atom
! do isp=1,num_species
Expand Down Expand Up @@ -1702,7 +1702,6 @@ subroutine plot_bvec()
character(len=9) :: cdate, ctime
!
file_unit = io_file_unit()
open (file_unit, file=trim(seedname)//'.bvec', form='formatted', status='unknown', err=101)
call io_date(cdate, ctime)
header = 'written on '//cdate//' at '//ctime
!
Expand All @@ -1711,7 +1710,7 @@ subroutine plot_bvec()
write (file_unit, *) num_kpts, nntot
do nkp = 1, num_kpts
do nn = 1, nntot
write (file_unit, '(4F12.6)') bk(:, nn, nkp), wb(nn)
write (file_unit, '(4F14.8)') bk(:, nn, nkp), wb(nn)
enddo
enddo
close (file_unit)
Expand Down
2 changes: 1 addition & 1 deletion src/wannier_lib.F90
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ subroutine wannier_run(seed__name, mp_grid_loc, num_kpts_loc, &
time2 = io_time()
write (stdout, '(1x,a25,f11.3,a)') 'Time for wannierise ', time2 - time1, ' (sec)'

if (wannier_plot .or. bands_plot .or. fermi_surface_plot .or. write_hr) then
if (wannier_plot .or. bands_plot .or. fermi_surface_plot .or. write_hr .or. write_bvec) then
call plot_main()
time1 = io_time()
write (stdout, '(1x,a25,f11.3,a)') 'Time for plotting ', time1 - time2, ' (sec)'
Expand Down
4 changes: 0 additions & 4 deletions test-suite/install_precommit.sh

This file was deleted.

16 changes: 0 additions & 16 deletions test-suite/tools/configure_travis_compilation.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test-suite/tools/fprettify-wrapper.py

This file was deleted.

5 changes: 0 additions & 5 deletions test-suite/tools/run_precommit.sh

This file was deleted.

0 comments on commit 4ea4190

Please sign in to comment.