mirror of https://gitlab.com/QEF/q-e.git
Warn used when something goes wrong with initialization
This commit is contained in:
parent
c4c2417226
commit
23ec514f8d
|
@ -12,7 +12,7 @@ MODULE mp_world
|
|||
USE mp, ONLY : mp_barrier, mp_start, mp_end, mp_stop, mp_count_nodes
|
||||
USE io_global, ONLY : meta_ionode_id, meta_ionode
|
||||
#if defined(__CUDA)
|
||||
use cudafor, ONLY : cudaSetDevice, cudaGetDeviceCount
|
||||
use cudafor, ONLY : cudaSetDevice, cudaGetDeviceCount, cudaDeviceSynchronize
|
||||
#endif
|
||||
!
|
||||
USE parallel_include
|
||||
|
@ -77,7 +77,11 @@ CONTAINS
|
|||
!
|
||||
#if defined(__CUDA)
|
||||
ierr = cudaGetDeviceCount( ndev )
|
||||
IF (ierr/=0) CALL mp_stop( 9000 + ierr )
|
||||
ierr = cudaSetDevice(mod(key, ndev))
|
||||
IF (ierr/=0) CALL mp_stop( 9100 + ierr )
|
||||
ierr = cudaDeviceSynchronize()
|
||||
IF (ierr/=0) CALL mp_stop( 9200 + ierr )
|
||||
#if defined(__DEBUG)
|
||||
write(*,*) "MPI ", key, " on node ", color, " is using GPU: ", mod(key, ndev)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue