Re: Fwd: [Myricom help #8335] [Q] two questions...

Patrick Geoffray <[email protected]>
Newsgroups gmane.network.myrinet.general
Organization Myricom Inc
Message-ID <[email protected]>
Hi,

> I spent lots of time to find where my bug lives and finally arrived here.
> A pointer operation used in my MCP shows very strange result. To simplfy
> my question, I list some parts of my code below.
> 
> int gap;
> mem_info_t mem_table[MAX];
> mem_info_t *mem_ptr;
> 
> mem_ptr = &mem_table[index];
> gap = mem_ptr-&mem_table[0];                    // (a)
> gap = gap / 16;                                 // (b)
> 
> After line (a) is executed, the variable 'gap' shows 17. But after
> line (b) is executed the variable 'gap' shows 4 (not 1).    ;-)
> By shifting 'gap' 4 bits instead of dividing by 16, (gap = gap >> 4), I can
> continue to work(fortunately the divisor is in the power of 2.).
> I'm using lanai-gcc version 2.95.2..1.4. In fact I don't think the lanai-gcc
> has a bug, but I can not understatnd this result. If my word is discourteous
> I apologize to Myricom team.

There is no division support in the Lanai instruction set. Everything 
should be bits shifting. I should admit that I have never tried to 
compile a such division. Glenn would know more about that.

> 2. loopback packet is not received.
> I expect that a packet sent from node A to itself is received to
> verify that a switch is still alive. I filled up all the bytes in the
> routing header with 0x80 and set SA to 7. (I'm using 8 bytes routing
> header in my MCP.) But no packet is received. I have no problem for
> communication among different nodes. A packet sent from node A is received
> by node B. (node A should not be the same node as node B.) But a loopback
> packet is not received. How can I solve this problem?

Why do you use 8 bytes for the route if you send a loopback packet, 
ie crossing only one crossbar ?!? Each crossbar "eats" one routing 
byte in the routing header. If you put 8 routing bytes, you are expecting 
to cross 8 crossbars (a very long loopback :-) ).

Refer to the specs (Annexe B of VITA) at
http://www.myri.com/open-specs/index.html

Patrick

----------------------------------------------------------
|   Patrick Geoffray, Ph.D.      [email protected] 
|   Myricom, Inc.                http://www.myri.com
|   Cell:  865-389-8852          685 Emory Valley Rd (B)
|   Phone: 865-425-0978          Oak Ridge, TN 37830
----------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.