After I made the suggested change, the compiler gave a warning:<br><br>-----<br>nc.c: In function 'ncmpii_NC_enddef':<br>nc.c:916: warning: overflow in implicit constant conversion<br>-----<br><br>Yes, the change fixed the bug. Thanks for the quick fix! <br>
<br clear="all">Best regards,<br>Lie-Quan<br>
<br><br><div class="gmail_quote">On Sat, Dec 5, 2009 at 10:14 AM, Wei-keng Liao <span dir="ltr"><<a href="mailto:wkliao@ece.northwestern.edu">wkliao@ece.northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, Lie-Quan,<br>
<br>
Thanks for reporting this bug. Here is a quick fix.<br>
Please replace the following in file parallel-netcdf-1.1.0/src/lib/nc.c<br>
<br>
old nc.c:<br>
line 916 alignment = 1;<br>
new nc.c:<br>
line 916 alignment = NC_ALIGN_CHUNK;<br>
<br>
Please let us know if that solves your problem.<br>
<br>
Wei-keng<div><div></div><div class="h5"><br>
<br>
On Dec 5, 2009, at 2:14 AM, Lie-Quan Lee wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Oops, I guess that I may not understand how to run test_double.<br>
<br>
Anyhow, the redef problem is true. Attached is the testing program to show the probelm. Please help. Thanks.<br>
<br>
Best regards,<br>
Lie-Quan<br>
<br>
<br>
On Fri, Dec 4, 2009 at 10:30 PM, Lie-Quan Lee <<a href="mailto:liequan@gmail.com" target="_blank">liequan@gmail.com</a>> wrote:<br>
Dear Parallel-netcdf Developers,<br>
<br>
I really would like to use version 1.1.0 for its CDF-5 format in our simulation. However, there are some issues (unrelated to CDF-5) in the release 1.1.0. For example, the test_write program under test/test_double failed to generated the right data file (as in test/data/<a href="http://test_double.nc" target="_blank">test_double.nc</a>). Here is the ncdump of the resuting data file:<br>
<br>
netcdf t {<br>
dimensions:<br>
x = 100 ;<br>
y = 100 ;<br>
z = 100 ;<br>
time = UNLIMITED ; // (100 currently)<br>
variables:<br>
double square(x, y) ;<br>
square:description = "2-D integer array" ;<br>
double cube(x, y, z) ;<br>
double time(time) ;<br>
double xytime(time, x, y) ;<br>
<br>
// global attributes:<br>
:title = "example netCDF dataset" ;<br>
data:<br>
<br>
square =<br>
0, nan, 2, nan, 4, nan, 6, nan, 8, nan, 10, nan, 12, nan, 14, nan, 16, nan,<br>
18, nan, 20, nan, 22, nan, 24, nan, 26, nan, 28, nan, 30, nan, 32, nan,<br>
34, nan, 36, nan, 38, nan, 40, nan, 42, nan, 44, nan, 46, nan, 48, nan,<br>
50, nan, 52, nan, 54, nan, 56, nan, 58, nan, 60, nan, 62, nan, 64, nan,<br>
66, nan, 68, nan, 70, nan, 72, nan, 74, nan, 76, nan, 78, nan, 80, nan,<br>
82, nan, 84, nan, 86, nan, 88, nan, 90, nan, 92, nan, 94, nan, 96, nan,<br>
98, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,<br>
200, nan, 202, nan, 204, nan, 206, nan, 208, nan, 210, nan, 212, nan, 214,<br>
<br>
,,,<br>
<br>
The testing environment is:<br>
OS: Linux x64 (RHEL4)<br>
Compiler: gcc 4.2.2<br>
MPI: mpich2 1.0.7<br>
<br>
Also, in my application, open an existing netcdf and add a new variable (2-d) messed up the existing data somehow. The same code works when parallel-netcdf release 1.0.3 or early is used.<br>
<br>
--<br>
Best regards,<br>
<br>
Lie-Quan Lee<br>
SLAC National Accelerator Laboratory<br>
<br></div></div>
<test.cpp><br>
</blockquote>
<br>
</blockquote></div><br>