Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

address error, possible array problem

nericsla
초급자
496 조회수
I have modified the numerical recipes ODE integrator. When I ran the original NR code, it worked fine. I have now changed something and I now get odd problems with my arrays.
In the odeint.f90, there is a statement (see http://tero.fis.uncor.edu/NR/f90/odeint.f90):
y(:)=ystart(:)
Now, when the array is passed to save_a_step (internal subroutine), I get an address error.
If I change the above line to:
y = ystart
the error disappears. Sadly, I think this is the cause of further errors, so I would like to know what is happening. What is the difference between:
y and y(:)
????
Thanks.
0 포인트
1 응답
Steven_L_Intel1
496 조회수
There should not be a difference. If you are usimg the latest version of the Intel compiler and can come up with an example that demonstrates the problem, please send it to Intel Premier Support.

I will note that the (:) syntax is not meaningful in this context and, I feel, is poor coding style. But it is legal Fortran.
0 포인트
응답