[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20010103: netcdf 3.5b3 parallel library T3E version patch
- Subject: Re: 20010103: netcdf 3.5b3 parallel library T3E version patch
- Date: Fri, 05 Jan 2001 10:01:57 -0700
>To: address@hidden
>cc: Harsh Anand <address@hidden>,
>cc: "R.K. Owen" <address@hidden>
>From: Harsh Anand <address@hidden>
>Subject: netcdf 3.5b3 parallel library T3E version patch
>Organization: LBNL/NERSC
>Keywords: 200101032237.f03MbPo14060
Hi Harsh,
> We have a fix for a bug in the netcdf 3.5b3 parallel
> library T3E version (support work done at NERSC).
> It occurs when nc_enddef/nf_endef() or nc_open/nf_open()
> is called. This bug resulted in corruption of some data values.
> Patch for netcdf-3.5b3/src/libsrc is appended below.
Could you please try the appended patch instead and let me know if it
works OK? The original patch you provided would not compile on other
systems.
Thanks.
--Russ
Index: nc.c
===================================================================
RCS file: /upc/share/CVS/netcdf-3/libsrc/nc.c,v
retrieving revision 2.117
diff -c -r2.117 nc.c
*** nc.c 1999/08/24 17:16:28 2.117
--- nc.c 2001/01/05 16:58:17
***************
*** 84,90 ****
--- 84,94 ----
free_NC_dimarrayV(&ncp->dims);
free_NC_attrarrayV(&ncp->attrs);
free_NC_vararrayV(&ncp->vars);
+ #if _CRAYMPP && defined(LOCKNUMREC)
+ shfree(ncp);
+ #else
free(ncp);
+ #endif /* _CRAYMPP && LOCKNUMREC */
}
***************
*** 93,99 ****
--- 97,107 ----
{
NC *ncp;
+ #if _CRAYMPP && defined(LOCKNUMREC)
+ ncp = (NC *) shmalloc(sizeof(NC));
+ #else
ncp = (NC *) malloc(sizeof(NC));
+ #endif /* _CRAYMPP && LOCKNUMREC */
if(ncp == NULL)
return NULL;
(void) memset(ncp, 0, sizeof(NC));
***************
*** 112,118 ****
--- 120,130 ----
{
NC *ncp;
+ #if _CRAYMPP && defined(LOCKNUMREC)
+ ncp = (NC *) shmalloc(sizeof(NC));
+ #else
ncp = (NC *) malloc(sizeof(NC));
+ #endif /* _CRAYMPP && LOCKNUMREC */
if(ncp == NULL)
return NULL;
(void) memset(ncp, 0, sizeof(NC));