Skip to content

Commit

Permalink
first small parts from Celia
Browse files Browse the repository at this point in the history
  • Loading branch information
georgu committed Sep 17, 2020
1 parent bb35be1 commit 9981906
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 8 deletions.
19 changes: 19 additions & 0 deletions COMMIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
============================================================

Thu Sep 17 17:07:25 CEST 2020

first small parts from Celia

Makefile | 6 +++++-
Rules.make | 4 ++--
fem3d/mod_bnd.f | 1 +
fem3d/shyparts_dummy.f | 2 +-
fem3d/submpi_ghost.f | 1 +
fembin/git_info/git_info_branch.txt | 2 ++
femcheck/check_compiler.sh | 38 +++++++++++++++++++++++++++++++++++++
femcheck/check_software.sh | 19 +++++++++++++++++++
femcheck/rules/Rules.dist | 4 ++--
9 files changed, 71 insertions(+), 6 deletions(-)
new file:
femcheck/check_compiler.sh

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

Mon Sep 7 14:03:00 CEST 2020

minor moving to Vanadium
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ default:
all: fem doc
@cd fem3d; make compatibility

fem: checkv directories links test_executable check_server
fem: checkv directories links test_executable check_server check_compiler
@$(FEMBIN)/recursivemake $@ $(FEMDIRS)
@femcheck/check_compilation.sh -quiet

Expand Down Expand Up @@ -482,6 +482,10 @@ show_server:
# check if routines are executable
#---------------------------------------------------------------

check_compiler:
@femcheck/check_compiler.sh "$(CC) $(CINFOFLAGS)" \
"$(F77) $(FINFOFLAGS)"

test_executable:
@if [ ! -x fembin/make_executable.sh ]; then make make_executable; fi

Expand Down
4 changes: 2 additions & 2 deletions Rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ ifeq ($(FORTRAN_COMPILER),GNU_GFORTRAN)
LINKER = $(F77)
LFLAGS = $(FGNU_OPT) $(FGNU_PROFILE) $(FGNU_OMP)
FFLAGS = $(LFLAGS) $(FGNU_NOOPT) $(FGNU_WARNING) $(FGNU_GENERAL)
FINFOFLAGS = -v
FINFOFLAGS = --version
endif

##############################################
Expand Down Expand Up @@ -789,7 +789,7 @@ ifeq ($(C_COMPILER),GNU_GCC)
CFLAGS = -O -Wall -pedantic
CFLAGS = -O -Wall -pedantic -std=gnu99 #no warnings for c++ style comments
LCFLAGS = -O
CINFOFLAGS = -v
CINFOFLAGS = --version
endif

ifeq ($(C_COMPILER),INTEL)
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_70 19-05-2020 VERS_7_5_70 commit_2020-09-17

version 7_5_70 19-05-2020 VERS_7_5_70 commit_2020-09-07

version 7_5_70 19-05-2020 VERS_7_5_70 commit_2020-07-15
Expand Down
1 change: 1 addition & 0 deletions fem3d/mod_bnd.f
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ subroutine mod_bnd_reinit(nb)
allocate(bnd(nbvdim,nbb))
allocate(bnd_file(nbfdim,nbb))
bnd = 0
bnd_file = ' '
end if

allocate(bnd_aux(nbvdim,nbb))
Expand Down
2 changes: 1 addition & 1 deletion fem3d/shyparts_dummy.f
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ program shyparts
write(6,*)' parameters PARTS and PARTSDIR in the'
write(6,*)' Rules.make configuration file'
write(6,*)' - METIS'
write(6,*)' - .....'
write(6,*)' Then recompile: "make fem"'

end

