Re: [Myrinet] (No Subject)
"TOUCHE Julien" <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Organization | Lycos Mail (http://www.mail.lycos.com:80) |
| Message-ID | <[email protected]> |
On Sat, 08 Jun 2002 22:14:48
Patrick Geoffray wrote:
>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 */
>}
>
so register don't allocate anything, but why use gm_malloc instead
of gm_dma_malloc ? or can i use both of us ?
>
>> 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";
i've just move the code, and make these 2 functions and i forgotten
to modify this code. sorry ...
>* The value of remote_address is uninitialized.
what do you mean by uninitialized. i could put a NULL at var creation,
but remote_address is to get the distant memory address so it's the
receive which must initialized it.
>* 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*.
to receive the message from gm_directed_send(), which function must
i use ? gm_receive as for gm_send ?
>* 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.
not much clear ;)
for a char[size], which length ?
size*sizeof(char)
for a int[size] <-> size*sizeof(int) or size ?
>
>> 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 );
>
for a char[size], the type is what (MPI_CHAR) ?
i don't find much docs on MPI except the one with MPICH but it's not a real guide to programming MPI.
For gm, the myrinet doc is good and the example helps but is not
sufficient (i don't understand all)(not a real guide programming
too ;)
but thanks to mailing list, it comes :)
>Patrick
>
---
Thanks
bye
Julien Touche
_______________________________________________________
WIN a first class trip to Hawaii. Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes