Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
iulusoy committed Mar 28, 2024
1 parent c1bf9d8 commit 891cc69
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/actions/test-mkl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
# and for macos-14 also not 2021.6-2021.9
mkl_tests=true
echo "$RUNNER_OS"
if [[ "${{ inputs.compiler }}" =~ "gnu" ]]; then mkl_tests=false; fi
if [[ "${{ inputs.compiler }}" =~ "gcc" ]]; then mkl_tests=false; fi
if [[ "${{ inputs.install_mkl }}" == "false" ]]; then mkl_tests=false; fi
if [[ "${{ inputs.version }}" == "2021.5" ]] && [[ "$RUNNER_OS" == "macOS" ]]; then mkl_tests=false; fi
if [[ "$RUNNER_OS" == "macOS" ]] ; then
Expand All @@ -36,20 +36,20 @@ runs:
fi
# now we know if we should, run the tests
if $mkl_tests; then
if [ "$RUNNER_OS" == "macOS" ]; then
MKLLIB="$MKLROOT/lib"
export DYLD_LIBRARY_PATH="$MKLLIB:$DYLD_LIBRARY_PATH"
elif [ "$RUNNER_OS" == "Linux" ]; then
MKLLIB="$MKLROOT/latest/lib/intel64"
export LD_LIBRARY_PATH="$MKLLIB:$LD_LIBRARY_PATH"
fi
linking="-L$MKLLIB -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"
# hello world with blas call program
${{ env.FC }} $args $linking -o hw_mkl hw_mkl.f90
output=$(./hw_mkl '2>&1')
[[ "$output" == *"hello world 9.00000000000000"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw_mkl' output: $output"; exit 1)
rm hw_mkl
else
echo "Skipping MKL tests"
fi
# if $mkl_tests; then
# if [ "$RUNNER_OS" == "macOS" ]; then
# MKLLIB="$MKLROOT/lib"
# export DYLD_LIBRARY_PATH="$MKLLIB:$DYLD_LIBRARY_PATH"
# elif [ "$RUNNER_OS" == "Linux" ]; then
# MKLLIB="$MKLROOT/latest/lib/intel64"
# export LD_LIBRARY_PATH="$MKLLIB:$LD_LIBRARY_PATH"
# fi
# linking="-L$MKLLIB -lmkl_intel_lp64 -lmkl_sequential -lmkl_core"
hello world with blas call program
# ${{ env.FC }} $args $linking -o hw_mkl hw_mkl.f90
# output=$(./hw_mkl '2>&1')
# [[ "$output" == *"hello world 9.00000000000000"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw_mkl' output: $output"; exit 1)
# rm hw_mkl
# else
# echo "Skipping MKL tests"
# fi

0 comments on commit 891cc69

Please sign in to comment.