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

I am getting a compilation error when running this code

nikesh
Novice
3 662 Visites
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

Étiquettes (1)
0 Compliments
1 Solution
Arjen_Markus
Contributeur émérite II
3 630 Visites

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 ;)).

Voir la solution dans l'envoi d'origine

0 Compliments
3 Réponses
Arjen_Markus
Contributeur émérite II
3 631 Visites

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 Compliments
andrew_4619
Contributeur émérite III
3 613 Visites

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 Compliments
nikesh
Novice
3 603 Visites

Thanks  @Arjen_Markus  for your valuable suggestion

0 Compliments
Répondre