Skip to content

Commit

Permalink
Remove imports without "only"
Browse files Browse the repository at this point in the history
  • Loading branch information
jubich committed Feb 1, 2024
1 parent 13588bb commit 333548a
Show file tree
Hide file tree
Showing 43 changed files with 168 additions and 111 deletions.
22 changes: 12 additions & 10 deletions app/misc/skderivs/skderivs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@

!> Calculates the first and second derivatives of matrix elements
program skderivs
use dftbp_common_accuracy
use dftbp_common_constants
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : maxL, shellNames
use dftbp_common_globalenv, only : stdOut
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_dftb_slakoeqgrid
use dftbp_io_charmanip
use dftbp_dftb_slakoeqgrid, only : getNIntegrals, getSKIntegrals, init, skEqGridNew,&
& skEqGridOld, TSlakoEqGrid
use dftbp_io_charmanip, only : i2c, unquote
use dftbp_io_hsdparser, only : parseHSD, dumpHSD, getNodeHSDName
use dftbp_io_hsdutils
use dftbp_io_hsdutils2
use dftbp_io_message
use dftbp_type_linkedlist
use dftbp_type_oldskdata
use dftbp_io_hsdutils, only : detailedError, getChild, getChildValue
use dftbp_io_hsdutils2, only : warnUnprocessedNodes
use dftbp_type_linkedlist, only : append, asArray, init, intoArray, len, TListInt,&
& TListIntR1
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
#:if WITH_MPI
use dftbp_common_mpienv
#:endif
use xmlf90_flib_dom
use dftbp_extlibs_xmlf90, only : char, fNode, string, assignment(=), append_to_string,&
& resize_string
implicit none


Expand Down
9 changes: 5 additions & 4 deletions app/misc/slakovalue/integvalue.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
!> Reads a spline repulsive from an SK-table and returns its value and its first
!! and second derivatives.
program integvalue
use dftbp_common_accuracy
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_globalenv, only : stdOut
use dftbp_dftb_slakoeqgrid
use dftbp_io_message
use dftbp_type_oldskdata
use dftbp_dftb_slakoeqgrid, only : getCutoff, getSKIntegrals, init, skEqGridNew,&
& TSlakoEqGrid
use dftbp_io_message, only : error
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
implicit none

integer, parameter :: nSKInter = 20
Expand Down
43 changes: 23 additions & 20 deletions app/phonons/initphonons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,32 @@
#:include 'common.fypp'

module phonons_initphonons
use dftbp_common_accuracy
use dftbp_common_atomicmass
use dftbp_common_constants
use dftbp_common_environment
use dftbp_common_accuracy, only : dp, lc, mc
use dftbp_common_atomicmass, only : getAtomicMass
use dftbp_common_constants, only : amu__au
use dftbp_common_environment, only : TEnvironment
use dftbp_common_file, only : TFileDescr, closeFile, openFile
use dftbp_common_globalenv
use dftbp_common_globalenv, only : stdOut, tIoProc
use dftbp_common_status, only : TStatus
use dftbp_common_unitconversion
use dftbp_dftb_periodic
use dftbp_io_charmanip
use dftbp_common_unitconversion, only : energyUnits, lengthUnits
use dftbp_dftb_periodic, only : getCellTranslations, getNrOfNeighboursForAll,&
& getSuperSampling, TNeighbourList, TNeighbourlist_init, updateNeighbourList
use dftbp_io_charmanip, only : i2c, tolower, unquote
use dftbp_io_hsdparser, only : parseHSD, dumpHSD
use dftbp_io_hsdutils
use dftbp_io_hsdutils2
use dftbp_io_message
use dftbp_io_tokenreader
use dftbp_io_xmlutils
use dftbp_math_simplealgebra
use dftbp_transport_negfvars
use dftbp_type_linkedlist
use dftbp_type_oldskdata
use dftbp_type_typegeometryhsd
use dftbp_type_wrappedintr
use xmlf90_flib_dom
use dftbp_io_hsdutils, only : detailedError, getChild, getChildren, getChildValue,&
& getFirstTextChild, getSelectedAtomIndices, getSelectedIndices, setChild, setChildValue
use dftbp_io_hsdutils2, only : convertUnitHsd, setUnprocessed, warnUnprocessedNodes
use dftbp_io_message, only : error
use dftbp_io_tokenreader, only : getNextToken
use dftbp_math_simplealgebra, only : determinant33
use dftbp_transport_negfvars, only : ContactInfo, TNEGFtundos, TTransPar
use dftbp_type_linkedlist, only : append, asArray, asVector, destruct, get, init,&
& len, TListCharLc, TListInt, TListIntR1, TListReal, TListRealR1, TListString
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
use dftbp_type_typegeometryhsd, only : readTGeometryGen, readTGeometryHSD, TGeometry
use dftbp_type_wrappedintr, only : TWrappedInt1
use dftbp_extlibs_xmlf90, only : char, fnode, fnodelist, getLength, string, textNodeName,&
& assignment(=), getNodeName, getItem1, destroyNodeList
implicit none
private

