Re: [Myrinet] (No Subject)

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

TOUCHE Julien wrote:
> with your help, i solve the problem with gm_dma_alloc(), but there is 
> always a problem of "incompatibles types assignement" with 
> gm_register_memory()

In the code:
 > *buffer = gm_register_memory(port,
 > 		 
	buffer,
 > 		 
	(unsigned int)(size_mem*sizeof(char))
 > 		 
	);		// DMA transfer register

gm_register_memory return a type gm_status_t. The right code should be :

*buffer = gm_malloc(size_mem*sizeof(char));
if (gm_register_memory (port, *buffer, (unsigned int)
       (size_mem * sizeof(char) != GM_SUCCESS)
{
   /* something bad happen */
}


> when i use
  __GM_DMA__ (see end), it compiles but i have the following
> error:
> "gm_open: send dropped as requested by the client"

There is many errors in the code. For example:
* in allocate_gm_buffer, a piece of memory should be allocated before to 
register it.
* in allocate_gm_buffer, in the call to gm_register_memory, "buffer" 
should be "*buffer";
* in unallocate_gm_buffer, all the "buffer" should be "*buffer";
* The value of remote_address is uninitialized.
* Why do you gm_provide_receive_buffer on "remote_address" before to do 
a gm_directed_send to the same (uninitialized) address on the other node 
? gm_directed_send is like a PUT, you only need to register or dma_alloc 
  on the receiver side the memory you want to write to, and the sender 
only call gm_directed_send with the virtual address of the *buffer on 
the receiving side*.
* you didn't understand the notion of Sizes in GM. I don't blame you, 
it's one of the very bad parts of the API, it took me months to (almost) 
understand what it is. It's like a tag with a relationship with the 
length of the message, insane. Anyway, think about it like a tag with a 
value between 8 and 31. The relationship with the length has been 
relaxed a long time ago actually.

> i have also a mpi test which doesn't execute correctly, i don't know 
> why ? i send a message to another nodes, and it returns but not 
> modified ...

I looked at it very quickly and the buffer "message" is size_mem 
characters, but the MPI operations send/recv size_mem integers (MPI_INT).

>   	message = (char *) calloc(size_mem,sizeof(char));
[...]
> 		  MPI_Send(message, size_mem , MPI_INT, next, TAG, MPI_COMM_WORLD );

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.