Skip to content

Commit

Permalink
add more whitespace checking and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimustafa committed Mar 3, 2022
1 parent 54e57f5 commit 25cef62
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 31 deletions.
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ repos:
- id: check-yaml
- id: trailing-whitespace
files: (?x)^(
Makefile|
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
examples/example\d\d[-]?\w*/.+win|
src/.+
)$
- id: end-of-file-fixer
files: (?x)^(
Makefile|
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
examples/example\d\d[-]?\w*/.+win|
src/.+
)$
- repo: git://github.com/pseewald/fprettify
rev: v0.3.3
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ all: wannier lib post w90chk2chk w90pov w90vdw w90spn2spn

doc: thedoc

w90chk2chk: objdir
w90chk2chk: objdir
(cd $(ROOTDIR)/src/obj && $(MAKE) -f $(REALMAKEFILE) w90chk2chk)

w90spn2spn: objdir
w90spn2spn: objdir
(cd $(ROOTDIR)/src/obj && $(MAKE) -f $(REALMAKEFILE) w90spn2spn)

wannier: objdir
wannier: objdir
(cd $(ROOTDIR)/src/obj && $(MAKE) -f $(REALMAKEFILE) wannier)

lib: objdir
lib: objdir
(cd $(ROOTDIR)/src/obj && $(MAKE) -f $(REALMAKEFILE) libs)

dynlib: objdir
dynlib: objdir
(cd $(ROOTDIR)/src/obj && $(MAKE) -f $(REALMAKEFILE) dynlibs)

w90pov:
Expand Down Expand Up @@ -68,17 +68,17 @@ veryclean: clean
cd $(ROOTDIR) && rm -f wannier90.x postw90.x libwannier.a libwan2.a w90chk2chk.x w90spn2spn.x
cd $(ROOTDIR)/doc && rm -f user_guide.pdf tutorial.pdf
cd $(ROOTDIR)/doc/user_guide && rm -f user_guide.ps
cd $(ROOTDIR)/doc/tutorial && rm -f tutorial.ps
cd $(ROOTDIR)/doc/tutorial && rm -f tutorial.ps
cd $(ROOTDIR)/test-suite && ./clean_tests -i

thedoc:
$(MAKE) -C $(ROOTDIR)/doc/user_guide
$(MAKE) -C $(ROOTDIR)/doc/tutorial
$(MAKE) -C $(ROOTDIR)/doc/user_guide
$(MAKE) -C $(ROOTDIR)/doc/tutorial

# For now hardcoded to 3.1.0, and using HEAD
# Better to get the version from the io.F90 file and use
# the tag (e.g. v3.1.0) instead of HEAD
dist:
dist:
cd $(ROOTDIR) && git archive HEAD --prefix=wannier90-3.1.0/ -o wannier90-3.1.0.tar.gz

dist-legacy:
Expand Down Expand Up @@ -174,10 +174,10 @@ dist-legacy:
./CHANGE.log \
)

test-serial: w90chk2chk wannier post
test-serial: w90chk2chk wannier post
(cd $(ROOTDIR)/test-suite && ./run_tests --category=default )

test-parallel: w90chk2chk wannier post
test-parallel: w90chk2chk wannier post
(cd $(ROOTDIR)/test-suite && ./run_tests --category=default --numprocs=4 )

# Alias
Expand All @@ -199,7 +199,7 @@ dist-lite:
./CHANGE.log \
)

objdir:
objdir:
@( cd $(ROOTDIR) && if [ ! -d src/obj ] ; \
then mkdir src/obj ; \
fi ) ;
Expand Down
17 changes: 8 additions & 9 deletions src/Makefile.2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- MakeFile -*-
# -*- MakeFile -*-
# Should be no need to change below this line
#

Expand Down Expand Up @@ -36,7 +36,7 @@ endif

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

Expand All @@ -51,7 +51,7 @@ w90spn2spn: ../../w90spn2spn.x

