stat: initialize common block. (#148)

* stat: initialize common block.

* Move debug_init.f90/stat_init.f90 to dbgini.f/staini.f.

In cases where one has 2 fortran compilers (F77+F90), the reference code
base and (missing) related common initialisations will be compiled
consistently by the same (F77) compiler. F90 will handle ICB (f2003-f2008)
that could not be compiled by F77.

Note: in F77, code starts at col 7, continuation line with & at col 6,
length line is limited, names must be smaller than 7 chars (no underscore).

* [BUG FIX] compile dbgini.f staini.f with AND without ICB.
This commit is contained in:
Franck HOUSSEN
2018-09-15 17:35:57 +02:00
committed by Sylvestre Ledru
parent 3829c449c0
commit 78d781286a
6 changed files with 42 additions and 20 deletions
+4 -4
View File
@@ -174,13 +174,13 @@ endif()
# file(GLOB arpacklapack_STAT_SRCS lapack/*.f)
#endif()
#file(GLOB arpackutil_STAT_SRCS util/*.f)
file(GLOB arpacksrc_STAT_SRCS ${arpack_SOURCE_DIR}/SRC/*.f)
file(GLOB arpacksrc_STAT_SRCS dbgini.f staini.f ${arpack_SOURCE_DIR}/SRC/*.f)
set(arpacksrc_ICB "")
set(parpacksrc_ICB "")
if(ICB)
file(GLOB arpacksrc_ICB SRC/icba*.f90 debug_init.f90 debug_icb.f90 stat_icb.f90)
file(GLOB parpacksrc_ICB PARPACK/SRC/MPI/icbp*.f90 debug_init.f90 debug_icb.f90 stat_icb.f90)
file(GLOB arpacksrc_ICB SRC/icba*.f90 debug_icb.f90 stat_icb.f90)
file(GLOB parpacksrc_ICB PARPACK/SRC/MPI/icbp*.f90 debug_icb.f90 stat_icb.f90)
endif()
set(arpackutil_STAT_SRCS
@@ -202,7 +202,7 @@ set(arpackutil_STAT_SRCS
if (MPI)
file(GLOB parpackutil_STAT_SRCS PARPACK/UTIL/MPI/*.f)
file(GLOB parpacksrc_STAT_SRCS PARPACK/SRC/MPI/*.f)
file(GLOB parpacksrc_STAT_SRCS dbgini.f staini.f PARPACK/SRC/MPI/*.f)
endif()
# use -DBUILD_SHARED_LIBS=ON|OFF to control static/shared
+3 -2
View File
@@ -1,4 +1,4 @@
AUTOMAKE_OPTIONS = subdir-objects # Needed as debug_init/icb.f90 are not in current directory.
AUTOMAKE_OPTIONS = subdir-objects # Needed as debug/stat* are not in current directory.
F77 = $(MPIF77)
FFLAGS_SAV = @FFLAGS@
@@ -34,7 +34,8 @@ libparpack@LIBSUFFIX@_noopt_la_FFLAGS = -O0
lib_LTLIBRARIES = libparpack@LIBSUFFIX@.la
libparpack@LIBSUFFIX@_la_SOURCES = $(PSRC) $(SSRC) $(DSRC) $(CSRC) $(ZSRC)
libparpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/debug_init.f90
libparpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/dbgini.f
libparpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/staini.f
if ICB
libparpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/debug_icb.f90
libparpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/stat_icb.f90
+3 -2
View File
@@ -1,4 +1,4 @@
AUTOMAKE_OPTIONS = subdir-objects # Needed as debug_init/icb.f90 are not in current directory.
AUTOMAKE_OPTIONS = subdir-objects # Needed as debug/stat* are not in current directory.
SSRC = snaitr.f snapps.f snaup2.f snaupd.f snconv.f sneigh.f sneupd.f sngets.f sstatn.f \
ssaitr.f ssapps.f ssaup2.f ssaupd.f ssconv.f sseigt.f sseupd.f ssgets.f sstats.f \
@@ -25,7 +25,8 @@ EXTRA_DIST = debug.h stat.h version.h
lib_LTLIBRARIES = libarpack@LIBSUFFIX@.la
libarpack@LIBSUFFIX@_la_SOURCES = $(SSRC) $(DSRC) $(CSRC) $(ZSRC)
libarpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/debug_init.f90
libarpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/dbgini.f
libarpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/staini.f
if ICB
libarpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/debug_icb.f90
libarpack@LIBSUFFIX@_la_SOURCES += $(top_builddir)/stat_icb.f90
+13
View File
@@ -0,0 +1,13 @@
c Initialisation of the debug common block to "no debug".
block data dbgini
common /debug/ logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
data logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
& / 6, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
& 0, 0, 0, 0, 0, 0 /
end
-12
View File
@@ -1,12 +0,0 @@
! Initialisation of the debug common block to "no debug".
block data debug_init
common /debug/ logfil, ndigit, mgetv0, &
msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,&
mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,&
mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
data logfil, ndigit, mgetv0, &
msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,&
mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,&
mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd &
/ 6, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /
end block data debug_init
+19
View File
@@ -0,0 +1,19 @@
c Initialisation of the stat common block.
block data staini
common /timing/
& nopx, nbx, nrorth, nitref, nrstrt,
& tsaupd, tsaup2, tsaitr, tseigt, tsgets, tsapps, tsconv,
& tnaupd, tnaup2, tnaitr, tneigh, tngets, tnapps, tnconv,
& tcaupd, tcaup2, tcaitr, tceigh, tcgets, tcapps, tcconv,
& tmvopx, tmvbx, tgetv0, titref, trvec
data nopx, nbx, nrorth, nitref, nrstrt,
& tsaupd, tsaup2, tsaitr, tseigt, tsgets, tsapps, tsconv,
& tnaupd, tnaup2, tnaitr, tneigh, tngets, tnapps, tnconv,
& tcaupd, tcaup2, tcaitr, tceigh, tcgets, tcapps, tcconv,
& tmvopx, tmvbx, tgetv0, titref, trvec
& / 0, 0, 0, 0, 0,
& 0., 0., 0., 0., 0., 0., 0.,
& 0., 0., 0., 0., 0., 0., 0.,
& 0., 0., 0., 0., 0., 0., 0.,
& 0., 0., 0., 0., 0. /
end