Hello,
I have written a Fortran hybrid MPI/OpenMP application. It seems to run well on a Xeon based cluster. I have optimized it with
compiler directives like !DIR$ VECTOR, !DIR$ SIMD (with -xAVX option too) using ifort14.0.2 . All the arrays and scalars are 64 bytes aligned.
Next I compile it specifically for MIC (two 5110p on a Xeon based server) using the -mmic option (instead of -xAVX). If I run the code directly on the MIC, so native mode, it stops in nested loops without any messages. I try debugging options but I get nothing more. The only thing I notice is that removing !DIR$ directives for inner loops makes it go further.
The nested loops concerned are the following :
!$OMP DO COLLAPSE (2) DO k = Kmin-Nghost, Kmax+Nghost DO j = Jmin-Nghost, Jmax+Nghost ! !!!DIR$ VECTOR ALIGNED !!!DIR$ IVDEP DO i = Imin-Nghost, Imax+Nghost TV_i(i) = Q(5,i,j,k) END DO ! ! CALL to MKL to compute vector inversion CALL vdinv (Imax-Imin+2*Nghost+1, TV_i(Imin-Nghost), TV_o(Imin-Nghost) ) ! !!!DIR$ VECTOR ALIGNED !!!DIR$ IVDEP DO i = Imin-Nghost, Imax+Nghost TV_i(i) = Gm1 * ( Q(4,i,j,k)& - half * TV_o(i) * (Q(1,i,j,k)*Q(1,i,j,k) + Q(2,i,j,k)*Q(2,i,j,k)& + Q(3,i,j,k)*Q(3,i,j,k) ) ) END DO ! !!!DIR$ VECTOR ALIGNED !!!DIR$ IVDEP DO i = Imin-Nghost, Imax+Nghost QP(1,i,j,k) = Q(1,i,j,k) * TV_o(i) QP(2,i,j,k) = Q(2,i,j,k) * TV_o(i) QP(3,i,j,k) = Q(3,i,j,k) * TV_o(i) QP(4,i,j,k) = G *TV_i(i) * TV_o(i) ! QP(5,i,j,k) = sV1 * V1& + sV2 * (scal_iAdim * SQRT( ABS(TV_i(i) * TV_o(i) * GCq) * Trefq)& * (eps+ABS(TV_i(i) * TV_o(i) * GCq) ) * (one+Sth) / (eps + ABS(TV_i(i) * TV_o(i) * GCq) + S11) ) END DO ! END DO END DO
If all the !DIR$ directives are put in comments then it works. If I uncomment some of the directives, the code stops without any warning.
Have you any idea of what is happening ?
Regards,
Guy.