44CONFIG_DIR=" Ironwood/configs/host_device"
55SPECIFIC_CONFIG=" "
66INTERLEAVED=false
7+ NUMACTL_BIND=false
78
89# Helper function for usage
910usage () {
1011 echo " Usage: $0 [OPTIONS]"
1112 echo " Options:"
1213 echo " --config <path> Path to specific config file (optional)"
1314 echo " --interleaved Run with numactl --interleave=all"
15+ echo " --numactl_bind Run with numactl --cpunodebind=0 --membind=0"
1416 echo " --help Show this help message"
1517 exit 1
1618}
@@ -20,6 +22,7 @@ while [[ "$#" -gt 0 ]]; do
2022 case $1 in
2123 --config) SPECIFIC_CONFIG=" $2 " ; shift ;;
2224 --interleaved) INTERLEAVED=true ;;
25+ --numactl_bind) NUMACTL_BIND=true ;;
2326 --help) usage ;;
2427 * ) echo " Unknown parameter passed: $1 " ; usage ;;
2528 esac
@@ -33,6 +36,7 @@ echo "********************************************************"
3336echo " "
3437echo " Configuration:"
3538echo " Interleaved: $INTERLEAVED "
39+ echo " numactl Bound: $NUMACTL_BIND "
3640echo " "
3741
3842if [ -n " $SPECIFIC_CONFIG " ]; then
4448 shopt -u nullglob
4549fi
4650
51+ if [[ " $INTERLEAVED " = true && " $NUMACTL_BIND " = true ]]; then
52+ echo " Only one of --interleaved and --numactl_bind is allowed to be set at once."
53+ exit 1
54+ fi
55+
4756if [ ${# CONFIGS[@]} -eq 0 ]; then
4857 echo " No configuration files found!"
4958 exit 1
@@ -61,6 +70,14 @@ for CONFIG_FILE in "${CONFIGS[@]}"; do
6170 echo " Warning: numactl not found. Running without interleaving."
6271 $CMD
6372 fi
73+ elif [ " $NUMACTL_BIND " = true ]; then
74+ if command -v numactl & > /dev/null; then
75+ echo " Running with numactl --cpunodebind=0 --membind=0"
76+ numactl --cpunodebind=0 --membind=0 $CMD
77+ else
78+ echo " Warning: numactl not found. Running without binding."
79+ $CMD
80+ fi
6481 else
6582 $CMD
6683 fi
0 commit comments