Expand Down
1 change: 1 addition & 0 deletions fem3d/submpi_ghost.f
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ subroutine ghost_make
if( id1 /= ic .and. id2 /= ic ) cycle
if( id0 /= my_id .and. id0 /= ic ) then !special element
if( ies > 0 ) then
write(*,*)my_id,ic,' (',id0,id1,id2,') ; ', nc,ie,ies
stop 'error stop make_ghost: internal error (11)'
end if
ies = ie
Expand Down
4 changes: 2 additions & 2 deletions fem3d/subver.f
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ module shyfem_version
c
c \newcommand{\VERSION}{7.5.70}
c \newcommand{\version}{7\_5\_70}
c \newcommand{\COMMIT}{2020-09-07}
c \newcommand{\COMMIT}{2020-09-17}
c
c DOCS END

Expand All @@ -390,7 +390,7 @@ module shyfem_version
logical, save :: bshort = .false.

character*10, parameter :: version = '7.5.70'
character*10, parameter :: commit = '2020-09-07'
character*10, parameter :: commit = '2020-09-17'
character*17, parameter :: text = 'SHYFEM VERSION = '

character*40, parameter :: string = text//version//' '//commit
Expand Down
2 changes: 2 additions & 0 deletions fembin/git_info/git_info_branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ git commit
git stash list
git stash drop

git diff branch1..branch2 #compares head of two branches
git diff branch1...branch2 #compares head of branch2 with ancestor
38 changes: 38 additions & 0 deletions femcheck/check_compiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
#
# checks if all compilers are available
#
#------------------------------------------------------

#F77
#F95
#cc

debug=YES
debug=NO

TestCompiler()
{
[ $debug = YES ] && echo "test compiler $1"
if [ -z "$1" ]; then
echo "*** no compiler given: $1"
exit 3
fi
command $1 > /dev/null
status=$?
if [ $status -ne 0 ]; then
echo "*** error executing compiler $1"
exit 1
else
:
[ $debug = YES ] && echo " ...ok compiler $1"
fi
}

for compiler
do
TestCompiler "$compiler"
done

exit 0

19 changes: 19 additions & 0 deletions femcheck/check_software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ Exists()

#---------------------------------------------------

CheckMpiCompiler()
{
local missing_save=$missing

CheckCommand mpi_compiler "mpif90 -v" "" "quiet"
[ $status -eq 0 ] && mpi_available="$mpi_available mpif90"

if [ -n "$mpi_available" ]; then
echo "... the following Mpi compilers are available:"
echo " ${green}$mpi_available${normal}"
else
echo "*** ${red}No Mpi compiler found${normal}"
echo " ... please install a Mpi compiler if you want to run in MPI"
echo " (on debian the packages may be: openmpi-bin)"
missing_save="$missing_save mpif90"
fi
}

CheckFortranCompiler()
{
#local fortran_available=""
Expand Down Expand Up @@ -239,6 +257,7 @@ echo
echo "... ${bold}checking Fortran compilers (needed)${normal}"

CheckFortranCompiler
CheckMpiCompiler

echo
echo "... ${bold}checking c compiler and X11 (needed)${normal}"
Expand Down
4 changes: 2 additions & 2 deletions femcheck/rules/Rules.dist
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ ifeq ($(FORTRAN_COMPILER),GNU_GFORTRAN)
LINKER = $(F77)
LFLAGS = $(FGNU_OPT) $(FGNU_PROFILE) $(FGNU_OMP)
FFLAGS = $(LFLAGS) $(FGNU_NOOPT) $(FGNU_WARNING) $(FGNU_GENERAL)
FINFOFLAGS = -v
FINFOFLAGS = --version
endif

##############################################
Expand Down Expand Up @@ -789,7 +789,7 @@ ifeq ($(C_COMPILER),GNU_GCC)
CFLAGS = -O -Wall -pedantic
CFLAGS = -O -Wall -pedantic -std=gnu99 #no warnings for c++ style comments
LCFLAGS = -O
CINFOFLAGS = -v
CINFOFLAGS = --version
endif

ifeq ($(C_COMPILER),INTEL)
Expand Down

0 comments on commit 9981906

Please sign in to comment.