Skip to content

Commit

Permalink
240811.155916.PDT revise flint and mlint
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Aug 11, 2024
1 parent 014560d commit 733ab95
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
29 changes: 13 additions & 16 deletions fortran/tests/tools/flint
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ fi
TEST_ALL="N"
CLEAN="N"

# sunf95 is case sensitive. Put it as the first.
# Disable atest for now, since it encounters licensing errors randomly
printf "\n****** ATEST is disabled ******\n"
# Decide the list of tests to make.
# N.B.: () defines an array
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx)
CLIST=(s g n 9 i v f d x)
# sunf95 is case sensitive. Put it as the first.
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx)
CLIST=(s g n 9 i v x)
COMP_LIST=""
for i in "${!COMPILER_LIST[@]}"; do
if type "${COMPILER_LIST[$i]}" &> /dev/null ; then
if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
else
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
done
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
COMP_LIST="$COMP_LIST f"
fi
# Make dtest if AOCC flang is installed.
if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then
COMP_LIST="$COMP_LIST d"
fi

# Parse the arguments
while [[ -n "$1" ]]; do
Expand All @@ -49,9 +49,6 @@ while [[ -n "$1" ]]; do
-n|--nagfor)
COMP_LIST=" n"
;;
-a|--absoft)
COMP_LIST=" a"
;;
-9|--g95)
COMP_LIST=" 9"
;;
Expand Down
25 changes: 13 additions & 12 deletions fortran/tests/tools/mlint
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,25 @@ fi
TEST_ALL="N"
CLEAN="N"

# af95 does not support internal subroutine as an actual argument. So it is not included
# sunf95 is case sensitive. Put it as the first.
# Decide the list of tests to make.
# N.B.: () defines an array
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx)
CLIST=(s g n 9 i v f d x)
# sunf95 is case sensitive. Put it as the first.
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx)
CLIST=(s g n 9 i v x)
COMP_LIST=""
for i in "${!COMPILER_LIST[@]}"; do
if type "${COMPILER_LIST[$i]}" &> /dev/null ; then
if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
else
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
fi
done
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
COMP_LIST="$COMP_LIST f"
fi
# Make dtest if AOCC flang is installed.
if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then
COMP_LIST="$COMP_LIST d"
fi

# Parse the arguments
while [[ -n "$1" ]]; do
Expand Down

0 comments on commit 733ab95

Please sign in to comment.