Topic: Program received signal SIGSEGV: Segmentation fault...

When I launch the code, I have got the following error message:
"Program received signal SIGSEGV: Segmentation fault - invalid Memory refererence.
Backtrace for this error:"

I am using 64-bit OS. I added "mcmodel=medium" in flags for fortran complier, but had same error Messages.
In my code, I have many big matrices.

--------------------------------------------------------------------------------------------------------------------------
  integer,parameter::ne=8
  integer,parameter::na=800
  integer,parameter::ni=ne*na
  integer,parameter::nad=20000
  integer,parameter::nid=ne*nad
  integer,parameter:: FT=101
  real(8),dimension(FT):: tr_kl0,tr_kl1,tr_ra,tr_wa,tr_gamma0,tr_gamma1,tr_Tadj,tr_Tx,tr_y1
  real(8),dimension(FT)::tr_cap,tr_lab,tr_agglab,tr_T,tr_Tr,tr_Tp,tr_Ttinc,tr_payroll,tr_inc,tr_cons,tr_Te
  real(8),dimension(FT)::tr_Tc,tr_Ty,tr_Tsy,tr_G
  real(8),dimension(ne,na,FT)::tr_aoptval,tr_loptval
  real(8),dimension(ni,FT):: tr_paytrax,tr_ustar,tr_val
  integer,dimension(ni,FT):: tr_astar,tr_lstar
  real(8),dimension(nid,FT)::tr_dist,tr_aoptf,tr_coptf,tr_loptf,tr_taxf,tr_incomef
  real(8),dimension(nid,FT)::tr_earningf,tr_payrtaxf,tr_tincome,tr_taxef
  real(8),dimension(nid,FT)::tr_avetaxf,tr_incomeposttax,tr_fintaxf,tr_totaltaxf,tr_uf
  real(8),dimension(nid,FT)::tr_taxfadj
  real(8),dimension(ne,nad,FT)::tr_distmat
------------------------------------------------------------------------------------------------------------------------
Can you give me advice to fix this problem? Thank you in advance.

Jin

Re: Program received signal SIGSEGV: Segmentation fault...

Jin,

Is your project currently set as a 64-bit project?  You can check by opening the Project Options window from the Project menu.  Make sure the architecture is set to 64-bit.  Additionally, there are limitations (around 2GB) on the size of statically allocated arrays in your executable.  If the arrays are dynamically allocated (via Fortran's ALLOCATE intrinsic procedure), this limitation disappears.

Additionally, does your program happen to do any file I/O?  One quick thing to check is that you're not attempting to use a standard input/output unit number (5 or 6) for file input/output.  Doing so will cause a segmentation fault as well.

Jeff Armstrong
Approximatrix, LLC