[glug-t] g++ / fortran issue
- From: Upendra <ulgandhi@xxxxxxxxxx>
- To: glug_t@xxxxxxxxxxxxx
- Date: Fri, 18 Mar 2005 10:46:04 +0530
Hi
I have a cpp pgm which I am compiling like this
g++ try.cpp ode15s.f -lg2c
Contents of .cpp are somewhat this...
#define pi 3.1415926535
using namespace std;
int fcn_(int *neq, double *t, double *H, double *dH, double *rpar,
double
*ipar);
extern "C" { void ode15s_(int (*fcn_)(int *neq, double *t, double *H,
double *dH, double *rpar, double *ipar), int *, double *, double *,
double
(*)[101]); }
const int Nt=48, Nr=48;
const double Nr1=48,Nt1=48,dt=2*pi/Nt1,dr=1/Nr1;
double
r[Nr+1][Nt+1],r1[(Nr+1)*(Nt+1)+1],r2[(Nr+1)*(Nt+1)],Th[Nr+1][Nt
+1],Th1[(Nr+1)*(Nt+1)+1],Th2[(Nr+1)*(Nt+1)],x[(Nt+1)*(Nr+1)],y[(Nr
+1)*(Nt+1)];
int main()
{
double tend, atol;
int i,j,k=0,k1,k2,neq;
int des; //number of differential equations
/* int Nt=4,Nr=4; */
double tout, t, H[Nr*Nt];
ofstream outfile("nilesh.txt");
neq = Nr*Nt;
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
Thanking you,
upen
*******************************************************************************
---------------------------------------------------------------
To unsubscribe send a mail to glug_t-request@xxxxxxxxxxxxx with
'unsubscribe' as subject.
Website: http://glugt.linuxisle.com
- Follow-Ups:
- [glug-t] Re: g++ / fortran issue
- From: Vijay Kumar
Other related posts:
- » [glug-t] g++ / fortran issue
- » [glug-t] Re: g++ / fortran issue
- » [glug-t] Re: g++ / fortran issue
- [glug-t] Re: g++ / fortran issue
- From: Vijay Kumar