From 9c72999d5b75658f786f6465570324c40804a966 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Sun, 3 Aug 2014 12:16:25 -0300 Subject: [PATCH 01/16] BOUNDARIES: Fix edge direction in 2D boundaries_specific(). In 2D we don't have face neighbor pointers, so we have to use edge neighbor pointers to find those which are not associated, so we can apply specific boundary conditions. This fixes the calculation of the edge neighbor direction. Signed-off-by: Grzegorz Kowal --- src/boundaries.F90 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/boundaries.F90 b/src/boundaries.F90 index c9eac4a..398b7f5 100644 --- a/src/boundaries.F90 +++ b/src/boundaries.F90 @@ -1073,7 +1073,7 @@ module boundaries ! local variables ! - integer :: i, j, k, n + integer :: i, j, k, n, m ! !------------------------------------------------------------------------------- ! @@ -1114,6 +1114,11 @@ module boundaries ! if (.not. periodic(n)) then +! calculate the edge direction (in 2D we don't have face neighbors, so we have +! to use edge neighbors) +! + m = 3 - n + ! iterate over all corners ! do j = 1, nsides @@ -1121,8 +1126,8 @@ module boundaries ! if the face neighbor is not associated, apply specific boundaries ! - if (.not. associated(pmeta%edges(i,j,n)%ptr)) & - call block_boundary_specific(i, j, k, 3 - n & + if (.not. associated(pmeta%edges(i,j,m)%ptr)) & + call block_boundary_specific(i, j, k, n & , pmeta%data%q(1:nv,1:im,1:jm,1:km)) end do ! i = 1, sides From d8c0b0d5f73de0ecda2394d580dd25b7083cfd4f Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 08:58:27 -0300 Subject: [PATCH 02/16] PARAMETERS: Change argument type in get_parameter_real(). We are working with double precision, so this subroutine should return a real value with double precision too. Signed-off-by: Grzegorz Kowal --- src/parameters.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parameters.F90 b/src/parameters.F90 index 941eac9..bd27ebf 100644 --- a/src/parameters.F90 +++ b/src/parameters.F90 @@ -550,7 +550,7 @@ module parameters ! subroutine arguments ! character(len=*), intent(in) :: name - real , intent(inout) :: value + real(kind=8) , intent(inout) :: value ! local parameter counter ! From 40f0909b1da271f0ebfb9c9b36b5432aee53e393 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:01:21 -0300 Subject: [PATCH 03/16] INTERPOLATIONS: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/interpolations.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interpolations.F90 b/src/interpolations.F90 index b6036a2..a217eba 100644 --- a/src/interpolations.F90 +++ b/src/interpolations.F90 @@ -453,7 +453,7 @@ module interpolations ! selection weights ! - real, parameter :: dp = 2.0d+00 / 3.0d+00, dm = 1.0d+00 / 3.0d+00 + real(kind=8), parameter :: dp = 2.0d+00 / 3.0d+00, dm = 1.0d+00 / 3.0d+00 ! !------------------------------------------------------------------------------- ! @@ -1554,9 +1554,9 @@ module interpolations ! subroutine arguments ! - integer , intent(in) :: n - real, dimension(n), intent(in) :: f - real, dimension(n), intent(inout) :: fl, fr + integer , intent(in) :: n + real(kind=8), dimension(n), intent(in) :: f + real(kind=8), dimension(n), intent(inout) :: fl, fr ! local variables ! From cd966f764c206f620f24302615fcdeba31280dfe Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:03:28 -0300 Subject: [PATCH 04/16] MESH: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/mesh.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesh.F90 b/src/mesh.F90 index 08fb6ef..b86ab0a 100644 --- a/src/mesh.F90 +++ b/src/mesh.F90 @@ -1055,10 +1055,10 @@ module mesh ! local variables ! - integer :: i, j, k, q, p - integer :: il, iu, jl, ju, kl, ku - integer :: ic, jc, kc, ip, jp, kp - real :: dul, dur, dux, duy, duz, du1, du2, du3, du4 + integer :: i, j, k, q, p + integer :: il, iu, jl, ju, kl, ku + integer :: ic, jc, kc, ip, jp, kp + real(kind=8) :: dul, dur, dux, duy, duz, du1, du2, du3, du4 ! local pointers ! @@ -1071,7 +1071,7 @@ module mesh ! local allocatable arrays ! - real, dimension(:,:,:,:), allocatable :: u + real(kind=8), dimension(:,:,:,:), allocatable :: u !------------------------------------------------------------------------------- ! From 0e551e998cb6af628c1f4db1a3cdd4e3637470dc Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:08:59 -0300 Subject: [PATCH 05/16] MPITOOLS: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/mpitools.F90 | 58 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/mpitools.F90 b/src/mpitools.F90 index 93e74f5..b2bf14e 100644 --- a/src/mpitools.F90 +++ b/src/mpitools.F90 @@ -457,8 +457,8 @@ module mpitools ! subroutine arguments ! - real , intent(inout) :: rbuf - integer, intent(inout) :: iret + real(kind=8), intent(inout) :: rbuf + integer , intent(inout) :: iret ! !------------------------------------------------------------------------------- ! @@ -604,12 +604,12 @@ module mpitools ! subroutine arguments ! - real , intent(inout) :: rbuf - integer, intent(out) :: iret + real(kind=8), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real :: tbuf + real(kind=8) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -715,12 +715,12 @@ module mpitools ! subroutine arguments ! - real , intent(inout) :: rbuf - integer, intent(out) :: iret + real(kind=8), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real :: tbuf + real(kind=8) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -825,12 +825,12 @@ module mpitools ! subroutine arguments ! - real , intent(inout) :: rbuf - integer, intent(out) :: iret + real(kind=8), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real :: tbuf + real(kind=8) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -881,13 +881,13 @@ module mpitools ! subroutine arguments ! - integer , intent(in) :: n - real , dimension(n), intent(inout) :: rbuf - integer , intent(out) :: iret + integer , intent(in) :: n + real(kind=8), dimension(n), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real(kind=8), dimension(n) :: tbuf + real(kind=8), dimension(n) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -938,13 +938,13 @@ module mpitools ! subroutine arguments ! - integer , intent(in) :: n - real , dimension(n), intent(inout) :: rbuf - integer , intent(out) :: iret + integer , intent(in) :: n + real(kind=8), dimension(n), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real(kind=8), dimension(n) :: tbuf + real(kind=8), dimension(n) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -1052,13 +1052,13 @@ module mpitools ! subroutine arguments ! - integer , intent(in) :: n - real , dimension(n), intent(inout) :: rbuf - integer , intent(out) :: iret + integer , intent(in) :: n + real(kind=8), dimension(n), intent(inout) :: rbuf + integer , intent(out) :: iret ! local variables ! - real(kind=8), dimension(n) :: tbuf + real(kind=8), dimension(n) :: tbuf ! !------------------------------------------------------------------------------- ! @@ -1176,9 +1176,9 @@ module mpitools ! subroutine arguments ! - integer , intent(in) :: n, dst, tag - real , dimension(n), intent(in) :: rbuf - integer , intent(out) :: iret + integer , intent(in) :: n, dst, tag + real(kind=8), dimension(n), intent(in) :: rbuf + integer , intent(out) :: iret ! !------------------------------------------------------------------------------- ! @@ -1232,9 +1232,9 @@ module mpitools ! subroutine arguments ! - integer , intent(in) :: n, src, tag - real , dimension(n), intent(out) :: rbuf - integer , intent(out) :: iret + integer , intent(in) :: n, src, tag + real(kind=8), dimension(n), intent(out) :: rbuf + integer , intent(out) :: iret ! local variables ! From 9ef713ecb8a019d5ee885c580d715c4964d961f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:09:52 -0300 Subject: [PATCH 06/16] DOMAINS: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/domains.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domains.F90 b/src/domains.F90 index 733ccb3..9c11220 100644 --- a/src/domains.F90 +++ b/src/domains.F90 @@ -153,8 +153,8 @@ module domains ! local variables ! - integer :: i, j, k, n, p, ic, jc, kc - real :: xl, xmn, xmx, yl, ymn, ymx, zl, zmn, zmx + integer :: i, j, k, n, p, ic, jc, kc + real(kind=8) :: xl, xmn, xmx, yl, ymn, ymx, zl, zmn, zmx ! local arrays ! From b5caafef4ccc0f39eed3fa2abbcca2d8a8196add Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:12:05 -0300 Subject: [PATCH 07/16] EVOLUTION: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/evolution.F90 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/evolution.F90 b/src/evolution.F90 index 4fea276..d22bb88 100644 --- a/src/evolution.F90 +++ b/src/evolution.F90 @@ -41,19 +41,19 @@ module evolution ! evolution parameters ! - real , save :: cfl = 0.5d+00 + real(kind=8), save :: cfl = 0.5d+00 ! coefficient controlling the decay of scalar potential ѱ ! - real , save :: alpha = 2.0d+00 - real , save :: decay = 1.0d+00 + real(kind=8), save :: alpha = 2.0d+00 + real(kind=8), save :: decay = 1.0d+00 ! time variables ! - integer, save :: step = 0 - real , save :: time = 0.0d+00 - real , save :: dt = 1.0d+00 - real , save :: dtn = 1.0d+00 + integer , save :: step = 0 + real(kind=8), save :: time = 0.0d+00 + real(kind=8), save :: dt = 1.0d+00 + real(kind=8), save :: dtn = 1.0d+00 ! by default everything is private ! @@ -225,7 +225,7 @@ module evolution ! input variables ! - real, intent(in) :: dtnext + real(kind=8), intent(in) :: dtnext ! !------------------------------------------------------------------------------- ! @@ -309,7 +309,7 @@ module evolution ! input variables ! - real, intent(in) :: dtnext + real(kind=8), intent(in) :: dtnext ! local pointers ! @@ -319,11 +319,11 @@ module evolution ! integer :: iret integer(kind=4) :: lev - real :: cm, dx_min + real(kind=8) :: cm, dx_min ! local parameters ! - real, parameter :: eps = tiny(cmax) + real(kind=8), parameter :: eps = tiny(cmax) ! !------------------------------------------------------------------------------- ! @@ -432,7 +432,7 @@ module evolution ! local arrays ! - real, dimension(nv,im,jm,km) :: du + real(kind=8), dimension(nv,im,jm,km) :: du ! !------------------------------------------------------------------------------- ! @@ -517,7 +517,7 @@ module evolution ! local arrays ! - real, dimension(nv,im,jm,km) :: du + real(kind=8), dimension(nv,im,jm,km) :: du ! !------------------------------------------------------------------------------- ! @@ -638,15 +638,15 @@ module evolution ! local pointers ! - type(block_data), pointer :: pblock + type(block_data), pointer :: pblock ! local vectors ! - real, dimension(3) :: dx + real(kind=8), dimension(3) :: dx ! local variables ! - integer :: n + integer :: n ! !------------------------------------------------------------------------------- ! From 4befafa526ded51e62ecc10a3de1f1172236f303 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:13:55 -0300 Subject: [PATCH 08/16] IO: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/io.F90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/io.F90 b/src/io.F90 index c52902d..cc031f6 100644 --- a/src/io.F90 +++ b/src/io.F90 @@ -117,9 +117,9 @@ module io integer(kind=4) , save :: irest = 1 integer(kind=4) , save :: isnap = 0 integer(kind=4) , save :: ishift = 0 - real , save :: hrest = 6.0e+00 - real , save :: hsnap = 1.0e+00 - real , save :: tsnap = 0.0e+00 + real(kind=8) , save :: hrest = 6.0e+00 + real(kind=8) , save :: hsnap = 1.0e+00 + real(kind=8) , save :: tsnap = 0.0e+00 ! flags to determine the way of data writing ! @@ -374,9 +374,9 @@ module io ! input and output arguments ! - real , intent(in) :: thrs - integer, intent(in) :: nrun - integer, intent(out) :: iret + real(kind=8), intent(in) :: thrs + integer , intent(in) :: nrun + integer , intent(out) :: iret ! !------------------------------------------------------------------------------- ! @@ -475,7 +475,7 @@ module io ! !=============================================================================== ! - real function next_tout() + real(kind=8) function next_tout() ! local variables are not implicit by default ! From 9ac290f9800fd106c78c5f49bfa61376721b2958 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:14:53 -0300 Subject: [PATCH 09/16] DRIVER: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/driver.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver.F90 b/src/driver.F90 index 1fbcb00..0ac77e4 100644 --- a/src/driver.F90 +++ b/src/driver.F90 @@ -85,7 +85,7 @@ program amun integer, dimension(3) :: div = 1 logical, dimension(3) :: per = .true. integer :: nmax = huge(1), ndat = 1 - real :: tmax = 0.0d+00, trun = 9.999d+03, tsav = 3.0d+01 + real(kind=8) :: tmax = 0.0d+00, trun = 9.999d+03, tsav = 3.0d+01 real(kind=8) :: dtnext = 0.0d+00 ! flag to adjust time precisely to the snapshots @@ -118,7 +118,7 @@ program amun integer :: nsteps = 1 character(len=80) :: fmt, tmp - real :: tbeg, thrs + real(kind=8) :: tbeg, thrs real(kind=8) :: tm_curr, tm_exec, tm_conv #ifdef INTEL From 28cc6f35841e5e82419d1a0ce152b97657241945 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:17:56 -0300 Subject: [PATCH 10/16] EQUATIONS: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/equations.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/equations.F90 b/src/equations.F90 index 10be254..eb1edd5 100644 --- a/src/equations.F90 +++ b/src/equations.F90 @@ -1144,8 +1144,8 @@ module equations ! local variables ! - integer :: i - real :: ek, ei + integer :: i + real(kind=8) :: ek, ei ! !------------------------------------------------------------------------------- ! @@ -1209,8 +1209,8 @@ module equations ! local variables ! - integer :: i - real :: ek, ei + integer :: i + real(kind=8) :: ek, ei ! !------------------------------------------------------------------------------- ! From 69d929e2b04de0abbcdeb8cbc3d361e3d0819c84 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:22:11 -0300 Subject: [PATCH 11/16] RANDOM: Change real variables to double precision. Signed-off-by: Grzegorz Kowal --- src/random.F90 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/random.F90 b/src/random.F90 index cf95008..9c3a81d 100644 --- a/src/random.F90 +++ b/src/random.F90 @@ -96,8 +96,8 @@ module random ! local variables ! - integer :: i - real :: r + integer :: i + real(kind=4) :: r ! !------------------------------------------------------------------------------- ! @@ -217,8 +217,8 @@ module random ! local variables ! - integer :: i, l - real :: r + integer :: i, l + real(kind=4) :: r ! !------------------------------------------------------------------------------- ! @@ -326,7 +326,7 @@ module random ! output variables ! - real :: val + real(kind=8) :: val ! local variables ! @@ -349,7 +349,7 @@ module random seeds(kp) = jsr - val = 0.5 + 0.23283064365e-9 * (jz + jsr) + val = 0.5d+00 + 0.23283064365d-09 * (jz + jsr) #ifdef PROFILE ! stop accounting time for the random number generation @@ -380,7 +380,7 @@ module random ! output variables ! - real :: val + real(kind=8) :: val ! local variables ! @@ -403,7 +403,7 @@ module random seeds(kp) = jsr - val = 0.23283064365e-9 * (jz + jsr) + val = 0.23283064365d-09 * (jz + jsr) #ifdef PROFILE ! stop accounting time for the random number generation @@ -434,7 +434,7 @@ module random ! output variables ! - real :: val + real(kind=8) :: val ! local variables ! @@ -457,7 +457,7 @@ module random seeds(kp) = jsr - val = 0.46566128730e-9 * (jz + jsr) + val = 0.46566128730d-09 * (jz + jsr) #ifdef PROFILE ! stop accounting time for the random number generation From ffba6327408d0078061073499d70fde5608da0e0 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:26:36 -0300 Subject: [PATCH 12/16] MAKEFILE: Add preprocessor prefix for -D directives. IBM Fortran does not support preprocessor directives -D directly. They have to be passed using -WF, compilation flag. Therefore we add a variable CPPPREFIX to provide this kind of prefix. Signed-off-by: Grzegorz Kowal --- src/hosts/default | 24 +++++++++++++----------- src/makefile | 8 ++++---- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/hosts/default b/src/hosts/default index 040aa83..a5f738c 100644 --- a/src/hosts/default +++ b/src/hosts/default @@ -10,25 +10,29 @@ # compiler and linker setup # ifeq ($(MPI),Y) -FC = mpif90 +FC = mpif90 else -FC = gfortran +FC = gfortran endif -LD = $(FC) +LD = $(FC) + +# preprocessor prefix (used by IBM Fortran, e.g.) +# +CPPPREFIX = # compiler and linker flags # ifeq ($(DEBUG),Y) -FFLAGS = -g -O2 -DDEBUG +FFLAGS = -g -O2 $(CPPPREFIX)-DDEBUG else -FFLAGS = -O2 +FFLAGS = -O2 endif -LDFLAGS = $(FFLAGS) +LDFLAGS = $(FFLAGS) # libraries # -LIBS = +LIBS = #------------------------------------------------------------------------------- # @@ -37,13 +41,11 @@ LDFLAGS += -static endif ifeq ($(SIGNALS),Y) -FFLAGS += -DSIGNALS +FFLAGS += $(CPPPREFIX)-DSIGNALS endif -FFLAGS += -default-real-8 -default-double-8 - ifeq ($(MPI),Y) -FFLAGS += -DMPI +FFLAGS += $(CPPPREFIX)-DMPI endif ifeq ($(OUTPUT),HDF5) diff --git a/src/makefile b/src/makefile index a56fb88..ef42f76 100644 --- a/src/makefile +++ b/src/makefile @@ -51,20 +51,20 @@ endif # # compiler # -FFLAGS += -D${COMPILER} +FFLAGS += ${CPPPREFIX}-D${COMPILER} # number of dimensions # -FFLAGS += -DNDIMS=${NDIMS} +FFLAGS += ${CPPPREFIX}-DNDIMS=${NDIMS} # output data format # -FFLAGS += -D${OUTPUT} +FFLAGS += ${CPPPREFIX}-D${OUTPUT} # compression # ifneq ($(COMPRESS),NONE) -FFLAGS += -DCOMPRESS -D${COMPRESS} +FFLAGS += ${CPPPREFIX}-DCOMPRESS ${CPPPREFIX}-D${COMPRESS} endif #------------------------------------------------------------------------------- From 7c1e5c10b5b5963b303262663d9e6e94b21611d0 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:34:38 -0300 Subject: [PATCH 13/16] BOUNDARIES: Fix compilation with MPI=N. Signed-off-by: Grzegorz Kowal --- src/boundaries.F90 | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/boundaries.F90 b/src/boundaries.F90 index 398b7f5..d426e8f 100644 --- a/src/boundaries.F90 +++ b/src/boundaries.F90 @@ -401,8 +401,8 @@ module boundaries use coordinates , only : ib, ie, ibl use coordinates , only : jb, je, jbl use coordinates , only : kb, ke, kbl -#ifdef MPI use equations , only : nv +#ifdef MPI use mpitools , only : nprocs, nproc, npmax use mpitools , only : send_real_array, receive_real_array #endif /* MPI */ @@ -2905,9 +2905,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -3484,9 +3482,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -4063,9 +4059,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -4653,9 +4647,7 @@ module boundaries use coordinates , only : im , jm , km use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -5114,9 +5106,7 @@ module boundaries use coordinates , only : im , jm , km use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -5574,9 +5564,7 @@ module boundaries use coordinates , only : im , jm , km use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array From 71c57a42f0f2f102435be5fd48f5f242257f5e5a Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:39:29 -0300 Subject: [PATCH 14/16] BOUNDARIES: Fix compilation with MPI=N in 3D. Signed-off-by: Grzegorz Kowal --- src/boundaries.F90 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/boundaries.F90 b/src/boundaries.F90 index d426e8f..d8de698 100644 --- a/src/boundaries.F90 +++ b/src/boundaries.F90 @@ -1228,9 +1228,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -1778,9 +1776,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array @@ -2328,9 +2324,7 @@ module boundaries use coordinates , only : ie , je , ke use coordinates , only : ibl, jbl, kbl use coordinates , only : ieu, jeu, keu -#ifdef MPI use equations , only : nv -#endif /* MPI */ use mpitools , only : nproc, nprocs, npmax #ifdef MPI use mpitools , only : send_real_array, receive_real_array From 975143fff01b9223a941db6b5d981942836c14c0 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:44:36 -0300 Subject: [PATCH 15/16] INTEGRALS: IBM compiler does not support newunit in open(). Separate open() calls for different compilers. Signed-off-by: Grzegorz Kowal --- src/integrals.F90 | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/integrals.F90 b/src/integrals.F90 index 2b7f4fc..abcb5e0 100644 --- a/src/integrals.F90 +++ b/src/integrals.F90 @@ -142,13 +142,18 @@ module integrals ! create a new integrals file ! +#ifdef GNU + open (newunit = funit, file = fname, form = 'formatted' & + , status = 'replace') +#endif /* GNU */ #ifdef INTEL open (newunit = funit, file = fname, form = 'formatted' & , status = 'replace', buffered = 'yes') -#else /* INTEL */ - open (newunit = funit, file = fname, form = 'formatted' & - , status = 'replace') #endif /* INTEL */ +#ifdef IBM + open (unit = funit, file = fname, form = 'formatted' & + , status = 'replace') +#endif /* IBM */ ! write the integral file header ! @@ -163,13 +168,18 @@ module integrals ! create a new statistics file ! +#ifdef GNU + open (newunit = sunit, file = fname, form = 'formatted' & + , status = 'replace') +#endif /* GNU */ #ifdef INTEL open (newunit = sunit, file = fname, form = 'formatted' & , status = 'replace', buffered = 'yes') -#else /* INTEL */ - open (newunit = sunit, file = fname, form = 'formatted' & - , status = 'replace') #endif /* INTEL */ +#ifdef IBM + open (unit = sunit, file = fname, form = 'formatted' & + , status = 'replace') +#endif /* IBM */ ! write the integral file header ! From 70a0b137b67f85019cc861b95a6b9fe20d1d798c Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Mon, 4 Aug 2014 09:54:49 -0300 Subject: [PATCH 16/16] DRIVER: Make sure we compare the same data types. Signed-off-by: Grzegorz Kowal --- src/driver.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver.F90 b/src/driver.F90 index 0ac77e4..9c05a7a 100644 --- a/src/driver.F90 +++ b/src/driver.F90 @@ -593,7 +593,7 @@ program amun ! calculate days, hours, seconds ! - ec = int(tm_curr * (tmax - time) / max(1.0e-8, time - tbeg), kind = 4) + ec = int(tm_curr * (tmax - time) / max(1.0d-08, time - tbeg), kind = 4) es = max(0, int(mod(ec, 60))) em = int(mod(ec / 60, 60)) eh = int(ec / 3600)