#!/bin/bash
noderank=$1
compile_path=$2
is_share_memory=$3

executable=${compile_path}/Host_H2DBw
compile() {
    nvcc bandwidth.cu -o $executable -lnccl -lcudart 
}
if [ "$is_share_memory" = 1 ] && [ "$noderank" -eq 0 ]; then
  compile
elif [ "$is_share_memory" = 0 ]; then
  compile
fi
sleep 6
$executable