Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(meson): update build to Fortran 2018 standard #1952

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(
'b_vscrt=static_from_buildtype', # Link runtime libraries statically on Windows
'optimization=2',
'debug=false',
'fortran_std=f2008',
'fortran_std=f2018',
])

if get_option('optimization') == '3'
Expand Down
4 changes: 2 additions & 2 deletions pymake/makedefaults
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ OPTLEVEL ?= -O2
# set the fortran flags
ifeq ($(detected_OS), Windows)
ifeq ($(FC), gfortran)
FFLAGS ?= -static -fbacktrace -ffpe-summary=overflow -ffpe-trap=overflow,zero,invalid $(OS_macro) -Wtabs -Wline-truncation -Wunused-label -Wunused-variable -pedantic -std=f2008 -Wcharacter-truncation -cpp
FFLAGS ?= -static -fbacktrace -ffpe-summary=overflow -ffpe-trap=overflow,zero,invalid $(OS_macro) -Wtabs -Wline-truncation -Wunused-label -Wunused-variable -pedantic -std=f2018 -Wcharacter-truncation -cpp
endif
else
ifeq ($(FC), gfortran)
FFLAGS ?= -fbacktrace -ffpe-summary=overflow -ffpe-trap=overflow,zero,invalid $(OS_macro) -Wtabs -Wline-truncation -Wunused-label -Wunused-variable -pedantic -std=f2008 -Wcharacter-truncation -cpp
FFLAGS ?= -fbacktrace -ffpe-summary=overflow -ffpe-trap=overflow,zero,invalid $(OS_macro) -Wtabs -Wline-truncation -Wunused-label -Wunused-variable -pedantic -std=f2018 -Wcharacter-truncation -cpp
endif
ifeq ($(FC), $(filter $(FC), ifort mpiifort))
FFLAGS ?= -no-heap-arrays -fpe0 -traceback -fpp
Expand Down
29 changes: 19 additions & 10 deletions src/Solution/LinearMethods/ImsReordering.f90
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,13 @@ subroutine ims_md(n, nja, ia, ja, mmax, v, l, head, last, next, &
! -- local
integer(I4B) :: tag
integer(I4B) :: dmin
integer(I4B) :: vk
integer(I4B) :: ek
integer(I4B), pointer :: vk
integer(I4B), pointer :: ek
integer(I4B) :: tail
integer(I4B) :: k

equivalence(vk, ek)
allocate (vk)
ek => vk
!
! initialization
tag = 0
Expand Down Expand Up @@ -353,6 +354,8 @@ subroutine ims_md(n, nja, ia, ja, mmax, v, l, head, last, next, &
last(next(k)) = k
end do
!
deallocate (vk)
!
return
end subroutine ims_md

Expand Down Expand Up @@ -482,15 +485,16 @@ subroutine ims_mdm(n, mmax, vk, tail, v, l, last, next, mark)
integer(I4B) :: tag
integer(I4B) :: s
integer(I4B) :: ls
integer(I4B) :: vs
integer(I4B) :: es
integer(I4B), pointer :: vs
integer(I4B), pointer :: es
integer(I4B) :: b
integer(I4B) :: lb
integer(I4B) :: vb
integer(I4B) :: blp
integer(I4B) :: blpmax

equivalence(vs, es)
allocate (vs)
es => vs
!
! initialize tag and list of uneliminated neighbors
tag = mark(vk)
Expand Down Expand Up @@ -535,6 +539,8 @@ subroutine ims_mdm(n, mmax, vk, tail, v, l, last, next, mark)
!
! terminate list of uneliminated neighbors
5 l(tail) = 0
!
deallocate (vs)
!
return
end subroutine ims_mdm
Expand Down Expand Up @@ -681,8 +687,8 @@ subroutine ims_mdu(n, mmax, ek, dmin, v, l, head, last, next, mark)
integer(I4B) :: evi
integer(I4B) :: dvi
integer(I4B) :: s
integer(I4B) :: vs
integer(I4B) :: es
integer(I4B), pointer :: vs
integer(I4B), pointer :: es
integer(I4B) :: b
integer(I4B) :: vb
integer(I4B) :: ilp
Expand All @@ -691,7 +697,8 @@ subroutine ims_mdu(n, mmax, ek, dmin, v, l, head, last, next, mark)
integer(I4B) :: blpmax
integer(I4B) :: i

equivalence(vs, es)
allocate (vs)
es => vs
!
! initialize tag
tag = mark(ek) - last(ek)
Expand Down Expand Up @@ -768,7 +775,9 @@ subroutine ims_mdu(n, mmax, ek, dmin, v, l, head, last, next, mark)
!
end do louter !10
!
11 return
11 deallocate (vs)
!
return
end subroutine ims_mdu

end module IMSReorderingModule
Loading