Skip to content

Commit a4d6b38

Browse files
committed
Add note on binding script requirement for PREFER_GPU macro
1 parent 71b5976 commit a4d6b38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/include/macros.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#endif
1313
#:enddef
1414

15+
! Caution:
16+
! This macro requires the use of a binding script to set CUDA_VISIBLE_DEVICES, such that we have one GPU device per MPI rank.
17+
! That's because for both cudaMemAdvise (preferred location) and cudaMemPrefetchAsync we use location = device_id = 0.
18+
! For an example see misc/nvidia_uvm/bind.sh.
1519
#:def PREFER_GPU(*args)
1620
#ifdef MFC_SIMULATION
1721
#ifdef __NVCOMPILER_GPU_UNIFIED_MEM

0 commit comments

Comments
 (0)