[overture] Re: 3d cns seg fault with gfortran

  • From: Bill Henshaw <henshaw@xxxxxxxx>
  • To: overture@xxxxxxxxxxxxx
  • Date: Tue, 14 Apr 2009 17:15:13 -0700

Hi Joel,
  I think we've found the cause of your bug which doesn't appear with the
pgf compilers we normally use but does appear with gfortran.

  The fix is to change cg/cns/src/godunov/dudr3d.f lines 409-410
and change the variable "pressure" to the variable "pp"
          call getp3d (md,rwk,pp,dp,0,te,ier)
          if (pp.le.0.d0) then

As a remark, you will learn more from gdb if you compile the files
with the -g flag (e.g. the file dudr3d.f) You can turn on compilation
with -g in the cg/cns/Makefile with the flag

compile=dbg

...Bill

Joel Guerrero wrote:
Hi Bill,

I just compiled the new version of cns godunov (v23), but I am still getting 
the same segmentation fault error as in the previous version (v22).  Here is 
the output of gdb,

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b658ac0f6f0 (LWP 1430)]
0x00002b658008636c in getp3d_ () from 
/home/joegi/cfd/overturev23/cgdebug.v23/cns/../cns/lib/libCgcns.so
(gdb) where
#0  0x00002b658008636c in getp3d_ () from 
/home/joegi/cfd/overturev23/cgdebug.v23/cns/../cns/lib/libCgcns.so
#1  0x00002b65800996e0 in dudr3d_ () from 
/home/joegi/cfd/overturev23/cgdebug.v23/cns/../cns/lib/libCgcns.so
#2 0x00002b657fd23907 in Cgcns::getUt (this=0x18276c0, v=@0x17fd590, gridVelocity_=@0x102e470, dvdt=@0x26c2b70, iparam=0x7fff2b06cf70, rparam=0x7fff2b06cf20, dvdtImplicit=@0x102e470, pmg2=0x1b781b0, pGridVelocity2=0x0) at src/cns.C:1374
#3  0x00002b658056c15b in DomainSolver::getUt (this=0x18276c0, cgf=@0x182b2a8, 
t=@0x182b2b8, ut=@0x183a008, tForce=0)
    at src/advance.C:507
#4  0x00002b657fd97c22 in Cgcns::initializeSolution (this=0x18276c0) at 
src/setupGridFunctions.C:75
#5  0x00002b65805ae7a9 in DomainSolver::setup (this=0x18276c0, time=@0x18272a0) 
at src/DomainSolver.C:512
#6  0x00002b6580425281 in DomainSolver::setParametersInteractively 
(this=0x18276c0, runSetupOnExit=true) at src/setup.C:2361
#7  0x000000000042e5f8 in main (argc=2, argv=0x7fff2b081a48) at 
src/cgcnsMain.C:154

Btw i am compiling overture using gcc, g++ and gfortran  v4.2.1

Regards,

Joel




Other related posts:

  • » [overture] Re: 3d cns seg fault with gfortran - Bill Henshaw