Skip to content

Commit 6d48175

Browse files
jplehrronlieb
authored andcommitted
[Kokkos] Fix shellcheck issues in Kokkos cgsolve script (#2126)
1 parent 70ede1b commit 6d48175

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

utils/kokkos_build-cgsolve.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
#
2626
# Written by Jan-Patrick Lehr <JanPatrick.Lehr@amd.com>
2727
#
28-
PROGVERSION="X.Y-Z"
29-
#
28+
3029

3130
function print_info() {
3231
toPrint="$1"
@@ -55,19 +54,19 @@ NUM_THREADS=${NUM_THREADS:-8}
5554
COMPILERNAME_TO_USE=${_COMPILER_TO_USE_:-clang++}
5655
# AOMP_VERSION=$($AOMP/bin/${COMPILERNAME_TO_USE} --version | head -n 1)
5756

58-
cd $GIT_DIR || exit 1
57+
cd "$GIT_DIR" || exit 1
5958

6059
if [ "$1" == "clean" ]; then
6160
print_info "Removing $KOKKOS_EXAMPLES_SOURCE_DIR"
62-
rm -rf $KOKKOS_EXAMPLES_SOURCE_DIR
61+
rm -rf "$KOKKOS_EXAMPLES_SOURCE_DIR"
6362
exit 0
6463
fi
6564

6665
# Get the source code
67-
git clone $KOKKOS_EXAMPLES_REPO $KOKKOS_EXAMPLES_SOURCE_DIR
66+
git clone "$KOKKOS_EXAMPLES_REPO" "$KOKKOS_EXAMPLES_SOURCE_DIR"
6867

6968
# Change to the directory
70-
cd $KOKKOS_EXAMPLES_SOURCE_DIR || exit 1
69+
cd "$KOKKOS_EXAMPLES_SOURCE_DIR" || exit 1
7170

7271
cd cgsolve || exit 1
7372

@@ -85,5 +84,4 @@ sed -i "s/-march=gfx90a/-march=$AOMP_GPU/" ../Makefile.inc
8584
cmd="PATH=$AOMP/bin:$PATH CXX=clang++ make KOKKOS_PATH=$KOKKOS_SOURCE_DIR arch=MI250x backend=ompt comp=rocmclang"
8685

8786
print_info "$cmd"
88-
PATH=$AOMP/bin:$PATH CXX=clang++ make KOKKOS_PATH=$KOKKOS_SOURCE_DIR arch=MI250x backend=ompt comp=rocmclang -j${NUM_THREADS}
89-
#OFFLOAD_FLAGS='-ffast-math -fopenmp-target-fast'
87+
PATH=$AOMP/bin:$PATH CXX=clang++ make KOKKOS_PATH="$KOKKOS_SOURCE_DIR" arch=MI250x backend=ompt comp=rocmclang -j"${NUM_THREADS}"

0 commit comments

Comments
 (0)