[glug-t] Re: g++ / fortran issue

Thanks for reply , I did it o/p is underneath, where can I put break
now ?

>>
(gdb) run
Starting program: /home/stud/phd/ramya/aa/a.out

Program received signal SIGSEGV, Segmentation fault.
0x08049ca9 in ode15s_ (
    func=0x80492c6 <fcn_(int*, double*, double*, double*, double*,
double*)>,
    neq=0xbffff858, tend=0xbffff848, xx=0xbfffb040, xx_tt__=0xbfe34390)
    at ode15s.f:29
29              FACT = (TEND/TOUT)**(1.0/100)
Current language:  auto; currently fortran

(gdb) backtrace
#0  0x08049ca9 in ode15s_ (
    func=0x80492c6 <fcn_(int*, double*, double*, double*, double*,
double*)>,
    neq=0xbffff858, tend=0xbffff848, xx=0xbfffb040, xx_tt__=0xbfe34390)
    at ode15s.f:29
#1  0x08049104 in main () at try.cpp:95

(gdb) frame 1
#1  0x08049104 in main () at try.cpp:95
95                ode15s_(fcn_, &neq, &tout, H, xx_tt);
Current language:  auto; currently c++

(gdb) print fcn_
$10 = {int (int *, double *, double *, double *, double *,
    double *)} 0x80492c6 <fcn_(int*, double*, double*, double*, double*,
double*)>

gdb) print &neq
$14 = (int *) 0xbffff858
(gdb) print &tout
$15 = (double *) 0xbffff848
(gdb) print H
$16 = {0.68079999999999996 <repeats 48 times>,
  0.68059807008119189 <repeats 48 times>,
  0.67999205252594341 <repeats 48 times>,
  0.67898126265093739 <repeats 48 times>,
  0.6775645550108288 <repeats 48 times>,
  0.67574031687861302 <repeats 48 times>,
  0.67350645899685302 <repeats 48 times>,
  0.670860403474976 <repeats 48 times>,
  0.66779906866705352 <repeats 48 times>,
  0.66431885081954378 <repeats 48 times>,
  0.66041560222818319 <repeats 48 times>,
  0.6560846055860875 <repeats 48 times>,
  0.65132054413945195 <repeats 48 times>,
  0.64611746719087237 <repeats 48 times>,
  0.64046875040068529 <repeats 48 times>,
  0.63436705023060702 <repeats 48 times>, 0.62780425174731425,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731425,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731425,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731447,
  0.62780425174731425, 0.62780425174731447, 0.62780425174731425,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731447,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731425,
  0.62780425174731425, 0.62780425174731425, 0.62780425174731447,
---Type <return> to continue, or q <return> to quit---
  0.62780425174731425, 0.62780425174731447, 0.62780425174731425,
  0.62780425174731447, 0.62780425174731425, 0.62780425174731447,
  0.62780425174731425, 0.62780425174731447,
  0.62780425174731425 <repeats 18 times>...}

(gdb) print xx_tt
$17 = {{0 <repeats 101 times>}, {0 <repeats 101 times>}}

kill.
--upen




On Sat, 2005-03-19 at 21:41 +0530, Vijay Kumar wrote:
> Upendra <ulgandhi@xxxxxxxxxx> writes:
> 
> > 2 matrices are used whose order is 48 x 48 , when i keep it 24 x 24
> > my compiled pgm runs well. When I change 24 to 48 then compiled pgm
> > gives segmentation fault. on mdk/rh/fedora systems with RAM upto 2
> > GB and p4 HT processors.
> > 
> > What could be done to get rid of segmentation fault ? This is only when 
> > order of matrix change from 24 to 48
> 
> Compile with debugging support -ggdb. Run it through gdb. After the
> program segfaults, get a backtrace to analyse the problem.
> 
> Vijay
> 
> ---------------------------------------------------------------
> To unsubscribe send a mail to glug_t-request@xxxxxxxxxxxxx with 
> 'unsubscribe' as subject.
> 
> Website: http://glugt.linuxisle.com

---------------------------------------------------------------
To unsubscribe send a mail to glug_t-request@xxxxxxxxxxxxx with 
'unsubscribe' as subject.

Website: http://glugt.linuxisle.com

Other related posts: