how to open a very large netcdf file using pgf90

Eric DeWeaver deweaver at AOS.WISC.EDU
Wed Feb 22 12:26:22 EST 2006


Hi Wuhu,

You can get large file support (lfs) in pgf90 using the -Mlfs
flag (I think "large" is anything over about 2.1Gb).  That might
solve the problem.  Then again, lfs may be the default in the
most recent version of pgf90.

You may have to rebuild the netcdf libraries so that they have
lfs support.  It's not that hard to build netcdf, but it can
be a little time consuming.  Portland group has some advice
on their webpage:

http://www.pgroup.com/resources/netcdf/netcdf351_pgi5x_64.htm

This is specifically for 64-bit machines, but the instructions
are pretty generic.

Best Wishes,

Eric




On Wed, 22 Feb 2006, Wuhu Feng wrote:

> Dear Gradsusers,
>
> I guess someone maybe help me to solve the following problem I met
> recently.
>
> Recently I am doing some simulations using an American mesoscale
> model. It will be no problem to check the output using ncdump
> command (attached). However, I encountered some problem to read the file
> possible because it is too large(4 972 763 028 bytes) when I tried to
> use a
> Fortran program. It shows "758198573: heap block overflow; -heapz too
> large Segmentation fault (core dumped)"
>
> Here I use pgf90 (PGI4.0-Portland compilers v 4.0), netcdf-3.60 in Linux.
>
> My PC is
> "Linux portsdown 2.4.26-1-686-smp #1 SMP Mon Apr 19 14:12:30 CEST 2004
> i686 unknown"
>
> Below is how I compile and execute the program. Any suggestion will be
> much appreciated.
>
> Best regards,
>
> Wuhu
>
> portsdown:~> pgf90 read_wrf_nc.f
> -L/nfs/env-fs-04_u22/fengwh/netcdf-3.60pl/lib -lnetcdf
> -lm -I/nfs/env-fs-04_u22/fengwh/netcdf-3.60pl/include -Mfree -o
> read_wrf_nc
>
> portsdown:~> ./read_wrf_nc /nfs/env-fs-05_arc02/fengwh/WRFV2/run/wrfout_d01_2005-11-01_00:00:00
> " INPUT FILE IS:
>  /nfs/env-fs-05_arc02/fengwh/WRFV2/run/wrfout_d01_2005-11-01_00:00:00
>
>
>  GLOBAL ATTRIBUTES:
>
> TITLE                                    :  OUTPUT FROM WRF V2.1.1 MODEL
> START_DATE                               : 2005-11-01_00:00:00
> SIMULATION_START_DATE                    : 2005-11-01_00:00:00
> WEST-EAST_GRID_DIMENSION                 :    91
> SOUTH-NORTH_GRID_DIMENSION               :   121
> BOTTOM-TOP_GRID_DIMENSION                :    31
> 758198573: heap block overflow; -heapz too large
> Segmentation fault (core dumped)"
>
>



More information about the gradsusr mailing list