Skip to content

Commit

Permalink
Update link_nvidia_host_libraries.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ocaisa authored Sep 27, 2024
1 parent 9c2865f commit a263d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ host_ldconfig=$(get_host_ldconfig)
host_libraries=$($host_ldconfig -p | awk '{print $NF}')
singularity_libs=$(ls /.singularity.d/libs/* 2>/dev/null)

# Now gather the list of possible CUDA libraries
cuda_candidate_libraries=$(get_nvlib_list "${LIBS_LIST}")
# Now gather the list of possible CUDA libraries and make them into an array
cuda_candidate_libraries=($(get_nvlib_list "${LIBS_LIST}"))
# Check if the function returned an error (e.g., curl failed)
if [ $? -ne 0 ]; then
echo "Using default list of libraries"
Expand All @@ -191,7 +191,7 @@ matched_libraries=()
# Process each library and check for matches in libs.txt
for library in "${cuda_candidate_libraries[@]}"; do
# Search for the library in libs.txt and add it to the matched_libraries array
matched=$(echo "$ldconfig_output $singularity_libs" | grep "$library")
matched=$(echo "$host_libraries $singularity_libs" | grep "$library")
if [ -n "$matched" ]; then
matched_libraries+=("$matched") # Add matched library to the array
fi
Expand Down

0 comments on commit a263d6c

Please sign in to comment.