Skip to content

Commit

Permalink
add support for Cray compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
tukss committed Dec 21, 2021
1 parent ac179a2 commit cf75bd9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ function compiler_version {
#$1 --version
VSTR=$($1 --version)
VTMP="unknown"
# List Cray first because other compilers might have Cray company name in their version string.
if [[ $VSTR == *"Cray"* ]]
then
VTMP="CRAY"
fi
if [[ $VSTR == *"Intel"* ]]
then
VTMP="INTEL"
Expand Down Expand Up @@ -49,6 +54,11 @@ function opt_flags {
then
echo '-O3 -ffixed-line-length-132'
fi

if [[ $1 == "CRAY" ]]
then
echo '-O3'
fi
}

function dbg_flags {
Expand All @@ -66,6 +76,10 @@ function dbg_flags {
then
echo '-O0 -g -ffixed-line-length-132'
fi
if [[ $1 == "CRAY" ]]
then
echo '-O0 -g'
fi
}

function displayhelp {
Expand Down Expand Up @@ -541,6 +555,12 @@ else
DBG_FLAGS="$DBG_FLAGS -DAOCC_COMPILER"
fi

if [ $FVERSION == "CRAY" ]
then
OPT_FLAGS="$OPT_FLAGS -DCRAY_COMPILER"
DBG_FLAGS="$DBG_FLAGS -DCRAY_COMPILER"
fi

echo ' '
echo " Compiler manufacturer : " $FVERSION
echo ' Fortran compiler command : ' $FCOMP
Expand Down

0 comments on commit cf75bd9

Please sign in to comment.