Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Fortran interface compilation issue using nvfortran #4115

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ jobs:
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_TEST_TYPE=Small \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_GPU_BACKEND=CUDA \
-DCMAKE_C_COMPILER=$(which nvc) \
-DCMAKE_CXX_COMPILER=$(which nvc++) \
Expand Down
4 changes: 4 additions & 0 deletions Src/Base/AMReX_parmparse_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ subroutine amrex_parmparse_add_stringarr (pp, name, v, n) bind(c)
end subroutine amrex_parmparse_add_stringarr
end interface

interface amrex_parmparse_destroy
module procedure amrex_parmparse_destroy
end interface amrex_parmparse_destroy

contains

subroutine amrex_parmparse_build (pp, name)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/AmrCore/AMReX_fluxregister_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ subroutine amrex_fi_fluxregister_overwrite (fr, flxs, scale, geom) bind(c)
end subroutine amrex_fi_fluxregister_overwrite
end interface

interface amrex_fluxregister_destroy
module procedure amrex_fluxregister_destroy
end interface amrex_fluxregister_destroy

contains

subroutine amrex_fluxregister_build (fr, ba, dm, ref_ratio, fine_lev, ncomp)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Base/AMReX_boxarray_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ module amrex_boxarray_module
module procedure amrex_boxarray_print
end interface amrex_print

interface amrex_boxarray_destroy
module procedure amrex_boxarray_destroy
end interface amrex_boxarray_destroy

! interfaces to cpp functions

interface
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Base/AMReX_distromap_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ module amrex_distromap_module
module procedure amrex_distromap_print
end interface amrex_print

interface amrex_distromap_destroy
module procedure amrex_distromap_destroy
end interface amrex_distromap_destroy

! interfaces to cpp functions

interface
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Base/AMReX_fab_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ module amrex_fab_module
module procedure amrex_fab_build_install
end interface amrex_fab_build

interface amrex_fab_destroy
module procedure amrex_fab_destroy
end interface amrex_fab_destroy

contains

! Build a fab, allocate own memory
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Base/AMReX_geometry_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ subroutine amrex_fi_geometry_get_intdomain (geom,lo,hi) bind(c)
end subroutine amrex_fi_geometry_get_intdomain
end interface

interface amrex_geometry_destroy
module procedure amrex_geometry_destroy
end interface amrex_geometry_destroy

contains

subroutine amrex_geometry_finalize ()
Expand Down
12 changes: 12 additions & 0 deletions Src/F_Interfaces/Base/AMReX_multifab_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ module amrex_multifab_module
module procedure amrex_multifab_build_a
end interface amrex_multifab_build

interface amrex_multifab_destroy
module procedure amrex_multifab_destroy
end interface amrex_multifab_destroy

type, public :: amrex_imultifab
logical :: owner = .false.
type (c_ptr) :: p = c_null_ptr
Expand Down Expand Up @@ -129,6 +133,10 @@ module amrex_multifab_module
module procedure amrex_imultifab_build_a
end interface amrex_imultifab_build

interface amrex_imultifab_destroy
module procedure amrex_imultifab_destroy
end interface amrex_imultifab_destroy

type, public :: amrex_mfiter
type(c_ptr) :: p = c_null_ptr
integer ,private :: counter = -1
Expand Down Expand Up @@ -159,6 +167,10 @@ module amrex_multifab_module
module procedure amrex_mfiter_build_badm_s
end interface amrex_mfiter_build

interface amrex_mfiter_destroy
module procedure amrex_mfiter_destroy
end interface amrex_mfiter_destroy

! interfaces to c++ functions

interface
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Base/AMReX_physbc_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ subroutine amrex_fi_delete_physbc (pbc) bind(c)
end subroutine amrex_fi_delete_physbc
end interface

interface amrex_physbc_destroy
module procedure amrex_physbc_destroy
end interface amrex_physbc_destroy

contains

subroutine amrex_physbc_build (pbc, fill, geom)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/LinearSolvers/AMReX_abeclaplacian_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ subroutine amrex_fi_abeclap_set_bcoeffs (abeclap, amrlev, beta) bind(c)
end subroutine amrex_fi_abeclap_set_bcoeffs
end interface

interface amrex_abeclaplacian_destroy
module procedure amrex_abeclaplacian_destroy
end interface amrex_abeclaplacian_destroy

contains

subroutine amrex_abeclaplacian_assign (dst, src)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/LinearSolvers/AMReX_multigrid_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ subroutine amrex_fi_multigrid_set_final_fill_bc (mg, f) bind(c)
end subroutine amrex_fi_multigrid_set_final_fill_bc
end interface

interface amrex_multigrid_destroy
module procedure amrex_multigrid_destroy
end interface amrex_multigrid_destroy

contains

subroutine amrex_multigrid_assign (dst, src)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/LinearSolvers/AMReX_poisson_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ subroutine amrex_fi_delete_linop (linop) bind(c)
end subroutine amrex_fi_delete_linop
end interface

interface amrex_poisson_destroy
module procedure amrex_poisson_destroy
end interface amrex_poisson_destroy

contains

subroutine amrex_poisson_assign (dst, src)
Expand Down
4 changes: 4 additions & 0 deletions Src/F_Interfaces/Particle/AMReX_particlecontainer_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ end subroutine amrex_fi_num_particles_i

end interface

interface amrex_particlecontainer_destroy
module procedure amrex_particlecontainer_destroy
end interface amrex_particlecontainer_destroy

contains

subroutine amrex_particlecontainer_build (pc, amrcore)
Expand Down
Loading