Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 ディスカッション

I am getting a compilation error when running this code

nikesh
初心者
2,757件の閲覧回数
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

ラベル(1)
0 件の賞賛
1 解決策
Arjen_Markus
名誉コントリビューター II
2,725件の閲覧回数

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

元の投稿で解決策を見る

3 返答(返信)
Arjen_Markus
名誉コントリビューター II
2,726件の閲覧回数

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

andrew_4619
名誉コントリビューター III
2,708件の閲覧回数

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?

nikesh
初心者
2,698件の閲覧回数

Thanks  @Arjen_Markus  for your valuable suggestion

返信