- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have the following piece of code:
subroutine THOMAS_2D_NewType(IJmin, IJmax, & JImin, JImax, & di, dj, & THOMAS, & ANSWER, & ModelName) !Arguments------------------------------------------------------------- integer, intent(IN) :: IJmin, IJmax integer, intent(IN) :: JImin, JImax integer, intent(IN) :: di, dj type(T_THOMAS2D), pointer :: THOMAS real, dimension(:,:), pointer :: ANSWER character (len=*), optional :: ModelName !Local----------------------------------------------------------------- integer :: IJ, JI, II, MM, I, J type(T_VECGW), pointer :: VEC integer :: TID !$ integer :: CHUNK ! real :: AUX !Begin----------------------------------------------------------------- !$ CHUNK = CHUNK_J(IJmin,IJmax) ! !$OMP PARALLEL PRIVATE(TID,VEC,IJ,I,J,JI,II,MM,AUX) TID = 1 !$ TID = 1 + omp_get_thread_num() ! VEC => THOMAS%VEC(TID) !$OMP DO SCHEDULE(DYNAMIC,CHUNK) do2 : do IJ = IJmin, IJmax I = IJmin-1 + IJ*dj + di J = JImin-1 + IJ*di + dj VEC%W(JImin) = -THOMAS%COEF2%F(I, J)/THOMAS%COEF2%E(I, J) VEC%G(JImin) = THOMAS%TI(I, J) /THOMAS%COEF2%E(I, J) do3 : do JI=JImin+1,JImax+1 I = IJ*dj + JI*di J = IJ*di + JI*dj AUX = THOMAS%COEF2%E(I,J) + THOMAS%COEF2%D(I,J) * VEC%W(JI-1) if (abs(AUX) > 0) then VEC%W(JI) = -THOMAS%COEF2%F(I,J) / AUX VEC%G(JI) = (THOMAS%TI(I,J) - THOMAS%COEF2%D(I,J) * VEC%G(JI-1))/ AUX else VEC%W(JI) = 0. VEC%G(JI) = 0. write(*,*) 'ModelName I, J: ', trim(ModelName), ' ', I, J write(*,*) 'Error: Instability in THOMAS2D - ModuleFunctions - ERR10' end if end do do3 I = IJ * dj + (JImax+1) * di J = IJ * di + (JImax+1) * dj ANSWER(I, J) = VEC%G(JImax+1) do1 : do II = JImin+1, JImax+1 MM = JImax+JImin+1-II I = IJ*dj + MM*di J = IJ*di + MM*dj ANSWER(I,J) = VEC%W(MM) * ANSWER(I+di,J+dj) + VEC%G(MM) end do do1 end do do2 !$OMP END DO NOWAIT !$OMP END PARALLEL end subroutine THOMAS_2D_NewType
It compiles til the fortran version 14.0.3
From version 15 and up (til 16.0.1), this causes an ICE.
The ICE happens only on Linux. On Windows it compiles ok (up to 15.0.4, I do'nt have 16 and 16.0.1 on Windows).
Can you help me figure out if there is something wrong with this code?
Thanks in advance!
Eduardo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this a contained subroutine? I see no definition of T_THOMAS2D, T_VECGW and CHUNK_J (there may be others).
Nothing stands out of place when I look at the code. Add IMPLICIT NONE and compile with the interface checking. See what shows up.
The NOWAIT isn't going to do anything for you as there is no code following the !$OMP END DO.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jim,
This is a Module routine.
Chunk_J is another routine in this module:
integer function Chunk_J(JLB, JUB, factor) !Arguments------------------------------------------------------- integer, intent(IN) :: JLB, JUB integer, optional, intent(IN) :: factor !Locals---------------------------------------------------------- integer :: factor_ if (present(factor)) then factor_ = factor else factor_ = ChunkJFactor endif Chunk_J = max((JUB - JLB) / factor_, 1) end function Chunk_J
T_... are types within the module.
I'm sending this module (and it's dependences) attached to allow you to compile it and see the error:
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
The line I'm using to compile is this:
-g -gen-interfaces -warn interfaces -check all -openmp -fpp -r8 -std03 -m64 -ip -zero -xHost -axAVX -O3 -parallel -inline-level=1 -assume buffered_io -warn all -nologo -convert big_endian -fpe0 -D_USE_NIX -traceback -mcmodel=medium -shared-intel -openmp-link=static -static-libgcc -heap-arrays 64 -c -D_LAGRANGIAN_GLOBAL_ -D_COMPILED_BY=\"user\" -D_NO_NETCDF -D_STACK_LIMITS
Cheers,
Eduardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page