mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
14 lines
233 B
Bash
14 lines
233 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
num_tile=2
|
||
|
|
||
|
gpu_id=$(( (MPI_LOCAL_RANKID % num_tile ) ))
|
||
|
tile_id=$((MPI_LOCAL_RANKID / num_tile))
|
||
|
|
||
|
export ZE_AFFINITY_MASK=$gpu_id.$tile_id
|
||
|
|
||
|
echo "local rank $MPI_LOCALRANKID ; ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK"
|
||
|
|
||
|
"$@"
|
||
|
|