Skip to content

Commit

Permalink
Ensure that hwloc procedures are called with 32bit integers
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Jan 9, 2025
1 parent a86af94 commit d56eb41
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/spral/hw_topology.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! THIS VERSION: GALAHAD 4.1 - 2023-01-25 AT 09:10 GMT.
! THIS VERSION: GALAHAD 5.1 - 2025-01-07 AT 13:30 GMT.

#include "spral_procedures.h"

Expand All @@ -23,8 +23,8 @@ module spral_hw_topology

!> Fortran interoperable definition of spral::hw_topology::NumaRegion
type, bind(C) :: c_numa_region
integer(C_IP_) :: nproc
integer(C_IP_) :: ngpu
integer(C_INT) :: nproc
integer(C_INT) :: ngpu
type(C_PTR) :: gpus
end type c_numa_region

Expand All @@ -37,18 +37,16 @@ module spral_hw_topology
interface
!> Interface to spral_hw_topology_guess()
subroutine spral_hw_topology_guess(nregion, regions) bind(C)
use spral_kinds_precision, only: C_IP_
use, intrinsic :: iso_c_binding
implicit none
integer(C_IP_), intent(out) :: nregion
integer(C_INT), intent(out) :: nregion
type(C_PTR), intent(out) :: regions
end subroutine spral_hw_topology_guess
!> Interface to spral_hw_topology_free()
subroutine spral_hw_topology_free(nregion, regions) bind(C)
use spral_kinds_precision, only: C_IP_
use, intrinsic :: iso_c_binding
implicit none
integer(C_IP_), value :: nregion
integer(C_INT), value :: nregion
type(C_PTR), value :: regions
end subroutine spral_hw_topology_free
end interface
Expand All @@ -67,7 +65,7 @@ subroutine guess_topology(regions, st)
integer(ip_), intent(out) :: st

integer(ip_) :: i
integer(C_IP_) :: nregions
integer(C_INT) :: nregions
type(C_PTR) :: c_regions
type(c_numa_region), dimension(:), pointer, contiguous :: f_regions
integer(C_IP_), dimension(:), pointer, contiguous :: f_gpus
Expand Down

0 comments on commit d56eb41

Please sign in to comment.