Make do_debug more robust for standalone and non-standalone builds.
#!/bin/bash
-bldcmd="$AOMP/bin/hipcc -O0 -g -ggdb -fopenmp matrixmul.cpp -o matrixmul"
+
+# Determine hipcc location
+hipcc_loc=$AOMP/bin/hipcc
+if [ ! -f $hipcc_loc ]; then
+ hipcc_loc=$AOMP/../bin/hipcc
+fi
+
+bldcmd="$hipcc_loc -O0 -g -ggdb -fopenmp matrixmul.cpp -o matrixmul"
#cgdb=`which cgdb` && [ "$cgdb" != "" ] && gdbcmd="$cgdb -d $gdbcmd"
export LD_LIBRARY_PATH=$AOMP/lib-debug:$AOMP/lib
@@ -13,6 +20,11 @@ echo
echo $gdbcmd
echo
#$gdbcmd
-$AOMP/bin/rocgdb -x "$AOMP/lib-debug/ompd/__init__.py" ./matrixmul -ex "source do_debug_command_file"
+# Determine rocgdb location
+rocgdb=$AOMP/bin/rocgdb
+if [ ! -f $rocgdb ]; then
+ rocgdb=$AOMP/../bin/rocgdb
+fi
+$rocgdb -x "$AOMP/lib-debug/ompd/__init__.py" ./matrixmul -ex "source do_debug_command_file"