Expand Down
12 changes: 6 additions & 6 deletions app/phonons/libnegfint.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#:include "common.fypp"

module phonons_libnegfint
use dftbp_common_accuracy
use dftbp_common_environment
use dftbp_common_accuracy, only: dp
use dftbp_common_environment, only: TEnvironment
use dftbp_common_file, only : TFileDescr, closeFile, openFile
use dftbp_common_globalenv, only : stdOut, tIoProc
use dftbp_extlibs_negf, only : getel, lnParams, pass_DM, Tnegf, kb, units, convertHeatCurrent,&
Expand All @@ -39,12 +39,12 @@ module phonons_libnegfint
& set_elph_block_dephasing, set_elph_dephasing, set_elph_s_dephasing, set_ldos_indexes,&
& set_tun_indexes, set_params, writememinfo, writepeakinfo, dns2csr, csr2dns, nzdrop, printcsr
use phonons_initphonons, only : TempMin, TempMax, TempStep, modeEnum
use dftbp_io_message
use dftbp_transport_matconv
use dftbp_transport_negfvars
use dftbp_io_message, only: error
use dftbp_transport_matconv, only: destruct
use dftbp_transport_negfvars, only: TNEGFTunDos, TTranspar
use dftbp_type_commontypes, only : TOrbitals
#:if WITH_MPI
use dftbp_extlibs_mpifx
use dftbp_extlibs_mpifx, only: mpifx_comm, mpifx_reduceip, MPI_SUM
use dftbp_extlibs_negf, only : negf_mpi_init
#:endif
implicit none
Expand Down
19 changes: 11 additions & 8 deletions app/phonons/phonons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
program phonons
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : Hartree__cm, Bohr__AA, Hartree__J, Hartree__eV, hbar, pi
use dftbp_common_environment
use dftbp_common_environment, only: TEnvironment, TEnvironment_init
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv
use phonons_initphonons
use dftbp_io_message
use dftbp_io_taggedoutput
use dftbp_common_globalenv, only : destructGlobalEnv, initGlobalEnv, stdOut, tIOProc
use phonons_initphonons, only : tTransport, tWriteTagged, geo, neighbourList,&
& modesToPlot, nCells, tPlotModes, tAnimateModes, tXmakeMol, tCompModes,&
& tPhonDispersion, nSteps, nMovedAtom, nModesToPlot, nCycles, iMovedAtoms,&
& outputUnits, nKPoints, nAtomUnitCell, autotestTag, nNeighbour, selTypeModes,&
& img2CentCell, kPoint, transpar, dynMatrix, tundos, atomicMasses, initProgramVariables,&
& destructProgramVariables
use dftbp_io_message, only : error
use dftbp_io_taggedoutput, only : TTaggedWriter, TTaggedWriter_init
use dftbp_math_eigensolver, only : heev
use dftbp_math_simplealgebra, only : invert33
use dftbp_type_typegeometry
use phonons_libnegfint
use ln_structure
use phonons_libnegfint, only : calc_phonon_current, init_tun_proj, negf_init, negf_init_str
implicit none

type(TEnvironment) :: env
Expand Down
20 changes: 10 additions & 10 deletions app/transporttools/helpsetupgeom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
!--------------------------------------------------------------------------------------------------!

module transporttools_helpsetupgeom
use dftbp_common_accuracy
use dftbp_common_constants
use dftbp_common_globalenv
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : Bohr__AA
use dftbp_common_globalenv, only : stdOut
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_io_message
use dftbp_math_f08math
use dftbp_math_simplealgebra
use dftbp_math_sorting
use dftbp_io_message, only : error, warning
use dftbp_math_simplealgebra, only : cross3
use dftbp_math_sorting, only : index_heap_sort
use dftbp_transport_negfvars, only : contactInfo
use dftbp_type_linkedlist
use dftbp_type_typegeometry
use dftbp_type_wrappedintr
use dftbp_type_linkedlist, only : append, asArray, destruct, get, init, len,&
& TListInt, TListIntR1
use dftbp_type_typegeometry, only : TGeometry
use dftbp_type_wrappedintr, only : TWrappedInt1
implicit none

private
Expand Down
10 changes: 2 additions & 8 deletions app/transporttools/inputdata.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@

!> Contains data type representing the input data for setupgeom
module transporttools_inputdata
use dftbp_common_accuracy
use dftbp_io_message
use dftbp_transport_negfvars
use dftbp_type_commontypes
use dftbp_type_linkedlist
use dftbp_type_typegeometry
use dftbp_type_wrappedintr

use dftbp_transport_negfvars, only: TTransPar
use dftbp_type_typegeometry, only: TGeometry
implicit none
private

Expand Down
2 changes: 1 addition & 1 deletion app/transporttools/setupgeom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#:include 'common.fypp'

program setupgeom
use dftbp_common_globalenv
use dftbp_common_globalenv, only: destructGlobalEnv, initGlobalEnv
use dftbp_common_release, only : releaseYear
use dftbp_io_formatout, only : printDftbHeader
use transporttools_inputdata, only : TInputData
Expand Down
5 changes: 3 additions & 2 deletions src/dftbp/api/mm/capi.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

!> Contains the C-API of DFTB+.
module dftbp_capi
use, intrinsic :: iso_c_binding
use, intrinsic :: iso_fortran_env
use, intrinsic :: iso_c_binding, only : c_char, c_ptr, c_int, c_null_ptr, c_bool,&
& c_double, c_funptr, c_null_char, c_associated, c_loc, c_f_pointer, c_f_procpointer
use, intrinsic :: iso_fortran_env, only : output_unit
use dftbp_common_accuracy, only : dp
use dftbp_common_file, only : TFileDescr, openFile
use dftbp_common_globalenv, only : instanceSafeBuild
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/api/mm/mmapi.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

!> Provides DFTB+ API for MM-type high level access
module dftbp_mmapi
use iso_fortran_env, only : output_unit
use, intrinsic :: iso_fortran_env, only : output_unit
use dftbp_common_accuracy, only : dp
use dftbp_common_environment, only : TEnvironment, TEnvironment_init
use dftbp_common_file, only : TFileDescr, openFile, closeFile
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/api/mm/qdepextpotgenc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

!> Simplified C-interface with callbacks for population dependant external potential generators.
module dftbp_dftbplus_qdepextpotgenc
use, intrinsic :: iso_c_binding
use, intrinsic :: iso_c_binding, only : c_double, c_ptr
use dftbp_common_accuracy, only : dp
use dftbp_dftbplus_qdepextpotgen, only : TQDepExtPotGen
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/common/gpuenv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

!> Information on any GPUs on the system
module dftbp_common_gpuenv
use iso_c_binding, only : c_int
use, intrinsic :: iso_c_binding, only : c_int
use dftbp_common_globalenv, only : stdOut
use dftbp_extlibs_magma, only : getGpusAvailable, getGpusRequested
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/derivs/rotatedegen.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module dftbp_derivs_rotatedegen
#:if WITH_SCALAPACK
use dftbp_common_environment, only : TEnvironment
use dftbp_type_densedescr, only: TDenseDescr
use linecomm_module, only : linecomm
use dftbp_extlibs_scalapackfx, only : linecomm
#:endif
implicit none

Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/dftb/dispmbd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module dftbp_dftb_dispmbd
use dftbp_math_simplealgebra, only: determinant33
use dftbp_type_commontypes, only : TOrbitals
use dftbp_type_typegeometry, only: TGeometry
use mbd, only: TDispMbdInp => mbd_input_t, mbd_calc_t
use dftbp_extlibs_mbd, only: TDispMbdInp, mbd_calc_t
implicit none

