Skip to content

Commit 7e9be05

Browse files
committed
changes needed for NAG compiler
1 parent e1c32bc commit 7e9be05

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

scripts/Tools/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ endif
124124

125125
ifeq ($(strip $(PIO_VERSION)),1)
126126
CPPDEFS += -DPIO1
127-
else
128-
USE_CXX = TRUE
129127
endif
130128

131129
ifeq (,$(SHAREDPATH))

src/externals/pio2/src/flib/piolib_mod.F90

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,8 @@ subroutine init_intracom(comp_rank, comp_comm, num_iotasks, num_aggregator, stri
939939
integer(i4), intent(in) :: rearr
940940
type (iosystem_desc_t), intent(out) :: iosystem ! io descriptor to initalize
941941
integer(i4), intent(in),optional :: base
942-
type (pio_rearr_opt_t), intent(in), optional :: rearr_opts
943-
942+
type (pio_rearr_opt_t), intent(in), target, optional :: rearr_opts
943+
944944
integer :: lbase
945945
integer :: ierr
946946
interface
@@ -953,7 +953,7 @@ integer(c_int) function PIOc_Init_Intracomm_from_F90(f90_comp_comm, num_iotasks,
953953
integer(C_INT), value :: stride
954954
integer(C_INT), value :: base
955955
integer(C_INT), value :: rearr
956-
type(pio_rearr_opt_t) :: rearr_opts
956+
type(C_PTR) :: rearr_opts
957957
integer(C_INT) :: iosysidp
958958
end function PIOc_Init_Intracomm_from_F90
959959
end interface
@@ -966,8 +966,11 @@ end function PIOc_Init_Intracomm_from_F90
966966
#endif
967967
lbase=0
968968
if(present(base)) lbase=base
969-
ierr = PIOc_Init_Intracomm_from_F90(comp_comm,num_iotasks,stride,lbase,rearr,rearr_opts,iosystem%iosysid)
970-
969+
if(present(rearr_opts)) then
970+
ierr = PIOc_Init_Intracomm_from_F90(comp_comm,num_iotasks,stride,lbase,rearr,C_LOC(rearr_opts),iosystem%iosysid)
971+
else
972+
ierr = PIOc_Init_Intracomm_from_F90(comp_comm,num_iotasks,stride,lbase,rearr,C_NULL_PTR,iosystem%iosysid)
973+
endif
971974
call CheckMPIReturn("Bad Initialization in PIO_Init_Intracomm: ", ierr,__FILE__,__LINE__)
972975
#ifdef TIMING
973976
call t_stopf("PIO:init")

0 commit comments

Comments
 (0)