the code attached runs, if I compile without OpenMP, with OpenMP-compilation, an error occured by running a subroutine. If anybody knows why, this would be great. I use the Intel Compiler 11 on Ubuntu 8.04

Thanks in advance

Chris

Here is the code for the 2 routines:

- Code: Select all
`IF (MIXTURE_FRACTION) THEN`

!$OMP PARALLEL DO COLLAPSE(3) PRIVATE(K,J,I,ITMP,Z_VECTOR,CP_SUM,CP_MF,N)

DO K=1,KBAR

DO J=1,JBAR

DO I=1,IBAR

!IF (SOLID(CELL_INDEX(I,J,K))) CYCLE

OpenMP_DIVG_005: IF (SOLID(CELL_INDEX(I,J,K))) THEN

CALL DO_NOTHING('DIVG_PART1_MIXTURE_FRACTION_RTRM')

ELSE !OpenMP

ITMP = 0.1_EB*TMP(I,J,K)

Z_VECTOR = YYP(I,J,K,I_Z_MIN:I_Z_MAX)

CALL GET_CP(Z_VECTOR,Y_SUM(I,J,K),CP_MF,ITMP) !!! -> THIS Subroutine is called, than inside the subroutine the program stops with OpenMP, it runs without OpenMP

IF (N_SPECIES > (I_Z_MAX-I_Z_MIN+1)) THEN

CP_SUM = 0._EB

DO N=1,N_SPECIES

IF (SPECIES(N)%MODE/=MIXTURE_FRACTION_SPECIES) &

CP_SUM = CP_SUM + YYP(I,J,K,N)*SPECIES(N)%CP(ITMP)

END DO

CP_MF = CP_SUM + (1._EB-Y_SUM(I,J,K))*CP_MF

ENDIF

RTRM(I,J,K) = R_PBAR(K,PRESSURE_ZONE(I,J,K))*RSUM(I,J,K)/CP_MF

DP(I,J,K) = RTRM(I,J,K)*DP(I,J,K)

ENDIF OpenMP_DIVG_005

ENDDO

ENDDO

ENDDO

!!$OMP END PARALLEL DO

This is the code of the called subroutine GET_CP, the line where the code stops by using OpenMP is marked, without OpenMP there are no problems:

- Code: Select all
`SUBROUTINE GET_CP(Z_IN,YY_SUM,CP_MF,ITMP)`

INTEGER, INTENT(IN) :: ITMP

REAL(EB), INTENT(IN) :: Z_IN(1:I_Z_MAX - I_Z_MIN + 1),YY_SUM

REAL(EB) ::Z(1:I_Z_MAX - I_Z_MIN + 1),CP_MF,OMYYSUM

IF (YY_SUM >=1._EB) THEN

CP_MF = SPECIES(0)%CP(ITMP)

RETURN

ELSE

OMYYSUM = 1._EB-MAX(0._EB,YY_SUM)

Z = MAX(0._EB,MIN(1._EB,Z_IN))/OMYYSUM !----> THIS is the line where the code stops

ENDIF

CP_MF = (Z2CP_C(ITMP) + DOT_PRODUCT(Z2CP(ITMP,:),Z))/(Y_MF_SUM_C + DOT_PRODUCT(Y_MF_SUM_Z,Z))

END SUBROUTINE GET_CP