Skip to content

Commit

Permalink
new Rules.make file
Browse files Browse the repository at this point in the history
  • Loading branch information
georgu committed Oct 6, 2018
1 parent 1ee9c9a commit d9650d7
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private
bugs

femmpi
rules
#rules
stable
femdoc/old/

Expand Down
15 changes: 15 additions & 0 deletions COMMIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
============================================================

Sat Oct 6 14:43:59 CEST 2018

new Rules.make file

.gitignore | 2 +-
Makefile | 40 ++-
fembin/gitcommit | 18 ++
femcheck/Rules.dist | 732 ---------------------------------------------
femcheck/rules/Rules.dist | 744 ++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 787 insertions(+), 749 deletions(-)
renamed:
femcheck/Rules.dist -> femcheck/rules/Rules.dist

============================================================

Fri Oct 5 18:18:00 EEST 2018

wrong Rules.make
Expand Down
40 changes: 24 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ ggu_help: help_ggu
help_ggu:
@echo "rules_ggu_save saves my Rules.make file"
@echo "rules_ggu_restore restores my Rules.make file"
@echo "nemon set special treatment nemunas server on"
@echo "nemoff set special treatment nemunas server off"
@echo "rules_nemunas copy Rules.make for nemunas server"
@echo "rules_lagoon copy Rules.make for lagoon"
@echo "rules_carbonium copy Rules.make for carbonium"
@echo "nemon set special treatment nemunas server on"
@echo "nemoff set special treatment nemunas server off"
@echo "git_nemunas enable git for push on nemunas server"

help_dev:
Expand Down Expand Up @@ -319,26 +319,26 @@ regress:
revision:
$(FEMBIN)/revision_last.sh

rules_ggu_save:
cp -f ./Rules.make arc/rules/Rules.ggu
cp -f femcheck/Rules.dist ./Rules.make
rules_save:
mkdir -p arc/rules
cp -f ./Rules.make arc/rules/Rules.save

rules_ggu_restore:
cp -f arc/rules/Rules.ggu ./Rules.make
rules_restore:
cp -f arc/rules/Rules.save ./Rules.make

rules_dist:
cp -f femcheck/Rules.dist ./Rules.make
cp -f femcheck/rules/Rules.dist ./Rules.make

rules_new:
cp -f ./Rules.make femcheck/Rules.dist
cp -f ./Rules.make femcheck/rules/Rules.dist

rules_diff:
@-diff femcheck/Rules.dist ./Rules.make || true
@-diff femcheck/rules/Rules.dist ./Rules.make || true

dist: cleandist
mkdir -p arc/rules
mv --backup=numbered ./Rules.make arc/rules/Rules.save
cp -f femcheck/Rules.dist ./Rules.make
cp -f femcheck/rules/Rules.dist ./Rules.make
make doc; make clean

stable:
Expand Down Expand Up @@ -377,11 +377,13 @@ compat:
# special targets for ggu
#---------------------------------------------------------------

nemon:
fem3d/bin/nemunas_adjust.sh -nemunas
rules_ggu_save:
mkdir -p arc/rules
cp -f ./Rules.make arc/rules/Rules.ggu
cp -f femcheck/rules/Rules.dist ./Rules.make

nemoff:
fem3d/bin/nemunas_adjust.sh -original
rules_ggu_restore:
cp -f arc/rules/Rules.ggu ./Rules.make

rules_nemunas:
cp -f arc/rules/Rules.nemunas ./Rules.make
Expand All @@ -392,8 +394,14 @@ rules_lagoon:
rules_carbonium:
cp -f arc/rules/Rules.carbonium ./Rules.make

nemon:
fem3d/bin/nemunas_adjust.sh -nemunas

nemoff:
fem3d/bin/nemunas_adjust.sh -original

git_nemunas:
. arc/rules/nemunas-git.sh
. fem3d/bin/nemunas-git.sh

#---------------------------------------------------------------
# check if routines are executable
Expand Down
2 changes: 2 additions & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version 7_5_49 31-08-2018 VERS_7_5_49 commit_2018-10-06

version 7_5_49 31-08-2018 VERS_7_5_49 commit_2018-10-05

version 7_5_49 31-08-2018 VERS_7_5_49 commit_2018-10-05
Expand Down
4 changes: 2 additions & 2 deletions fem3d/subver.f
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,14 @@ module shyfem_version
c
c \newcommand{\VERSION}{7.5.49}
c \newcommand{\version}{7\_5\_49}
c \newcommand{\COMMIT}{2018-10-05}
c \newcommand{\COMMIT}{2018-10-06}
c
c DOCS END

implicit none

character*10, parameter :: version = '7.5.49'
character*10, parameter :: commit = '2018-10-05'
character*10, parameter :: commit = '2018-10-06'
character*17, parameter :: text = 'SHYFEM VERSION = '

character*40, parameter :: string = text//version//' '//commit
Expand Down
18 changes: 18 additions & 0 deletions fembin/gitcommit
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ GetSpecial()
[ -f tmp.tmp ] && rm -f tmp.tmp
}

CheckRules()
{
cmp Rules.make femcheck/rules/Rules.dist > /dev/null
status=$?

#echo "CheckRules: $status"
if [ $status -ne 0 ]; then
echo "Rules.make and Rules.dist are differing"
echo "You can see the difference with 'make rules_diff'"
echo "Either subtitute the Rules.make file with Rules.dist"
echo " make rules_dist; git add -u"
echo "or save Rules.make file as new Rules.dist"
echo " make rules_new; git add -u"
fi
}

ChangeFortran()
{
local file
Expand All @@ -62,6 +78,8 @@ if [ ! -f VERSION ]; then
exit 1
fi

CheckRules

git status
git diff --cached --stat
GetSpecial "new file:"
Expand Down
32 changes: 22 additions & 10 deletions femcheck/Rules.dist → femcheck/rules/Rules.dist
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,19 @@ print-% : ; @echo $* = $($*)
# WARNING generate compiler warnings for unusual constructs
# BOUNDS generate bounds check during run

# next is for NORMAL
CPROF = false

PROFILE = false
DEBUG = true
OPTIMIZE = MEDIUM
WARNING = true
BOUNDS = false
ifeq ($(COMPILER_PROFILE),NORMAL)
CPROF = true
PROFILE = false
DEBUG = true
OPTIMIZE = MEDIUM
WARNING = true
BOUNDS = false
endif

ifeq ($(COMPILER_PROFILE),CHECK)
CPROF = true
PROFILE = true
DEBUG = true
OPTIMIZE = NONE
Expand All @@ -301,13 +305,20 @@ ifeq ($(COMPILER_PROFILE),CHECK)
endif

ifeq ($(COMPILER_PROFILE),SPEED)
CPROF = true
PROFILE = false
DEBUG = false
OPTIMIZE = HIGH
WARNING = false
BOUNDS = false
endif

ifeq ($(CPROF),false)
RULES_MAKE_PARAMETERS = RULES_MAKE_PARAMETER_ERROR
RULES_MAKE_MESSAGE = "COMPILER_PROFILE must be one of NORMAL,CHECK,SPEED"
$(warning COMPILER_PROFILE=$(COMPILER_PROFILE))
endif

##############################################
#
# GNU compiler (g77, f77 or gfortran)
Expand Down Expand Up @@ -381,6 +392,7 @@ ifeq ($(DEBUG),true)
TRAP_LIST = zero,invalid,overflow,underflow,denormal
TRAP_LIST = zero
TRAP_LIST = zero,invalid,overflow,denormal
TRAP_LIST = zero,invalid,overflow
FGNU_NOOPT = -g
#FGNU_NOOPT = -g -fbacktrace -ffpe-trap=$(TRAP_LIST)
FGNU_NOOPT = -g -fbacktrace -ffpe-trap=$(TRAP_LIST) $(FGNU_BOUNDS)
Expand Down Expand Up @@ -586,15 +598,15 @@ endif

FINTEL_NOOPT =
ifeq ($(DEBUG),true)
FINTEL_TRAP = -fp-trap-all=common
FINTEL_TRAP = -ftrapuv -debug all -fpe0
FINTEL_CHECK = -check uninit -check bounds -check pointer
FINTEL_NOOPT = -xP
FINTEL_NOOPT = -CU -d1
FINTEL_NOOPT = -CU -d5
FINTEL_NOOPT = -g -traceback -check all
FINTEL_NOOPT = -g -traceback -check uninit -check bounds
FINTEL_NOOPT = -g -traceback -check uninit
FINTEL_NOOPT = -g -traceback -O0
FINTEL_NOOPT = -g -traceback
FINTEL_NOOPT = -g -traceback -check uninit -check bounds -check pointer
FINTEL_NOOPT = -g -traceback $(FINTEL_CHECK) $(FINTEL_TRAP)
endif

# FINTEL_OPT = -O -g -Mprof=time
Expand Down

0 comments on commit d9650d7

Please sign in to comment.