Skip to content

Instantly share code, notes, and snippets.

@AymenFJA
Created May 5, 2020 20:52
Show Gist options
  • Save AymenFJA/21e1300fe3def9c478d923eee8a15774 to your computer and use it in GitHub Desktop.
Save AymenFJA/21e1300fe3def9c478d923eee8a15774 to your computer and use it in GitHub Desktop.
#!/bin/bash
export CUDA_VISIBLE_DEVICES=0
lrank=$OMPI_COMM_WORLD_LOCAL_RANK
case ${lrank} in
[0])
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_0; ./vector_add
;;
[1])
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_1; ./vector_add
;;
[2])
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_0; ./vector_add
;;
[3])
export CUDA_MPS_PIPE_DIRECTORY=/home/aymen/mps_1; ./vector_add
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment