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

I am getting a compilation error when running this code

nikesh
Novice
1,103 Views
Hello all
 
I am running a Fortran code using LS-DYNA object executable file but get an error.

Error like as when I am writing any line of the code it is running the code successfully

ex: write(*,*) 'Line 813',sigav

But when the same line is commented the code is not running successfully.

ex: !write(*,*) 'Line 813',sigav

This is a strange error that comes in my FORTRAN routine. Have anyone stuck with this above error? if yes then please share your valuable suggestion.

some part of my routine is:-

dsigv = matmul(celas,depsp)

sigav = sigav + dsigv

!write(*,*) 'Line 813',sigav

call eqstrs(idele,nstrc, sigav, sige1)

call eqstrn(nstrc, depsp, sige1, sigav, depse)

epse1 = epse1 + depse

dummy_depse = depse

endif

stncm = (1.d0 - inits)*ratio*stncm

 

your suggestion will be highly appreciated

regard

nikesh

Labels (1)
0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
1,071 Views

This is often a sign of array bound violations or a mismatch in actual and dummy arguments to routines. The first step is to turn on all the warnings and runtime checks via the various compiler options. You can ask the compiler to automatically generate modules for you, so that routines that are defined outside modules still can be checked.

One caveat: if you use assume-size arrays (real :: a(*) and the like), the check on array bounds is less than effective. I have been bitten by that very recently (I got lazy because I always or almost always use modules to contain my routines ;)).

View solution in original post

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
1,072 Views

This is often a sign of array bound violations or a mismatch in actual and dummy arguments to routines. The first step is to turn on all the warnings and runtime checks via the various compiler options. You can ask the compiler to automatically generate modules for you, so that routines that are defined outside modules still can be checked.

One caveat: if you use assume-size arrays (real :: a(*) and the like), the check on array bounds is less than effective. I have been bitten by that very recently (I got lazy because I always or almost always use modules to contain my routines ;)).

0 Kudos
andrew_4619
Honored Contributor III
1,054 Views

Any answer will be guesswork. You do not identify what the error actually is. Compile error? Fortran run time error? LS-DYNA solver error? Bad results?

0 Kudos
nikesh
Novice
1,044 Views

Thanks  @Arjen_Markus  for your valuable suggestion

0 Kudos
Reply