Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions model/bin/cmplr.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
# #
# use : cmplr.env cmplr #
# #
# cmplr : keyword based on a value and optional suffix and prefix #
# cmplr : keyword based on a value and optional suffix, prefix and extras #
# #
# value : mpt / intel / gnu / pgi #
# suffix : _debug #
# prefix : zeus_ / datarmor_ #
# extras : so_ #
# #
# - examples : intel / pgi_debug / datarmor_mpt_debug #
# - examples : intel / pgi_debug / datarmor_mpt_debug / so_intel #
# #
# remarks : #
# #
Expand Down Expand Up @@ -98,6 +99,7 @@ fi
###############################

if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
[ "$cmplr" == "zeus_intel" ] || [ "$cmplr" == "zeus_intel_debug" ] || \
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] ; then

Expand Down Expand Up @@ -149,17 +151,20 @@ if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
optc="$optc -xhost"
optl="$optl -xhost"
fi

if [ ! -z "$(echo $cmplr | grep so)" ] ; then
optc="$optc -fPIC"
optl='-o $prog -p -g'
fi

fi




###############################
# GNU #
###############################

if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "so_gnu" ] || [ "$cmplr" == "so_gnu_debug" ] || \
[ "$cmplr" == "zeus_gnu" ] || [ "$cmplr" == "zeus_gnu_debug" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] ; then

Expand Down Expand Up @@ -209,11 +214,11 @@ if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
optl="$optl -march=native"
fi

if [ ! -z "$(echo $cmplr | grep so)" ] ; then
optc="$optc -fPIC"
fi
fi




###############################
# PGI #
###############################
Expand Down
2 changes: 1 addition & 1 deletion model/bin/comp.Intel
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#
# Intel compiler on Linux ----------------------------------------------------
# 2.b.1 Build options and determine compiler name

opt="-c $list -O3 -assume byterecl -ip -module $path_m"
# opt="-c $list -O3 -assume byterecl -xSSE4.2 -ip -module $path_m"
# opt="-c $list -O3 -assume byterecl -prec-div -prec-sqrt -xHost -align array128byte -ip -module $path_m"
Expand Down
23 changes: 22 additions & 1 deletion model/bin/make_makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@
ww3_ounp ww3_gspl ww3_gint ww3_bound ww3_bounc ww3_systrk $tideprog"
progs="$progs ww3_multi_esmf ww3_uprstr"
progs="$progs libww3"
progs="$progs libww3.so"

for prog in $progs
do
Expand Down Expand Up @@ -1059,6 +1060,13 @@
source="w3triamd w3srcemd $dsx $flx $ln $st $nl $bt $ic $is $db $tr $bs $xx $refcode $igcode $uostmd"
IO='w3iogrmd w3iogomd w3iopomd w3iotrmd w3iorsmd w3iobcmd w3iosfmd w3partmd'
aux="constants w3servmd w3timemd $tidecode w3arrymd w3dispmd w3cspcmd w3gsrumd" ;;
libww3.so) IDstring='Object file archive'
core='w3fldsmd w3initmd w3wavemd w3wdasmd w3updtmd'
data='wmmdatmd w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd'
prop="$pr"
source="w3triamd w3srcemd $dsx $flx $ln $st $nl $bt $ic $is $db $tr $bs $xx $refcode $igcode $uostmd"
IO='w3iogrmd w3iogomd w3iopomd w3iotrmd w3iorsmd w3iobcmd w3iosfmd w3partmd'
aux="constants w3servmd w3timemd $tidecode w3arrymd w3dispmd w3cspcmd w3gsrumd" ;;
ww3_uprstr) IDstring='Update Restart File'
core=
data='wmmdatmd w3triamd w3gdatmd w3wdatmd w3adatmd w3idatmd w3odatmd'
Expand All @@ -1078,7 +1086,7 @@
filesl="$data $core $prop $source $IO $aux"
# if program name is libww3, then
# the target is compile and create archive
elif [ "$prog" = "libww3" ]
elif [ "$prog" = "libww3" ] || [ "$prog" = "libww3.so" ]
then
d_string="$prog"' : $(aPo)/'
files="$aux $core $data $prop $source $IO"
Expand Down Expand Up @@ -1123,6 +1131,19 @@
done
echo " @cd \$(aPo); $ar_cmd $lib $objs" >> makefile
echo ' ' >> makefile
# if program name is libww3.so, then
# the target is compile and create archive
elif [ "$prog" = "libww3.so" ]
then
lib=$prog
objs=""
for file in $filesl
do
objs="$objs $file.o"
done
echo " @cd \$(aPo); ld -o $lib -shared $objs" >> makefile
echo ' ' >> makefile

