Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
40b5cf4
Use Fortran 2008 compliant MPI interface module (mpi_f08).
ohearnk Mar 2, 2025
f9f0ebc
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 2, 2025
7f84f64
Merge branch 'hip-f-func-porting' into mpi-fortran-module-modernizati…
ohearnk Mar 5, 2025
1b3b1a2
Eliminate homebrew warnings for MacOS tests.
ohearnk Mar 6, 2025
483af80
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 6, 2025
d6c36b3
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 13, 2025
29eb999
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Apr 4, 2025
aa37d67
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Apr 5, 2025
733445d
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Jul 5, 2025
0d1ea19
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Oct 31, 2025
4e8d00a
Remove QUICK allmod references in DL-FIND due to MPI type conflicts.
ohearnk Oct 31, 2025
0f0a43c
Fix undefined type error (quick_qm_struct) due to allmod removeal in …
ohearnk Oct 31, 2025
d6a60a3
Switch DL-FIND code to mpi_f08 Fortran module.
ohearnk Oct 31, 2025
e928f87
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Nov 19, 2025
b67499f
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 9, 2026
1581d71
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 20, 2026
d9a54e6
Merge branch 'master' into mpi-fortran-module-modernization-2.
ohearnk Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/basis.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ subroutine readbasis(natomxiao,natomstart,natomfinal,nbasisstart,nbasisfinal,ier
use allmod
use quick_gridpoints_module
use quick_exception_module

#ifdef CEW
use quick_cew_module, only: quick_cew
#endif

#ifdef MPIV
use mpi
use mpi_f08
#endif

!
implicit double precision(a-h,o-z)

character(len=120) :: line
character(len=2) :: atom,shell
logical :: isatom
Expand Down
2 changes: 1 addition & 1 deletion src/calMP2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ subroutine MPI_calmp2
use allmod
use quick_gaussian_class_module
use quick_cutoff_module, only: cshell_density_cutoff
use mpi
use mpi_f08
implicit double precision(a-h,o-z)

double precision cutoffTest,testtmp,testCutoff
Expand Down
2 changes: 1 addition & 1 deletion src/dlfind/dl_find.f90
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ subroutine dlf_run(ierr2 &
use quick_files_module, only: write_molden
use quick_molden_module, only: quick_molden
#ifdef MPIV
use mpi
use mpi_f08
use quick_mpi_module, only: bMPI, mpierror
#endif
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/dlfind/dlf_mpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
!! SOURCE
!!****
module dlf_mpi_module
use mpi
use mpi_f08
save

integer :: global_comm ! set to, and use instead of, mpi_comm_world
Expand Down
5 changes: 2 additions & 3 deletions src/dlfind/dlfind_main_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ subroutine dlf_get_gradient(nvar,coords,energy,gradient,iimage,kiter,status,ierr
use driver_parameter_module
use dlf_parameter_module, only: rk
use dlf_stat, only: stat
use allmod
use quick_calculated_module, only: quick_qm_struct
use quick_gridpoints_module
use quick_molspec_module, only: natom, xyz, quick_molspec
use quick_cutoff_module, only: schwarzoff
Expand All @@ -311,7 +311,7 @@ subroutine dlf_get_gradient(nvar,coords,energy,gradient,iimage,kiter,status,ierr
use quick_method_module,only: quick_method
use quick_exception_module, only: RaiseException
#ifdef MPIV
use mpi
use mpi_f08
use quick_mpi_module, only: master, bMPI, mpierror
#endif
!use vib_pot
Expand Down Expand Up @@ -419,7 +419,6 @@ subroutine dlf_get_hessian(nvar,coords,hessian,status)
! get the hessian at a given geometry
use driver_parameter_module
use dlf_parameter_module
! use allmod
! use quick_grad_cshell_module, only: cshell_gradient
!use vib_pot
implicit none
Expand Down
4 changes: 2 additions & 2 deletions src/dnc/dnc_hfoperator.f90
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ subroutine mpi_hfoperatordc(oneElecO)
use quick_gaussian_class_module
use quick_cutoff_module, only: cshell_density_cutoff
use quick_eri_cshell_module, only: getCshellEriEnergy
use mpi
implicit double precision(a-h,o-z)
use mpi_f08
implicit none

double precision testtmp,cutoffTest,oneElecO(nbasis,nbasis)
integer II,JJ,KK,LL,NBI1,NBI2,NBJ1,NBJ2,NBK1,NBK2,NBL1,NBL2
Expand Down
4 changes: 2 additions & 2 deletions src/dnc/dnc_scf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
subroutine electdiisdc(jscf,PRMS)
use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)
implicit none

logical :: diisdone
dimension :: B(quick_method%maxdiisscf+1,quick_method%maxdiisscf+1),BSAVE(quick_method%maxdiisscf+1,quick_method%maxdiisscf+1)
Expand Down
4 changes: 2 additions & 2 deletions src/dnc/inidivcon.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
subroutine inidivcon(natomsaved)
use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision (a-h,o-z)
implicit none

double precision rbuffer1,rbuffer2

Expand Down
3 changes: 2 additions & 1 deletion src/finalize.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ subroutine quick_exit(io, ierr)

use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none

integer io ! close this unit if greater than zero
integer, intent(inout) :: ierr

Expand Down
3 changes: 1 addition & 2 deletions src/getEnergy.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ subroutine getEnergy(isGuess, ierr)
use quick_cew_module, only : quick_cew
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif

implicit none

double precision :: distance
Expand Down
3 changes: 1 addition & 2 deletions src/getMol.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ subroutine getMol(ierr)
use quick_io_module, only: read_real8_rank3
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif

implicit none

integer :: fail
Expand Down
2 changes: 1 addition & 1 deletion src/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ program quick
use quick_files_module, only: write_molden, set_quick_files, print_quick_io_file
use quick_molsurface_module, only: generate_MKS_surfaces
#ifdef MPIV
use mpi
use mpi_f08
#endif
#if defined CUDA || defined CUDA_MPIV || defined HIP || defined HIP_MPIV
use quick_basis_module, only: quick_basis, aexp, cutprim, dcoeff, itype
Expand Down
2 changes: 1 addition & 1 deletion src/modules/include/eri.fh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ subroutine get_eri_precomputables

use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none

Expand Down
12 changes: 6 additions & 6 deletions src/modules/include/gradient.fh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ contains
use allmod
use quick_lri_grad_module
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)

Expand Down Expand Up @@ -188,7 +188,7 @@ contains
use quick_grad_cshell_module
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)

Expand Down Expand Up @@ -522,7 +522,7 @@ contains
use quick_cutoff_module, only: cshell_density_cutoff
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none
integer :: Iatm, Imomentum, IIsh, JJsh, i, j, nshell_mpi
Expand Down Expand Up @@ -688,7 +688,7 @@ contains
use quick_grad_cshell_module, only: get_ijbas_derivative
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)

Expand Down Expand Up @@ -835,7 +835,7 @@ contains
use quick_eri_grad_cshell_module, only: cshell_eri_grad
#endif
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)

Expand Down Expand Up @@ -988,7 +988,7 @@ contains
use xc_f90_types_m
use xc_f90_lib_m
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none

Expand Down
3 changes: 1 addition & 2 deletions src/modules/quick_api_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ end subroutine set_quick_mpi
! broadcasts results from master to slaves

subroutine broadcast_quick_mpi_results(self,ierr)
use mpi

use mpi_f08
implicit none

type(quick_api_type), intent(inout) :: self
Expand Down
4 changes: 2 additions & 2 deletions src/modules/quick_api_test_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ end subroutine load_test_data
! initialize mpi library and save mpirank and mpisize
subroutine mpi_initialize(mpisize, mpirank, master, mpierror)

use mpi
use mpi_f08
implicit none

integer, intent(inout) :: mpisize, mpirank, mpierror
Expand Down Expand Up @@ -143,7 +143,7 @@ end subroutine printQuickMPIOutput

subroutine mpi_exit

use mpi
use mpi_f08
implicit none
integer :: mpierror

Expand Down
3 changes: 2 additions & 1 deletion src/modules/quick_calculated_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,9 @@ subroutine broadcast_quick_qm_struct(self)
use quick_mpi_module
use quick_method_module, only: quick_method
use quick_molspec_module, only: quick_molspec
use mpi
use mpi_f08
implicit none