$(LIBRARYV2): $(OBJS)
$(AR) $(ARFLAGS) $(LIBRARYV2) $(OBJS)

post: POSTOPTS = $(TEMP1)
post: COMPILER = $(TEMP2)
post: mpi_test ../../postw90.x
Expand All @@ -71,11 +71,11 @@ ifndef MPIF90
$(info * On many systems MPIF90=mpif90 will work *) \
$(info ********************* STOP **********************) \
$(info ) \
$(error MPIF90 is not set)
$(error MPIF90 is not set)

endif

endif
endif



Expand Down Expand Up @@ -123,7 +123,7 @@ hamiltonian.o: ../hamiltonian.F90 ws_distance.o constants.o io.o utility.o types
overlap.o: ../overlap.F90 constants.o io.o utility.o types.o sitesym.o wannier90_types.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c ../overlap.F90

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

disentangle.o: ../disentangle.F90 constants.o io.o types.o sitesym.o comms.o wannier90_types.o
Expand Down Expand Up @@ -180,10 +180,10 @@ wan_ham.o: $(POSTDIR)wan_ham.F90 types.o postw90_types.o constants.o utility.o p
postw90_common.o: $(POSTDIR)postw90_common.F90 postw90_types.o ws_distance.o comms.o types.o utility.o constants.o io.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c $(POSTDIR)postw90_common.F90

postw90_types.o: $(POSTDIR)postw90_types.F90 comms.o types.o utility.o constants.o io.o
postw90_types.o: $(POSTDIR)postw90_types.F90 comms.o types.o utility.o constants.o io.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c $(POSTDIR)postw90_types.F90

postw90_readwrite.o: $(POSTDIR)postw90_readwrite.F90 comms.o postw90_types.o types.o utility.o constants.o io.o
postw90_readwrite.o: $(POSTDIR)postw90_readwrite.F90 comms.o postw90_types.o types.o utility.o constants.o io.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c $(POSTDIR)postw90_readwrite.F90

wannier_lib.o: ./constants.o ./io.o ./utility.o ./types.o \
Expand All @@ -194,4 +194,3 @@ wannier_lib.o: ./constants.o ./io.o ./utility.o ./types.o \


.PHONY: wannier libs post clean mpi_test w90spn2spn

1 change: 0 additions & 1 deletion src/comms.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1349,4 +1349,3 @@ subroutine comms_scatterv_int_3(array, localcount, rootglobalarray, counts, disp

end subroutine comms_scatterv_int_3
end module w90_comms

1 change: 0 additions & 1 deletion src/plot.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2074,4 +2074,3 @@ subroutine plot_bvec(kmesh_info, num_kpts, stdout, seedname)
end subroutine plot_bvec

end module w90_plot

1 change: 0 additions & 1 deletion src/postw90/postw90.F90
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,3 @@ program postw90
call comms_end

end program postw90

1 change: 0 additions & 1 deletion src/sitesym.F90
Original file line number Diff line number Diff line change
Expand Up @@ -674,4 +674,3 @@ subroutine sitesym_dealloc(sitesym, stdout, seedname)
end subroutine sitesym_dealloc

end module w90_sitesym

1 change: 0 additions & 1 deletion src/transport.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3750,4 +3750,3 @@ subroutine tran_lcr_2c2_build_ham(pl_warning, real_space_ham, fermi_energy_list,
end subroutine tran_lcr_2c2_build_ham

end module w90_transport

1 change: 0 additions & 1 deletion src/w90chk2chk.F90
Original file line number Diff line number Diff line change
Expand Up @@ -769,4 +769,3 @@ program w90chk2chk
call comms_end

end program w90chk2chk

1 change: 0 additions & 1 deletion src/w90spn2spn.F90
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,3 @@ program w90spn2spn
call comms_end

end program w90spn2spn

1 change: 0 additions & 1 deletion src/wannier_prog.F90
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,3 @@ program wannier
call comms_end

end program wannier

0 comments on commit 25cef62

Please sign in to comment.