Re: Problem on SGI

what optimization level are you compiling with? if its high, try it at a lower or normal setting.

Matthew Bettencourt wrote:

I am seeing a problem on an SGI O3K machine with netcdf under C++, I have a multithreaded program writting to many different netCDF files and intermittently this causes a netCDF error of "File exists" at many different places. Sometimes on a put_rec and sometimes on a sync, never on a file create. Here is part of the traceback

19 __exit(0x3, 0x4, 0xffff, 0x0, 0x0, 0x1018b9e8, 0x1200f948, 0x42142f0) ["/xlv55/patches/5194/work/irix/lib/libc/libc_n32_M4/gen/cuexit.c":60, 0xfb05a9c] 20 nc_advise(0x15, 0x11, 0x10124b20, 0x1a, 0x0, 0x1018b9e8, 0x1200f948, 0x42142f0) ["/Work/mattchl/debug/netcdf-3.5.1-beta11/src/libsrc/v2i.c":130, 0x100e04d8] 21 ncsync(0x15, 0x4, 0xffff, 0x0, 0x0, 0x1018b9e8, 0x1200f948, 0x42142f0) ["/Work/mattchl/debug/netcdf-3.5.1-beta11/src/libsrc/v2i.c":257, 0x100e08bc] 22 NcFile::sync(void)(0x105d1df0, 0x4, 0xffff, 0x0, 0x0, 0x1018b9e8, 0x1200f948, 0x42142f0) ["/Work/mattchl/debug/netcdf-3.5.1-beta11/src/cxx/netcdf.cpp":225, 0x100ceba8] 23 DataStorage::storeList(void)(this = 0x10164064) ["/Work/mattchl/debug/MCELSystem/MCEL/DataStorage.cc":90, 0x100aa27c]


Now, if I look at the file datastruct I see
(dbx) p *(NcFile*)0x105d1df0
class NcFile {
    the_id = 26
    in_define_mode = 0
    the_fill_mode = Fill__6NcFile=0
    dimensions = 0x10c654d8
    variables = 0x10571b40
    globalv = 0x10c4c7d8
}

Here is the odd thing. If you look at the traceback you will see that the NcFIle::sync call is called with a the_id = 26. However, once we go into the call ncsync(the_id) the id is 21 (ncsync(0x15,..)
    if (ncsync(the_id) == ncBad)


Has anyone seen this before?? Any help would be great, I am thinking this is a bug with the SGI compiler but I am not sure. I have put locks around all my netcdf calls so I am only calling one routine at a time so I don't think it is a thread safty issue.

If anyone has seen this please help point me in the right direction.....
Thanks
Matt




  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: