Skip to content

Commit

Permalink
Change the continuation line format for stat.h, debug.h (#339)
Browse files Browse the repository at this point in the history
Change the continuation line format for stat.h, debug.h

AOCC flang compiler is complaining about the continuation lines in these
two files.  It does not complain about similar continuation lines in
files (e.g. SRC/icbacn.F90), so I believe this is due to flang setting
the Fortran dialect to something like F77 for most of the compilations,
which cause problems with these *.h files.

I cannot find a way to force flang Fortran dialect to accept the & at
end of line continuation marker, so this patch changes the continuation
lines in these two files (stat.h, debug.h) to use continuation marker in
column 6.

This should fix #300
  • Loading branch information
payerle authored Apr 23, 2022
1 parent a5155ee commit 1f4c1e0
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
arpack-ng - 3.9.0

[ Tom Payerle ]
* Change the continuation line format for stat.h, debug.h

[ John Doe ]
* Avoid calling [c|z]dotc for better portability on macOS

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,14 @@ if(ICB)
endif()

install(FILES debug.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
install(FILES debugF90.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
if(ICB)
install(FILES ICB/debug_c.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
install(FILES ICB/debug_c.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
endif()

install(FILES stat.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
install(FILES statF90.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
if(ICB)
install(FILES ICB/stat_c.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
install(FILES ICB/stat_c.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/arpack)
Expand Down
2 changes: 1 addition & 1 deletion ICB/debug_icb.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ subroutine debug_c(logfil_c, ndigit_c, mgetv0_c,
integer(kind=i_int), value, intent(in) :: msaupd_c, msaup2_c, msaitr_c, mseigt_c, msapps_c, msgets_c, mseupd_c
integer(kind=i_int), value, intent(in) :: mnaupd_c, mnaup2_c, mnaitr_c, mneigh_c, mnapps_c, mngets_c, mneupd_c
integer(kind=i_int), value, intent(in) :: mcaupd_c, mcaup2_c, mcaitr_c, mceigh_c, mcapps_c, mcgets_c, mceupd_c
include 'debug.h'
include 'debugF90.h'
logfil = logfil_c
ndigit = ndigit_c
mgetv0 = mgetv0_c
Expand Down
2 changes: 1 addition & 1 deletion ICB/stat_icb.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ subroutine stat_c( nopx_c, nbx_c, nrorth_c, nitref_c, nrstrt_c,
tnaupd_c, tnaup2_c, tnaitr_c, tneigh_c, tngets_c, tnapps_c, tnconv_c,&
tcaupd_c, tcaup2_c, tcaitr_c, tceigh_c, tcgets_c, tcapps_c, tcconv_c,&
tmvopx_c, tmvbx_c, tgetv0_c, titref_c, trvec_c
include 'stat.h'
include 'statF90.h'
nopx_c = nopx
nbx_c = nbx
nrorth_c = nrorth
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I m4

pkgincludedir = $(includedir)/arpack
pkginclude_HEADERS = debug.h stat.h arpackdef.h
pkginclude_HEADERS = debug.h stat.h debugF90.h statF90.h arpackdef.h

AM_DISTCHECK_CONFIGURE_FLAGS =
if MPI
Expand Down
18 changes: 9 additions & 9 deletions debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
! %---------------------------------%
! | See debug.doc for documentation |
! %---------------------------------%
integer logfil, ndigit, mgetv0, &
msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,&
mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,&
mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
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
integer logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
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
16 changes: 16 additions & 0 deletions debugF90.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!
!\SCCS Information: @(#)
! FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2
!
! %---------------------------------%
! | See debug.doc for documentation |
! %---------------------------------%
integer logfil, ndigit, mgetv0, &
msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,&
mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,&
mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
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
20 changes: 10 additions & 10 deletions stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
save t0, t1, t2, t3, t4, t5
!
integer nopx, nbx, nrorth, nitref, nrstrt
real 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
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
real 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
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
21 changes: 21 additions & 0 deletions statF90.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
! %--------------------------------%
! | See stat.doc for documentation |
! %--------------------------------%
!
!\SCCS Information: @(#)
! FILE: stat.h SID: 2.2 DATE OF SID: 11/16/95 RELEASE: 2
!
real t0, t1, t2, t3, t4, t5
save t0, t1, t2, t3, t4, t5
!
integer nopx, nbx, nrorth, nitref, nrstrt
real 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
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

0 comments on commit 1f4c1e0

Please sign in to comment.