diff --git a/dev_alloc_module.fypp b/dev_alloc_module.fypp index 76fc2d6..1b84230 100644 --- a/dev_alloc_module.fypp +++ b/dev_alloc_module.fypp @@ -132,7 +132,7 @@ ELSE ENDIF CALL C_F_POINTER (PTR, TMP, DIMSIZES) -DEV => TMP +DEV (${ ', '.join (map (lambda i: 'ILBOUNDS (' + str (i) + '):', range (1, ft.rank+1))) }$) => TMP IF(MAP_DEVPTR)THEN !$acc enter data create (DEV) @@ -181,10 +181,13 @@ SUBROUTINE ${ft.name}$_DEV_ALLOCATE_HST (DEV, HST, MAP_DEVPTR) ${ft.type}$, POINTER :: DEV(${ft.shape}$) ${ft.type}$, POINTER :: HST(${ft.shape}$) LOGICAL, INTENT(IN) :: MAP_DEVPTR -INTEGER (KIND=JPIM) :: DIMSIZES (${ft.rank}$) -DIMSIZES = UBOUND(HST) - LBOUND(HST) -ALLOCATE (DEV(${ ', '.join (['1:DIMSIZES(i)' for i in range (1, ft.rank+1)])}$)) +#if __INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE == 5 +! Bug with Intel 18.0.5.274 +ALLOCATE (DEV (${ ', '.join (map (lambda i: 'LBOUND (HST, ' + str (i) + '):UBOUND (HST,' + str (i) + ')', range (1, ft.rank+1))) }$)) +#else +ALLOCATE (DEV, MOLD=HST) +#endif !$acc enter data create (DEV) diff --git a/field_RANKSUFF_data_module.fypp b/field_RANKSUFF_data_module.fypp index 1faa0c6..36b1d5c 100644 --- a/field_RANKSUFF_data_module.fypp +++ b/field_RANKSUFF_data_module.fypp @@ -128,7 +128,7 @@ CONTAINS #endif #:for e in range (ft.rank, d, -1) - ${' ' * (ft.rank - e)}$D${e}$ = 1 - LBOUND (HST, ${e}$) + ${' ' * (ft.rank - e)}$D${e}$ = LBOUND(DEV, ${e}$) - LBOUND (HST, ${e}$) ${' ' * (ft.rank - e)}$DO J${e}$ = LBOUND (HST, ${e}$), UBOUND (HST, ${e}$) ${' ' * (ft.rank - e + 1)}$JD${e}$ = J${e}$ + D${e}$ #:endfor