diff --git a/src/MNH/turb.f90 b/src/MNH/turb.f90 index 428ddf66830a4c44a0aef3b819a010abbb7f5951..a7658c4880cc7b8c099d9381745ad75de9e7b266 100644 --- a/src/MNH/turb.f90 +++ b/src/MNH/turb.f90 @@ -2024,8 +2024,16 @@ real, dimension(:,:,:), pointer , contiguous :: zlm_cloud call Print_msg( NVERB_FATAL, 'GEN', 'TURB', 'OpenACC: CLOUD_MODIF_LM not yet implemented' ) #endif +#ifndef MNH_OPENACC allocate( zcoef_ampl(size( put, 1 ), size( put, 2 ), size( put, 3) ) ) allocate( zlm_cloud (size( put, 1 ), size( put, 2 ), size( put, 3) ) ) +#else +!Pin positions in the pools of MNH memory +CALL MNH_MEM_POSITION_PIN() + +CALL MNH_MEM_GET( zcoef_ampl, size( put, 1 ), size( put, 2 ), size( put, 3) ) +CALL MNH_MEM_GET( zlm_cloud , size( put, 1 ), size( put, 2 ), size( put, 3) ) +#endif ! !* 1. INITIALISATION ! -------------- @@ -2139,7 +2147,12 @@ IF ( OTURB_DIAG .AND. tpfile%lopened ) THEN ! ENDIF +#ifndef MNH_OPENACC deallocate( zcoef_ampl, zlm_cloud ) +#else +!Release all memory allocated with MNH_MEM_GET calls since last call to MNH_MEM_POSITION_PIN +CALL MNH_MEM_RELEASE() +#endif END SUBROUTINE CLOUD_MODIF_LM !