else
echo ' @$(aPb)/link '"$filesl" >> makefile
echo ' ' >> makefile
Expand Down
6 changes: 6 additions & 0 deletions model/bin/w3_automake
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@
reg_programs="$reg_programs ww3_gspl"
fi

if [ -n "`grep -nri fPIC $comp_file`" ]
then
reg_programs="$reg_programs libww3.so"
else
echo 'Shared Object : No'
fi

# 1.f sort sequential and parallel programs - - - - - - - - - - - - - - - - - -

Expand Down
10 changes: 10 additions & 0 deletions model/bin/w3_make
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@
reg_programs="$reg_programs ww3_shel"
fi

if [ -n "`grep -nri fPIC $comp_file`" ]
then
reg_programs="$reg_programs libww3.so"
else
echo 'Shared Object : No'
fi

# if no progs in argument
if [ -z "$all_programs" ]
then
Expand Down Expand Up @@ -662,6 +669,9 @@ EOF
# if program name is libww3, then
# the target is compile and create archive
elif [ "$prog" = "libww3" ]
then
target="$prog"
elif [ "$prog" = "libww3.so" ]
then
target="$prog"
else
Expand Down
7 changes: 5 additions & 2 deletions model/bin/w3_setup
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,19 @@ then
[ "$cmplr" == "zeus_mpt" ] || [ "$cmplr" == "zeus_mpt_debug" ] || \
[ "$cmplr" == "datarmor_mpt" ] || [ "$cmplr" == "datarmor_mpt_debug" ] || \
[ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
[ "$cmplr" == "zeus_intel" ] || [ "$cmplr" == "zeus_intel_debug" ] || \
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "so_gnu" ] || [ "$cmplr" == "so_gnu_debug" ] || \
[ "$cmplr" == "zeus_gnu" ] || [ "$cmplr" == "zeus_gnu_debug" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
[ "$cmplr" == "zeus_pgi" ] || [ "$cmplr" == "zeus_pgi_debug" ] || \
[ "$cmplr" == "datarmor_pgi" ] || [ "$cmplr" == "datarmor_pgi_debug" ] ; then
source $path_b/cmplr.env
sed -e "s/<optc>/$optc/" -e "s/<comp_seq>/$comp_seq/" -e "s/<comp_mpi>/$comp_mpi/" $path_b/comp.tmpl > $path_b/comp
echo " sed $path_b/comp.tmpl => $path_b/comp"
echo " sed $path_b/comp.tmpl => $path_b/comp"
else
errmsg "$path_b/comp.$cmplr not found"
exit 1
Expand All @@ -436,9 +438,11 @@ then
[ "$cmplr" == "zeus_mpt" ] || [ "$cmplr" == "zeus_mpt_debug" ] || \
[ "$cmplr" == "datarmor_mpt" ] || [ "$cmplr" == "datarmor_mpt_debug" ] || \
[ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
[ "$cmplr" == "zeus_intel" ] || [ "$cmplr" == "zeus_intel_debug" ] || \
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "so_gnu" ] || [ "$cmplr" == "so_gnu_debug" ] || \
[ "$cmplr" == "zeus_gnu" ] || [ "$cmplr" == "zeus_gnu_debug" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
Expand All @@ -453,7 +457,6 @@ then
fi
chmod 775 $path_b/comp $path_b/link
fi

# 3.d Setup switch file
if [ $swtch ]
then
Expand Down
4 changes: 2 additions & 2 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ wget ftp://polar.ncep.noaa.gov/tempor/ww3ftp/ww3_from_ftp.v6.07.tar.gz
tar -xvzf ww3_from_ftp.v6.07.tar.gz

#Move regtest info from data_regtests to regtests:
echo -e "Moving data from data_regtests to regtets"
echo -e "Moving data from data_regtests to regtests"
cp -r data_regtests/ww3_tp2.15/input/*.nc regtests/ww3_tp2.15/input/
cp -r data_regtests/ww3_tp2.13/*.png regtests/ww3_tp2.13/
cp -r data_regtests/ww3_tic1.4/input/*.nc regtests/ww3_tic1.4/input/
Expand Down Expand Up @@ -53,7 +53,7 @@ else
echo -e ' Not deleting tar file.'
fi

echo -e "\n\n Files were copied from the data_regtests to the regtets folder."
echo -e "\n\n Files were copied from the data_regtests to the regtests folder."
echo -e "Do you want to delete the data_regtests folder? [y|n]: "
read wnew2
if [ "${wnew2}" = "Y" ] || [ "${wnew2}" = "y" ]
Expand Down