Re: Error reading NML messages using Java



If anyone happens to be considering the Java/C++ NML problem I
documented yesterday, I have an amendment you should read,
below.

Thanks,

Mark

On Nov 13 Mark Bearden wrote:
> 
> 
> Hi, I would appreciate any likely problems or debugging tips anyone
> can suggest with my problem, which I'll first state briefly, and then
> give more details.
> 
> PROBLEM IN BRIEF:
> 
> I have a Java program attempting to read from a queued SHMEM buffer for
> which the server is spawned by a master process that is a C++ program.
> Both machines are running on the same RedHat 7.3 Linux host.
> 
> If I set the "neutral" buffer flag to 1 (do neutral encoding), then I
> am getting this [abbreviated here, given in full below] error message
> written to stdout by the C++ program, for each buffer read that I
> attempt from within the Java program:
> 
>   + physmem.cc 391: PHYSMEM_HANDLE: Can't read 12 bytes at offset
>   + 1275068458 from buffer of size 4064.
>   + cms_in.cc 738: CMS:(consolectl) Error reading from global memory at
>   + cms_in.cc:739
> 
> It so happens that the Java read() calls *do* seem to return the message
> contents to the Java program.  However, the message is apparently not
> cleared from the buffer.  If I call read() N times, I get the message
> returned N times, even if I wrote it to the queued buffer only once.
> 
> On the other hand, if I set the "neutral" flag to 0 (don't encode),
> then I get a different error.   The C++ process does not issue any
> error messages, and the Java process reads an NMLmsg, but all the
> fields in that message are empty (that is, having value 0).
> 
> Any ideas?
> 

I found and fixed one bug, so that now the case with neutral=0 is
working.  I had a problem with my make that had allowed the format
function being compiled into the concolectl process (the C++ master
of the buffer) to be out of date.  Once I updated it, the messages
read by the Java program are correct, but *only if* I keep
neutral=0.  If neutral=1, I get the exact same error documented above.

I am able to get my system working, so this is now just a matter
of curiosity on my part.

Thanks again,

Mark

========================================================================
Mark Bearden                          Applied Systems Intelligence, Inc.
Systems Engineer                      11660 Alpharetta Hwy., Suite 720
Phone: 770.518.4228 x237              Roswell, GA 30076 

   Fax: 770.619.0066                   http://www.asinc.com
========================================================================






Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact