Skip to content

Commit

Permalink
nvhpc: workaround for submodule bug
Browse files Browse the repository at this point in the history
Work around this bug
https://forums.developer.nvidia.com/t/submodule-matching-error-of-declaration/211278
by removing target attribute from dummy args to module subroutine

(cherry picked from commit 9a0a207)
  • Loading branch information
Gregor Corbin authored and njansson committed Dec 29, 2024
1 parent eaafa02 commit bea5139
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/krylov/krylov.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ end subroutine ksp_t_free
!! @param monitor Enable/disable monitoring, optional.
module subroutine krylov_solver_factory(object, n, type_name, &
max_iter, abstol, M, monitor)
class(ksp_t), allocatable, target, intent(inout) :: object
class(ksp_t), allocatable, intent(inout) :: object
integer, intent(in), value :: n
character(len=*), intent(in) :: type_name
integer, intent(in) :: max_iter
Expand Down
2 changes: 1 addition & 1 deletion src/krylov/krylov_fctry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
!! @param monitor Enable/disable residual history, optional.
module subroutine krylov_solver_factory(object, n, type_name, &
max_iter, abstol, M, monitor)
class(ksp_t), allocatable, target, intent(inout) :: object
class(ksp_t), allocatable, intent(inout) :: object
integer, intent(in), value :: n
character(len=*), intent(in) :: type_name
integer, intent(in) :: max_iter
Expand Down
2 changes: 1 addition & 1 deletion src/krylov/precon.f90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end subroutine pc_update
interface
!> Create a preconditioner
module subroutine precon_factory(pc, type_name)
class(pc_t), target, allocatable, intent(inout) :: pc
class(pc_t), allocatable, intent(inout) :: pc
character(len=*), intent(in) :: type_name
end subroutine precon_factory

Expand Down
2 changes: 1 addition & 1 deletion src/krylov/precon_fctry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

!> Create a preconditioner
module subroutine precon_factory(pc, type_name)
class(pc_t), target, allocatable, intent(inout) :: pc
class(pc_t), allocatable, intent(inout) :: pc
character(len=*), intent(in) :: type_name
character(len=:), allocatable :: type_string

Expand Down
2 changes: 1 addition & 1 deletion src/les/les_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ end subroutine les_model_free
!! @param coef SEM coefficients.
!! @param json A dictionary with parameters.
module subroutine les_model_factory(object, type_name, dofmap, coef, json)
class(les_model_t), allocatable, target, intent(inout) :: object
class(les_model_t), allocatable, intent(inout) :: object
character(len=*), intent(in) :: type_name
type(dofmap_t), intent(in) :: dofmap
type(coef_t), intent(in) :: coef
Expand Down
2 changes: 1 addition & 1 deletion src/les/les_model_fctry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
!! @param coef SEM coefficients.
!! @param json A dictionary with parameters.
module subroutine les_model_factory(object, type_name, dofmap, coef, json)
class(les_model_t), allocatable, target, intent(inout) :: object
class(les_model_t), allocatable, intent(inout) :: object
character(len=*), intent(in) :: type_name
type(dofmap_t), intent(in) :: dofmap
type(coef_t), intent(in) :: coef
Expand Down
2 changes: 1 addition & 1 deletion src/wall_models/wall_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ end subroutine wall_model_free
!! @param json A dictionary with parameters.
module subroutine wall_model_factory(object, coef, msk, facet, nu, &
json)
class(wall_model_t), allocatable, target, intent(inout) :: object
class(wall_model_t), allocatable, intent(inout) :: object
type(coef_t), intent(in) :: coef
integer, intent(in) :: msk(:)
integer, intent(in) :: facet(:)
Expand Down
2 changes: 1 addition & 1 deletion src/wall_models/wall_model_fctry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
!! @param json A dictionary with parameters.
module subroutine wall_model_factory(object, coef, msk, facet, nu, &
json)
class(wall_model_t), allocatable, target, intent(inout) :: object
class(wall_model_t), allocatable, intent(inout) :: object
type(coef_t), intent(in) :: coef
integer, intent(in) :: msk(:)
integer, intent(in) :: facet(:)
Expand Down

0 comments on commit bea5139

Please sign in to comment.