Changeset 4445
- Timestamp:
- Feb 28, 2023, 7:32:27 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Portage_acc/libf/dyn3d/replay3d.F90
r4113 r4445 21 21 grossismx, grossismy, dzoomx, dzoomy,taux,tauy 22 22 USE mod_const_mpi, ONLY: comm_lmdz 23 23 #ifdef _OPENACC 24 USE openacc 25 #endif 24 26 25 27 … … 88 90 INTEGER :: an, mois, jour 89 91 REAL :: heure 92 REAL(kind=8) :: elapsed_time, mean_elapsed=0. ! real time in seconds 93 90 94 91 95 ! Initialisations: 92 96 ! ---------------- 93 97 #ifdef _OPENACC 98 INTEGER :: numdev 99 100 !$acc init 101 102 ! get the number of NVIDIA devices on this node 103 numdev = acc_get_num_devices(ACC_DEVICE_NVIDIA) 104 PRINT *, 'init_physics : number of available GPU devices', numdev 105 IF (numdev < 1) STOP "Error: there are no devices available on this host. ABORTING" 106 CALL acc_init(ACC_DEVICE_NVIDIA) 107 numdev = acc_get_device_num(ACC_DEVICE_NVIDIA) 108 PRINT *, 'init_physics : GPU device id = ', numdev 109 #endif 94 110 95 111 !---------------------------------------------------------------------- … … 187 203 ! Boucle en temps sur l'appel à la parametrisation 188 204 !--------------------------------------------------------------------- 205 ! ntime = 97 206 write(6,*)'number of loops to do = ' 207 read(5,*) ntime 189 208 DO it=1,ntime 190 print*,'Pas de temps ',it,klon,klev 191 call call_param_replay(klon,klev) 209 ! print*,'Pas de temps ',it,klon,klev 210 call call_param_replay(klon,klev,elapsed_time) 211 mean_elapsed=mean_elapsed+elapsed_time/real(ntime) 192 212 ENDDO 193 213 write(6,*)'Mean elapsed time = ',mean_elapsed 194 214 195 215 END PROGRAM replay3d
Note: See TracChangeset
for help on using the changeset viewer.