mirror of https://gitlab.com/QEF/q-e.git
Assign the same GPU to all OpenMP threads.
This commit is contained in:
parent
af01aa5c68
commit
84906d6c12
|
@ -78,7 +78,9 @@ CONTAINS
|
|||
#if defined(__CUDA)
|
||||
ierr = cudaGetDeviceCount( ndev )
|
||||
IF (ierr/=0) CALL mp_stop( 9000 + ierr )
|
||||
!$omp parallel firstprivate(key, ndev)
|
||||
ierr = cudaSetDevice(mod(key, ndev))
|
||||
!$omp end parallel
|
||||
IF (ierr/=0) CALL mp_stop( 9100 + ierr )
|
||||
ierr = cudaDeviceSynchronize()
|
||||
IF (ierr/=0) CALL mp_stop( 9200 + ierr )
|
||||
|
|
Loading…
Reference in New Issue