Commit ac576911 authored by Victor Yu's avatar Victor Yu
Browse files

Fix an undefined variable

`IMPLICIT NONE` was added to all program units to catch such errors
at compile time.
parent 837393fd
......@@ -169,6 +169,8 @@ MODULE class_coulomb
USE gvect, ONLY : g, ngm
USE types_bz_grid, ONLY : q_grid
!
IMPLICIT NONE
!
! I/O
!
CLASS(coulomb) :: this
......@@ -304,6 +306,8 @@ MODULE class_coulomb
USE io_global, ONLY : stdout
USE types_bz_grid, ONLY : q_grid
!
IMPLICIT NONE
!
! I/O
!
CLASS(coulomb) :: this
......
......@@ -57,6 +57,7 @@ MODULE west_io
! CHECK IF FILE IS PRESENT
!
LOGICAL FUNCTION file_is_present(lproc,fname,suffix)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
CHARACTER(*),INTENT(IN) :: fname
CHARACTER(*),INTENT(IN) :: suffix
......@@ -78,6 +79,7 @@ MODULE west_io
! WRITE I0
!
SUBROUTINE serial_i0_data_write(lproc,iunit,fname,i0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -101,6 +103,7 @@ MODULE west_io
! WRITE I1
!
SUBROUTINE serial_i1_data_write(lproc,iunit,fname,i1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -128,6 +131,7 @@ MODULE west_io
! WRITE I2
!
SUBROUTINE serial_i2_data_write(lproc,iunit,fname,i2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -158,6 +162,7 @@ MODULE west_io
! WRITE I3
!
SUBROUTINE serial_i3_data_write(lproc,iunit,fname,i3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -191,6 +196,7 @@ MODULE west_io
! WRITE I4
!
SUBROUTINE serial_i4_data_write(lproc,iunit,fname,i4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -227,6 +233,7 @@ MODULE west_io
! WRITE D0
!
SUBROUTINE serial_d0_data_write(lproc,iunit,fname,d0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -252,6 +259,7 @@ MODULE west_io
! WRITE D1
!
SUBROUTINE serial_d1_data_write(lproc,iunit,fname,d1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -278,6 +286,7 @@ MODULE west_io
! WRITE D2
!
SUBROUTINE serial_d2_data_write(lproc,iunit,fname,d2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -304,6 +313,7 @@ MODULE west_io
! WRITE D3
!
SUBROUTINE serial_d3_data_write(lproc,iunit,fname,d3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -330,6 +340,7 @@ MODULE west_io
! WRITE D4
!
SUBROUTINE serial_d4_data_write(lproc,iunit,fname,d4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -356,6 +367,7 @@ MODULE west_io
! WRITE Z0
!
SUBROUTINE serial_z0_data_write(lproc,iunit,fname,z0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -381,6 +393,7 @@ MODULE west_io
! WRITE Z1
!
SUBROUTINE serial_z1_data_write(lproc,iunit,fname,z1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -407,6 +420,7 @@ MODULE west_io
! WRITE Z2
!
SUBROUTINE serial_z2_data_write(lproc,iunit,fname,z2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -433,6 +447,7 @@ MODULE west_io
! WRITE Z3
!
SUBROUTINE serial_z3_data_write(lproc,iunit,fname,z3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -459,6 +474,7 @@ MODULE west_io
! WRITE Z4
!
SUBROUTINE serial_z4_data_write(lproc,iunit,fname,z4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -491,6 +507,7 @@ MODULE west_io
! READ I0
!
SUBROUTINE serial_i0_data_read(lproc,iunit,fname,i0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -514,6 +531,7 @@ MODULE west_io
! READ I1
!
SUBROUTINE serial_i1_data_read(lproc,iunit,fname,i1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -541,6 +559,7 @@ MODULE west_io
! READ I2
!
SUBROUTINE serial_i2_data_read(lproc,iunit,fname,i2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -571,6 +590,7 @@ MODULE west_io
! READ I3
!
SUBROUTINE serial_i3_data_read(lproc,iunit,fname,i3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -604,6 +624,7 @@ MODULE west_io
! READ I4
!
SUBROUTINE serial_i4_data_read(lproc,iunit,fname,i4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -640,6 +661,7 @@ MODULE west_io
! READ D0
!
SUBROUTINE serial_d0_data_read(lproc,iunit,fname,d0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -665,6 +687,7 @@ MODULE west_io
! READ D1
!
SUBROUTINE serial_d1_data_read(lproc,iunit,fname,d1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -691,6 +714,7 @@ MODULE west_io
! READ D2
!
SUBROUTINE serial_d2_data_read(lproc,iunit,fname,d2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -717,6 +741,7 @@ MODULE west_io
! READ D3
!
SUBROUTINE serial_d3_data_read(lproc,iunit,fname,d3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -743,6 +768,7 @@ MODULE west_io
! READ D4
!
SUBROUTINE serial_d4_data_read(lproc,iunit,fname,d4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -769,6 +795,7 @@ MODULE west_io
! READ Z0
!
SUBROUTINE serial_z0_data_read(lproc,iunit,fname,z0dummy)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -794,6 +821,7 @@ MODULE west_io
! READ Z1
!
SUBROUTINE serial_z1_data_read(lproc,iunit,fname,z1dummy,n)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -820,6 +848,7 @@ MODULE west_io
! READ Z2
!
SUBROUTINE serial_z2_data_read(lproc,iunit,fname,z2dummy,n,m)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -846,6 +875,7 @@ MODULE west_io
! READ Z3
!
SUBROUTINE serial_z3_data_read(lproc,iunit,fname,z3dummy,n,m,l)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -872,6 +902,7 @@ MODULE west_io
! READ Z4
!
SUBROUTINE serial_z4_data_read(lproc,iunit,fname,z4dummy,n,m,l,q)
IMPLICIT NONE
LOGICAL,INTENT(IN) :: lproc
INTEGER,INTENT(IN) :: iunit
CHARACTER(*),INTENT(IN) :: fname
......@@ -905,6 +936,7 @@ MODULE west_io
!
SUBROUTINE parallel_i1_data_write(fname,i1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -932,6 +964,7 @@ MODULE west_io
!
SUBROUTINE parallel_i1_irrdata_write(fname,i1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......@@ -986,6 +1019,7 @@ MODULE west_io
!
SUBROUTINE parallel_d1_data_write(fname,d1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -1013,6 +1047,7 @@ MODULE west_io
!
SUBROUTINE parallel_d1_irrdata_write(fname,d1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......@@ -1040,6 +1075,7 @@ MODULE west_io
!
SUBROUTINE parallel_z1_data_write(fname,z1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -1067,6 +1103,7 @@ MODULE west_io
!
SUBROUTINE parallel_z1_irrdata_write(fname,z1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......@@ -1095,6 +1132,7 @@ MODULE west_io
!
SUBROUTINE parallel_i1_data_read(fname,i1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -1121,6 +1159,7 @@ MODULE west_io
!
SUBROUTINE parallel_i1_irrdata_read(fname,i1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......@@ -1148,6 +1187,7 @@ MODULE west_io
!
SUBROUTINE parallel_d1_data_read(fname,d1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -1174,6 +1214,7 @@ MODULE west_io
!
SUBROUTINE parallel_d1_irrdata_read(fname,d1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......@@ -1201,6 +1242,7 @@ MODULE west_io
!
SUBROUTINE parallel_z1_data_read(fname,z1dummy,nloc,offset,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: offset
......@@ -1227,6 +1269,7 @@ MODULE west_io
!
SUBROUTINE parallel_z1_irrdata_read(fname,z1dummy,nloc,map,comm)
USE parallel_include
IMPLICIT NONE
CHARACTER(*),INTENT(IN) :: fname
INTEGER,INTENT(IN) :: nloc
INTEGER,INTENT(IN) :: map(nloc)
......
......@@ -22,6 +22,8 @@ MODULE pdep_db
CONTAINS
!
SUBROUTINE generate_pdep_fname( fname, j, iq)
!
IMPLICIT NONE
!
! I/O
!
......
......@@ -38,6 +38,8 @@ MODULE pdep_io
USE mp_wave, ONLY : mergewf
USE mp, ONLY : mp_bcast, mp_max
!
IMPLICIT NONE
!
! I/O
!
CHARACTER(*), INTENT(IN) :: fname
......@@ -180,6 +182,8 @@ MODULE pdep_io
USE mp_global, ONLY : intra_bgrp_comm
USE base64_module
!
IMPLICIT NONE
!
! I/O
!
CHARACTER(*), INTENT(IN) :: fname
......
......@@ -17,6 +17,8 @@ MODULE scratch_area
USE kinds, ONLY : DP
USE fft_types, ONLY : fft_type_descriptor
!
IMPLICIT NONE
!
SAVE
!
! COULOMB
......@@ -79,6 +81,8 @@ MODULE westin
!
USE kinds, ONLY : DP
!
IMPLICIT NONE
!
SAVE
!
CHARACTER(LEN=512) :: outdir ! main directory
......@@ -95,6 +99,8 @@ MODULE wstat_center
!
USE kinds, ONLY : DP
!
IMPLICIT NONE
!
SAVE
!
! INPUT FOR wstat_control
......@@ -128,6 +134,9 @@ MODULE wstat_center
END MODULE
!
MODULE server_center
!
IMPLICIT NONE
!
SAVE
!
! INPUT for server_control
......@@ -140,6 +149,8 @@ MODULE wfreq_center
!
USE kinds, ONLY : DP
!
IMPLICIT NONE
!
SAVE
!
! INPUT FOR wfreq_control
......@@ -211,6 +222,8 @@ MODULE westpp_center
!
USE kinds, ONLY : DP
!
IMPLICIT NONE
!
SAVE
!
! INPUT FOR wfreq_control
......@@ -236,6 +249,8 @@ MODULE wan_center
!
USE kinds, ONLY : DP
!
IMPLICIT NONE
!
SAVE
!
REAL(DP),ALLOCATABLE :: wanc(:,:)
......@@ -246,6 +261,8 @@ END MODULE
!
!
MODULE io_unit_numbers
!
IMPLICIT NONE
!
SAVE
!
......
......@@ -18,6 +18,7 @@ MODULE conversions
CONTAINS
!
FUNCTION ltoa(l) RESULT(res)
IMPLICIT NONE
CHARACTER(:),ALLOCATABLE :: res
LOGICAL,INTENT(IN) :: l
CHARACTER(4) :: t="true"
......@@ -30,6 +31,7 @@ MODULE conversions
END FUNCTION
!
FUNCTION itoa(i) RESULT(res)
IMPLICIT NONE
CHARACTER(:),ALLOCATABLE :: res
INTEGER,INTENT(IN) :: i
CHARACTER(RANGE(i)+2) :: tmp
......@@ -38,6 +40,7 @@ MODULE conversions
END FUNCTION
!
FUNCTION dtoa(d) RESULT(res)
IMPLICIT NONE
CHARACTER(:),ALLOCATABLE :: res
REAL(DP),INTENT(IN) :: d
CHARACTER(14) :: tmp
......
......@@ -18,12 +18,14 @@ SUBROUTINE my_mkdir( dirname )
USE mp, ONLY : mp_barrier,mp_bcast
USE mp_world, ONLY : mpime, root, world_comm
! USE io_files, ONLY : check_writable
USE forpy_mod, ONLY: call_py, call_py_noret, import_py, module_py
USE forpy_mod, ONLY: tuple, tuple_create
USE forpy_mod, ONLY: dict, dict_create
USE forpy_mod, ONLY: list, list_create
USE forpy_mod, ONLY: object, cast
USE forpy_mod, ONLY: exception_matches, KeyError, err_clear, err_print
USE forpy_mod, ONLY: call_py, call_py_noret, import_py, module_py
USE forpy_mod, ONLY: tuple, tuple_create
USE forpy_mod, ONLY: dict, dict_create
USE forpy_mod, ONLY: list, list_create
USE forpy_mod, ONLY: object, cast
USE forpy_mod, ONLY: exception_matches, KeyError, err_clear, err_print
!
IMPLICIT NONE
!
! I/O
!
......
......@@ -23,6 +23,8 @@ SUBROUTINE set_eprec(m,wfc,eprec)
USE mp, ONLY : mp_sum
USE mp_global, ONLY : intra_bgrp_comm
!
IMPLICIT NONE
!
! I/O
!
INTEGER,INTENT(IN) :: m
......
......@@ -311,10 +311,14 @@ END SUBROUTINE
USE fft_types, ONLY : fft_type_descriptor, fft_type_init
USE gvecw, ONLY : gcutw
USE mp, ONLY : mp_max
USE mp_bands, ONLY : ntask_groups
USE mp_global, ONLY : intra_bgrp_comm,inter_pool_comm
USE stick_base, ONLY : sticks_map
USE gvecs, ONLY : gcutms
!
IMPLICIT NONE
!
!
! I/O
!
TYPE ( fft_type_descriptor ), INTENT(OUT) :: dfft ! customized fft descriptor
......
......@@ -40,6 +40,8 @@ CONTAINS
USE west_version, ONLY : start_forpy
!USE logfile_mod, ONLY : clear_log
!
IMPLICIT NONE
!
CHARACTER(LEN=*), INTENT(IN) :: code
!
LOGICAL :: exst, debug = .false.
......@@ -206,6 +208,8 @@ CONTAINS
USE forpy_mod, ONLY : dict, dict_create
!USE logfile_mod, ONLY : append_log, itoa, ltoa, dtoa
!
IMPLICIT NONE
!
! I/O
!
CHARACTER(LEN=*), INTENT(IN) :: code
......
......@@ -45,6 +45,8 @@ MODULE chi_invert
USE westcom, ONLY : west_prefix,n_pdep_eigen_to_use,l_macropol
USE io_files, ONLY : tmp_dir
!
IMPLICIT NONE
!
! I/O
!
REAL(DP),INTENT(IN) :: matilda(nma,nma)
......@@ -170,6 +172,8 @@ MODULE chi_invert
USE westcom, ONLY : west_prefix,n_pdep_eigen_to_use,l_macropol
USE io_files, ONLY : tmp_dir
!
IMPLICIT NONE
!
! I/O
!
COMPLEX(DP),INTENT(IN) :: matilda(nma,nma)
......
......@@ -833,6 +833,8 @@ MODULE wstat_restart
USE pdep_io, ONLY : pdep_read_G_and_distribute
USE distribution_center, ONLY : pert
!
IMPLICIT NONE
!
INTEGER, INTENT(IN) :: nbase
INTEGER, INTENT(IN), OPTIONAL :: iq
!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment