Cannot gm_provide_receive_buffer_with_tag
Arun Rodrigues <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
i seem to be having an odd spot of difficulty with gm-1.1.3:
running this program:
#include <gm.h>
#include <stdio.h>
#define ENVSIZE 256
int
main(){
struct gm_port *gm_p;
void *recvBuff;
/* initialize gm */
gm_init();
/* get port */
gm_open(&(gm_p), 0, 0, "foo", GM_API_VERSION_1_1);
/* allocate an envelope-sized buffer to recv*/
recvBuff = gm_dma_calloc(gm_p,
1,
ENVSIZE);
if (recvBuff != 0)
printf("dma malloced %p\n",recvBuff);
/* provide a recv buffer */
printf("%p posting recv buffers %p\n",
gm_p,gm_ntohp(recvBuff));
gm_provide_receive_buffer_with_tag((void*)gm_p,
gm_ntohp(recvBuff),
ENVSIZE,
GM_LOW_PRIORITY,
1);
gm_finalize();
return 0;
}
causes a segfault in the gm_provide_receive_buffer_with_tag() call.
gdb gives the following information on an alpha:
0x12000192c in gm_provide_receive_buffer_with_tag (p=0x1201096c0, ptr=0x0,
size=1, priority=1, tag=513) at include/gm_internal.h:124
124 *to32++ = *from32++;
Somwhere, it appears that the arguments are getting munged.
Also, when I run it on a Solaris box, I get the same error.
bcheck gives:
signal SEGV (no mapping at the fault address) in gm_copy_to_io_space at
line 124
in file "gm_internal.h"
124 *to32++ = *from32++;
I seem to be following the documentation, but I must be going astray
somewhere, any idea where?
many thanks,
arun
-----------------------------------
Arun Rodrigues *
http://www.nd.edu/~arodrig6 *
-----------------------------------