Skip to content

Commit

Permalink
Merge pull request #506 from wannier-developers/jimustafa-cleanup
Browse files Browse the repository at this point in the history
add more whitespace checking and fixes (replaces PR #404)
  • Loading branch information
JeromeCCP9 authored Jun 24, 2024
2 parents 829f9f6 + bddeb2a commit 6d433b6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ repos:
)$
- id: trailing-whitespace
files: (?x)^(
Makefile|
config/make[.]inc[.\w]*|
tutorials/tutorial\d\d[-]?\w*/.+win
tutorials/tutorial\d\d[-]?\w*/.+win|
src/.+
)$
- id: end-of-file-fixer
files: (?x)^(
Makefile|
config/make[.]inc[.\w]*|
tutorials/tutorial\d\d[-]?\w*/.+win
tutorials/tutorial\d\d[-]?\w*/.+win|
src/.+
)$
- repo: https://github.com/pseewald/fprettify
rev: v0.3.3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ dist-legacy:
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=par --numprocs=4 )

# Alias
Expand Down
15 changes: 7 additions & 8 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 @@ -130,7 +130,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 comms.o error.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

error_base.o: ../error_base.F90
Expand Down Expand Up @@ -193,11 +193,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 error.o
$(COMPILER) $(POSTOPTS) $(FCOPTS) -c $(POSTDIR)postw90_readwrite.F90

.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 @@ -1920,5 +1920,4 @@ subroutine comms_scatterv_int_3(array, localcount, rootglobalarray, counts, disp
call comms_no_sync_scatterv_int_3(array, localcount, rootglobalarray, counts, displs, &
error, comm)
end subroutine comms_scatterv_int_3

end module w90_comms
1 change: 0 additions & 1 deletion src/error.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,3 @@ subroutine set_error_warn(err, mesg, comm)
end subroutine set_error_warn

end module w90_error

2 changes: 1 addition & 1 deletion src/readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4295,7 +4295,7 @@ subroutine init_settings(settings)
end subroutine init_settings

subroutine expand_settings(settings) ! this is a compromise to avoid a fixed size
type(settings_data), allocatable :: nentries(:);
type(settings_data), allocatable :: nentries(:)
type(settings_type), intent(inout) :: settings
integer :: n, m ! old, new sizes
integer, parameter :: incsize = 20 ! default increment when settings array grows
Expand Down
1 change: 0 additions & 1 deletion src/w90chk2chk.F90
Original file line number Diff line number Diff line change
Expand Up @@ -757,4 +757,3 @@ program w90chk2chk
close (unit=stdout)

end program w90chk2chk

1 change: 0 additions & 1 deletion src/w90spn2spn.F90
Original file line number Diff line number Diff line change
Expand Up @@ -409,4 +409,3 @@ program w90spn2spn
close (unit=stdout)

end program w90spn2spn

0 comments on commit 6d433b6

Please sign in to comment.