Fortran: Short form for "do loop"
Hey there, I have a code like that:
write (filehandle,'(5e14.6)')
& (((my_array(i,j,k,1),i=istart,iend,istep)开发者_如何学Python,j=jstart,jend,jstep),k=kstart,kend,kstep)
is this a short form for a "do-loop"? I couldn't find anything about it on google... Furthermore, I'm getting an error:
forrtl: severe (71): integer divide by zero Image PC
Routine Line Source libpthread.so.0 00007F473F0D892B Unknown Unknown Unknown libguide.so 00007F473F3CC20E Unknown Unknown Unknown
when executing the program (program is parallelized with OpenMP) about THIS line (removing the line removes the error-msg). What could be the cause about it? Thanks!
As already answered, that is an implicit do-loop.
Could istep, jstep or kstep by zero? That might lead to integer divide by zero, as the program tried to compute the number of loop iterations.
Does the program run correctly when you compile without OpenMP?
Those are referred to as implicit or implied do-loops.
I don't see any division by zero in that statement, could it be one of the surrounding lines?
精彩评论