private
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/dftb/sccinit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module dftbp_dftb_sccinit
use dftbp_type_commontypes, only : TOrbitals
use dftbp_type_multipole, only : TMultipole
use dftbp_dftb_hybridxc, only : checkSupercellFoldingMatrix
use dftbp_dftb_densitymatrix, onLy : TDensityMatrix
use dftbp_dftb_densitymatrix, only : TDensityMatrix
implicit none

private
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/dftbplus/mainio.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module dftbp_dftbplus_mainio
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_common_globalenv, only : stdOut, destructGlobalEnv, abortProgram
use dftbp_common_status, only : TStatus
use dftbp_dftb_densitymatrix, onLy : TDensityMatrix
use dftbp_dftb_densitymatrix, only : TDensityMatrix
use dftbp_dftb_determinants, only : TDftbDeterminants
use dftbp_dftb_dispersions, only : TDispersionIface
use dftbp_dftb_elecconstraints, only: TElecConstraint
Expand Down
4 changes: 4 additions & 0 deletions src/dftbp/extlibs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ if(WITH_MAGMA)
${curdir}/magmac.c)
endif()

if(WITH_MBD)
list(APPEND sources-fpp ${curdir}/mbd.F90)
endif()

set(ALL-SOURCES-FPP ${ALL-SOURCES-FPP} ${sources-fpp} PARENT_SCOPE)
set(ALL-SOURCES-C ${ALL-SOURCES-C} ${sources-c} PARENT_SCOPE)
2 changes: 1 addition & 1 deletion src/dftbp/extlibs/arpack.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
module dftbp_extlibs_arpack
use dftbp_common_accuracy, only : rsp, rdp
#:if not WITH_ARPACK
use dftbp_io_message
use dftbp_io_message, only : error
#:endif
implicit none
private
Expand Down
21 changes: 19 additions & 2 deletions src/dftbp/extlibs/elsiiface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,26 @@
module dftbp_extlibs_elsiiface
use dftbp_common_accuracy, only : dp
#:if WITH_ELSI
use elsi
use elsi, only : elsi_ev_complex, elsi_ev_real, elsi_get_version, elsi_finalize,&
& elsi_reinit, elsi_init, elsi_set_mpi_global, elsi_set_sing_check, elsi_set_mpi,&
& elsi_set_csc_blk, elsi_set_zero_def, elsi_set_sparsity_mask, elsi_set_blacs,&
& elsi_init_rw, elsi_set_rw_blacs, elsi_set_rw_zero_def, elsi_get_datestamp,&
& elsi_set_elpa_solver, elsi_set_elpa_autotune, elsi_set_elpa_gpu,&
& elsi_set_omm_flavor, elsi_set_omm_n_elpa, elsi_set_omm_tol,&
& elsi_set_pexsi_np_per_pole, elsi_set_pexsi_mu_min, elsi_set_pexsi_mu_max,&
& elsi_set_pexsi_method, elsi_set_pexsi_n_pole, elsi_set_pexsi_n_mu,&
& elsi_set_pexsi_np_symbo, elsi_set_pexsi_delta_e, elsi_set_ntpoly_tol,&
& elsi_set_ntpoly_filter, elsi_set_ntpoly_method, elsi_set_spin, elsi_set_kpoint,&
& elsi_set_output, elsi_set_output_log, elsi_get_entropy, elsi_get_mu,&
& elsi_get_pexsi_mu_max, elsi_get_pexsi_mu_min, elsi_write_mat_real,&
& elsi_finalize_rw, elsi_dm_complex, elsi_write_mat_complex, elsi_set_mu_broaden_width,&
& elsi_set_mu_mp_order, elsi_set_mu_broaden_scheme, elsi_set_pexsi_temp,&
& elsi_set_csc, elsi_set_rw_csc, elsi_write_mat_complex_sparse, elsi_dm_complex_sparse,&
& elsi_get_edm_real_sparse, elsi_get_edm_real, elsi_set_rw_mpi, elsi_get_edm_complex,&
& elsi_get_edm_complex_sparse, elsi_dm_real, elsi_write_mat_real_sparse,&
& elsi_dm_real_sparse, elsi_rw_handle, elsi_handle
#:else
use iso_c_binding, only : r8 => c_double, i4 => c_int32_t
use, intrinsic :: iso_c_binding, only : r8 => c_double, i4 => c_int32_t
use dftbp_io_message, only : error
#:endif
implicit none
Expand Down
3 changes: 2 additions & 1 deletion src/dftbp/extlibs/fsockets.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

!> Socket interface library
module dftbp_extlibs_fsockets
use fsockets
use fsockets, only : writebuffer, readbuffer, close_socket, connect_inet_socket,&
& connect_unix_socket
implicit none

#:if WITH_SOCKETS
Expand Down
6 changes: 5 additions & 1 deletion src/dftbp/extlibs/mpifx.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
!> Exporting mpifx functionality if compiled with mpi support, otherwise empty.
module dftbp_extlibs_mpifx
#:if WITH_MPI
use libmpifx_module
use libmpifx_module, only : mpifx_abort, mpifx_allgather, mpifx_allreduce,&
& mpifx_allreduceip, mpifx_barrier, mpifx_bcast, mpifx_comm, mpifx_finalize,&
& mpifx_init_thread, mpifx_recv, mpifx_reduceip, mpifx_send, MPIFX_SIZE_T, &
& mpifx_win, MPI_COMM_TYPE_SHARED, MPI_LAND, MPI_LOR, MPI_MAX, MPI_SUM, &
& MPI_THREAD_FUNNELED, mpifx_gatherv
#:endif
implicit none
public
Expand Down
3 changes: 2 additions & 1 deletion src/dftbp/extlibs/negf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module dftbp_extlibs_negf
& init_negf, init_structure, pass_hs, set_bp_dephasing, set_drop, set_elph_block_dephasing,&
& set_elph_dephasing, set_elph_s_dephasing, set_ldos_indexes, set_params, set_scratch,&
& set_tun_indexes, writememinfo, writepeakinfo, dns2csr, csr2dns, nzdrop, printcsr,&
& compute_phonon_current, thermal_conductance, convertHeatCurrent, convertHeatConductance
& compute_phonon_current, thermal_conductance, convertHeatCurrent, convertHeatConductance,&
& r_CSR, r_DNS
#:if WITH_MPI
use libnegf, only : negf_mpi_init, negf_cart_init
#:endif
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/extlibs/poisson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module dftbp_extlibs_poisson
use dftbp_io_message, only : error
use dftbp_type_commontypes, only : TOrbitals
#:if WITH_MPI
use libmpifx_module, only : mpifx_barrier, mpifx_bcast
use dftbp_extlibs_mpifx, only : mpifx_barrier, mpifx_bcast
#:endif
#:if WITH_POISSON
use dftbp_poisson_poisson, only : poiss_savepotential, poiss_updcoords, active_id, natoms,&
Expand Down
8 changes: 7 additions & 1 deletion src/dftbp/extlibs/scalapackfx.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
!> Exports scalapackfx functionality if compiled with scalapack support, otherwise empty.
module dftbp_extlibs_scalapackfx
#:if WITH_SCALAPACK
use libscalapackfx_module
use libscalapackfx_module, only : DLEN_, blacsgrid, blocklist, size,&
& pblasfx_pgemm, pblasfx_ptranc, scalafx_getdescriptor, scalafx_getlocalshape,&
& scalafx_indxl2g, scalafx_cpl2g, scalafx_islocal, scalafx_cpg2l, pblasfx_psymv,&
& CSRC_, RSRC_, MB_, NB_, scalafx_addl2g, scalafx_addg2l, pblasfx_ptran,&
& pblasfx_phemm, pblasfx_psymm, linecomm, scalafx_ppotrf, scalafx_ppotri, M_,&
& N_, scalafx_pgetrf, blacsfx_gemr2d, scalafx_phegv, scalafx_phegvd,&
& scalafx_phegvr, scalafx_psygv, scalafx_psygvd, scalafx_psygvr
#:endif
implicit none
public
Expand Down
Loading

0 comments on commit 333548a

Please sign in to comment.