type (quick_qm_struct_type) self
integer natom
integer nbasis,nbasis2
Expand Down
10 changes: 4 additions & 6 deletions src/modules/quick_cew_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ subroutine quick_cew_prescf()
use quick_method_module, only: quick_method
#ifdef MPIV
use quick_mpi_module
use mpi
use mpi_f08
#endif

implicit none

double precision :: E
Expand Down Expand Up @@ -410,7 +409,7 @@ subroutine quick_cew_prescf_quad()
use quick_gridpoints_module, only : quick_dft_grid
use quick_molspec_module, only : quick_molspec
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none

Expand Down Expand Up @@ -900,10 +899,9 @@ subroutine quick_cew_grad_quad()
use quick_calculated_module, only : quick_qm_struct
use quick_molspec_module, only : quick_molspec
#ifdef MPIV
use mpi
use mpi_f08
#endif

implicit double precision(a-h,o-z)
implicit none

integer II,JJ,KK,LL,NBI1,NBI2,NBJ1,NBJ2,NBK1,NBK2,NBL1,NBL2
common /hrrstore/II,JJ,KK,LL,NBI1,NBI2,NBJ1,NBJ2,NBK1,NBK2,NBL1,NBL2
Expand Down
5 changes: 2 additions & 3 deletions src/modules/quick_cutoff_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ end subroutine deallocate_quick_cutoff
subroutine schwarzoff
use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif

Implicit none
implicit none

integer ii,jj
double precision Ymaxtemp
Expand Down
7 changes: 5 additions & 2 deletions src/modules/quick_gridpoints_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,12 @@ subroutine get_sigrad
! 2
use allmod
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)
implicit none

double precision :: amin, current, gamma, gamma2pi, radial, stepsize, target
integer :: i, Ibas, Icon, L

#ifdef MPIV
if(master) then
Expand Down
3 changes: 1 addition & 2 deletions src/modules/quick_method_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ module quick_method_module
subroutine broadcast_quick_method(self, ierr)
use quick_MPI_module
use quick_exception_module
use mpi

use mpi_f08
implicit none

type(quick_method_type) self
Expand Down
2 changes: 1 addition & 1 deletion src/modules/quick_molspec_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ end subroutine deallocate_quick_molspec
subroutine broadcast_quick_molspec(self,ierr)
use quick_mpi_module
use quick_exception_module
use mpi
use mpi_f08

implicit none
type (quick_molspec_type), intent(inout) :: self
Expand Down
13 changes: 10 additions & 3 deletions src/modules/quick_mpi_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ module quick_mpi_module
!------------------------------------------------------------------------

#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit none

integer :: mpierror
integer :: mpirank
integer :: myid
integer :: namelen
integer :: mpisize
character(len=80) pname
#ifdef MPIV
character(len=MPI_MAX_PROCESSOR_NAME) pname
#endif
logical :: master = .true. ! flag to show if the node is master node
logical :: bMPI = .true. ! flag to show if MPI is turn on
logical :: libMPIMode = .false. ! if mpi is initialized somewhere other than quick
integer, allocatable :: QUICK_MPI_STATUS(:)
#ifdef MPIV
type(MPI_Status) :: QUICK_MPI_STATUS
#endif
integer, parameter :: MIN_1E_MPI_BASIS=6
integer, allocatable :: mgpu_ids(:)
integer :: mgpu_id
Expand Down Expand Up @@ -73,7 +78,9 @@ subroutine print_quick_mpi(io,ierr)
write (io,*)
write (io,'("| - MPI Enabled -")')
write (io,'("| TOTAL RANKS = ",i5)') mpisize
#ifdef MPIV
write (io,'("| MASTER NAME = ",A30)') pname
#endif

end subroutine print_quick_mpi

Expand Down
4 changes: 2 additions & 2 deletions src/modules/quick_oei_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ subroutine get1e(deltaO)
#endif

#ifdef MPIV
use mpi
use mpi_f08
#endif

implicit double precision(a-h,o-z)

double precision :: temp2d(nbasis,nbasis)
logical, intent(in) :: deltaO

Expand Down
2 changes: 1 addition & 1 deletion src/modules/quick_optimizer_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subroutine optimize(ierr)
use quick_exception_module
use quick_molden_module, only: quick_molden
#ifdef MPIV
use mpi
use mpi_f08
#endif
implicit double precision(a-h,o-z)

Expand Down
Loading
Loading