You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
This is for gfortran 7.3.0 and relevant source file dealiasing.f90 line 59,72 and 77.
It seems that during compile time gfortran refuses to accept value p2=1. Complaining that for MOD intrinsic fortran 77 function that
IF (((p1 /= 1).AND.((MOD(order-1,p1-1) == 0))).OR.((p2 /= 1).AND.((MOD(order-1,p2-1) == 0)))) THEN
1
Error: Argument ‘P’ of MOD at (1) shall not be zero
../source/main/dealiasing.f90:72:18:
Usage of MODULO (fortran 95 standard) instead of MOD makes it go away.
The text was updated successfully, but these errors were encountered:
Hi,
I added these lines to solve the problem (apparently MODULO has the same syntax as MOD):
!fixing the compilation error with MOD or MODULO at original code IF ( (p2-1) == 0 ) THEN ! MODULO(order-1,p2-1) is not equal to zero LogicalCond = .FALSE. ELSE LogicalCond = .TRUE. END IF
LOGICAL :: LogicalCond =.FALSE.
!
! CPU times inlet
IF(iCPUtime.eq.1) then
print*,'entering subroutine dealias'
call CPU_TIME(ti)
ENDIF
!
!fixing the error with MOD or MODULO at original code
IF((p2-1) == 0) THEN
!MODULO(order-1, p2-1) is not equal to zero
LogicalCond =.FALSE.
ELSE
LogicalCond =.TRUE.
END IF
!
! To prevent from multiples FFTs...
!IF (((p1 /= 1).AND.((MOD(order-1,p1-1) == 0))).OR.((p2 /= 1).AND.((MODULO(order-1,p2-1) == 0)))) THEN
IF (((p1 /= 1).AND.((MODULO(order-1,p1-1) == 0))).OR.((p2 /= 1).AND.(LogicalCond))) THEN
!
todealias = space_2_Fourier_big(todealias,type_x,type_y)
ENDIF
!
! analysis of the quantity to dealias on (Nd1,Nd2) modes and keep only (n1,n2) non-zeros
IF (p1 /= 1) THEN
IF ((MOD(order-1,p1-1) == 0)) THEN ! partial dealiasing along x-direction
!
todealias(n1+1:Nd1,1:Nd2) = 0.0_rp
END IF
ENDIF
IF ((n2 /= 1).AND.(p2 /= 1)) THEN
!IF ((MOD(order-1,p2-1) == 0)) THEN! partial dealiasing along y-direction
IF (LogicalCond) THEN! partial dealiasing along y-direction
!
todealias(1:Nd1,n2+1:Nd2) = 0.0_rp
ENDIF
ENDIF
!IF (((p1 /= 1).AND.((MODULO(order-1,p1-1) == 0))).OR.((p2 /= 1).AND.((MOD(order-1,p2-1) == 0)))) THEN
IF (((p1 /= 1).AND.((MODULO(order-1,p1-1) == 0))).OR.((p2 /= 1).AND.(LogicalCond))) THEN
!
todealias = Fourier_2_space_big(todealias,type_x,type_y)
ENDIF
!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is for gfortran 7.3.0 and relevant source file
dealiasing.f90
line 59,72 and 77.It seems that during compile time gfortran refuses to accept value
p2=1
. Complaining that forMOD
intrinsic fortran 77 function thatUsage of
MODULO
(fortran 95 standard) instead ofMOD
makes it go away.The text was updated successfully, but these errors were encountered: