1
1

* Make Portals BTL compile again (looks like the frag ownership stuff didn't

get copied well)
* Clean up a bunch of warnings

This commit was SVN r17562.
Этот коммит содержится в:
Brian Barrett 2008-02-23 01:45:36 +00:00
родитель 437e280829
Коммит bc8d863ce3
6 изменённых файлов: 66 добавлений и 48 удалений

Просмотреть файл

@ -22,6 +22,7 @@
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <inttypes.h>
#include "ompi/constants.h"
#include "opal/util/output.h"
@ -90,8 +91,8 @@ mca_btl_portals_add_procs(struct mca_btl_base_module_t* btl_base,
assert(&mca_btl_portals_module == (mca_btl_portals_module_t*) btl_base);
opal_output_verbose(50, mca_btl_portals_component.portals_output,
"Adding %d procs (%d)", nprocs,
mca_btl_portals_module.portals_num_procs);
"Adding %d procs (%d)", (int) nprocs,
(int) mca_btl_portals_module.portals_num_procs);
/* if we havne't already, get our network handle */
if (mca_btl_portals_module.portals_ni_h == PTL_INVALID_HANDLE) {
@ -129,7 +130,7 @@ mca_btl_portals_add_procs(struct mca_btl_base_module_t* btl_base,
&distance);
if (ret != PTL_OK) {
opal_output_verbose(10, mca_btl_portals_component.portals_output,
"Could not find distance to process %d", i);
"Could not find distance to process %d", (int) i);
continue;
}
}
@ -191,8 +192,8 @@ mca_btl_portals_del_procs(struct mca_btl_base_module_t *btl_base,
assert(&mca_btl_portals_module == (mca_btl_portals_module_t*) btl_base);
opal_output_verbose(50, mca_btl_portals_component.portals_output,
"Removing %d procs (%d)", nprocs,
mca_btl_portals_module.portals_num_procs);
"Removing %d procs (%d)", (int) nprocs,
(int) mca_btl_portals_module.portals_num_procs);
for (i = 0 ; i < nprocs ; ++i) {
free(peers[i]);
@ -361,8 +362,10 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl_base,
/* either a put or get. figure out which later */
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"rdma src posted for frag 0x%x, callback 0x%x, bits %lld",
frag, frag->base.des_cbfunc, frag->segments[0].seg_key.key64));
"rdma src posted for frag 0x%lx, callback 0x%lx, bits %" PRIu64,
(unsigned long) frag,
(unsigned long) frag->base.des_cbfunc,
frag->segments[0].seg_key.key64));
/* create a match entry */
ret = PtlMEAttach(mca_btl_portals_module.portals_ni_h,
@ -454,8 +457,10 @@ mca_btl_portals_prepare_dst(struct mca_btl_base_module_t* btl_base,
frag->base.des_flags = flags;
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"rdma dest posted for frag 0x%x, callback 0x%x, bits %lld",
frag, frag->base.des_cbfunc, frag->segments[0].seg_key.key64));
"rdma dest posted for frag 0x%lx, callback 0x%lx, bits %" PRIu64,
(unsigned long) frag,
(unsigned long) frag->base.des_cbfunc,
frag->segments[0].seg_key.key64));
/* create a match entry */
ret = PtlMEAttach(mca_btl_portals_module.portals_ni_h,

Просмотреть файл

@ -327,24 +327,24 @@ mca_btl_portals_component_progress(void)
case PTL_EVENT_GET_START:
/* generated on source (target) when a get from memory starts */
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_GET_START for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_GET_START for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
break;
case PTL_EVENT_GET_END:
/* generated on source (target) when a get from memory ends */
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_GET_END for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_GET_END for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
break;
case PTL_EVENT_PUT_START:
/* generated on destination (target) when a put into memory starts */
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_PUT_START for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_PUT_START for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
#if OMPI_ENABLE_DEBUG
if (ev.ni_fail_type != PTL_NI_OK) {
@ -364,8 +364,8 @@ mca_btl_portals_component_progress(void)
case PTL_EVENT_PUT_END:
/* generated on destination (target) when a put into memory ends */
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_PUT_END for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_PUT_END for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
#if OMPI_ENABLE_DEBUG
if (ev.ni_fail_type != PTL_NI_OK) {
@ -388,17 +388,19 @@ mca_btl_portals_component_progress(void)
frag->segments[0].seg_len = ev.mlength;
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"received send fragment %x (thresh: %d, length %d)",
frag, ev.md.threshold, (int) ev.mlength));
"received send fragment 0x%lx (thresh: %d, length %d)",
(unsigned long) frag,
ev.md.threshold, (int) ev.mlength));
if (ev.md.length - (ev.offset + ev.mlength) < ev.md.max_size ||
if (ev.md.length - (ev.offset + ev.mlength) < (ptl_size_t) ev.md.max_size ||
ev.md.threshold == 1) {
/* the block is full. It's deactivated automagically, but we
can't start it up again until everyone is done with it.
The actual reactivation and all that will happen after the
free completes the last operation... */
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"marking block 0x%x as full", block->start));
"marking block 0x%lx as full",
(unsigned long) block->start));
block->full = true;
}
@ -416,8 +418,8 @@ mca_btl_portals_component_progress(void)
returning data */
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_REPLY_START for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_REPLY_START for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
break;
@ -426,7 +428,8 @@ mca_btl_portals_component_progress(void)
done returning data */
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PTL_EVENT_REPLY_END for 0x%x", frag));
"PTL_EVENT_REPLY_END for 0x%lx",
(unsigned long) frag));
/* let the PML know we're done */
frag->base.des_cbfunc(&mca_btl_portals_module.super,
@ -434,7 +437,8 @@ mca_btl_portals_component_progress(void)
&frag->base,
OMPI_SUCCESS);
if( btl_ownership ) {
mca_btl_portals_free(btl, &frag->base);
mca_btl_portals_free(&mca_btl_portals_module.super,
&frag->base);
}
break;
@ -444,8 +448,8 @@ mca_btl_portals_component_progress(void)
#if OMPI_ENABLE_DEBUG
OPAL_OUTPUT_VERBOSE((900, mca_btl_portals_component.portals_output,
"PTL_EVENT_SEND_START for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_SEND_START for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
if (ev.ni_fail_type != PTL_NI_OK) {
opal_output(mca_btl_portals_component.portals_output,
@ -455,7 +459,8 @@ mca_btl_portals_component_progress(void)
&frag->base,
OMPI_ERROR);
if( btl_ownership ) {
mca_btl_portals_free(btl, &frag->base);
mca_btl_portals_free(&mca_btl_portals_module.super,
&frag->base);
}
}
#endif
@ -465,8 +470,8 @@ mca_btl_portals_component_progress(void)
/* generated on source (origin) when put stops sending */
#if OMPI_ENABLE_DEBUG
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PTL_EVENT_SEND_END for 0x%x, %d",
frag, (int) ev.hdr_data));
"PTL_EVENT_SEND_END for 0x%lx, %d",
(unsigned long) frag, (int) ev.hdr_data));
if (ev.ni_fail_type != PTL_NI_OK) {
opal_output(mca_btl_portals_component.portals_output,
@ -476,7 +481,8 @@ mca_btl_portals_component_progress(void)
&frag->base,
OMPI_ERROR);
if( btl_ownership ) {
mca_btl_portals_free(btl, &frag->base);
mca_btl_portals_free(&mca_btl_portals_module.super,
&frag->base);
}
}
#endif
@ -490,7 +496,8 @@ mca_btl_portals_component_progress(void)
Requeue the put on badness */
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PTL_EVENT_ACK for 0x%x", frag));
"PTL_EVENT_ACK for 0x%lx",
(unsigned long) frag));
#if OMPI_ENABLE_DEBUG
if (ev.ni_fail_type != PTL_NI_OK) {
@ -501,7 +508,8 @@ mca_btl_portals_component_progress(void)
&frag->base,
OMPI_ERROR);
if( btl_ownership ) {
mca_btl_portals_free(btl, &frag->base);
mca_btl_portals_free(&mca_btl_portals_module.super,
&frag->base);
}
} else
#endif
@ -528,12 +536,11 @@ mca_btl_portals_component_progress(void)
&frag->base,
OMPI_SUCCESS);
if( btl_ownership ) {
mca_btl_portals_free(btl, &frag->base);
mca_btl_portals_free(&mca_btl_portals_module.super,
&frag->base);
}
}
opal_output_verbose(50, mca_btl_portals_component.portals_output, "fuck");
if (0 != frag->size) {
OPAL_THREAD_ADD32(&mca_btl_portals_module.portals_outstanding_ops,
-1);

Просмотреть файл

@ -67,10 +67,10 @@ OBJ_CLASS_DECLARATION(mca_btl_portals_frag_recv_t);
\
ompi_free_list_item_t *item; \
OMPI_FREE_LIST_GET(&((mca_btl_portals_module_t*)btl_macro)->portals_frag_eager, item, rc); \
if (rc == OMPI_ERR_TEMP_OUT_OF_RESOURCE) { \
OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(btl_macro, item, rc); \
} \
frag = (mca_btl_portals_frag_t*) item; \
if (rc == OMPI_ERR_TEMP_OUT_OF_RESOURCE) { \
OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(btl_macro, frag, rc); \
} \
}

Просмотреть файл

@ -19,6 +19,8 @@
#include "ompi_config.h"
#include <inttypes.h>
#include "ompi/constants.h"
#include "opal/util/output.h"
@ -34,7 +36,8 @@ mca_btl_portals_put(struct mca_btl_base_module_t* btl_base,
int ret;
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PtlPut (rdma) fragment %x, bits %lld", frag,
"PtlPut (rdma) fragment %lx, bits %" PRIx64,
(unsigned long) frag,
frag->base.des_dst[0].seg_key.key64));
assert(&mca_btl_portals_module == (mca_btl_portals_module_t*) btl_base);
@ -73,7 +76,8 @@ mca_btl_portals_get(struct mca_btl_base_module_t* btl_base,
int ret;
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PtlGet (rdma) fragment %x, bits %lld", frag,
"PtlGet (rdma) fragment %lx, bits %" PRIx64,
(unsigned long) frag,
frag->base.des_src[0].seg_key.key64));
assert(&mca_btl_portals_module == (mca_btl_portals_module_t*) btl_base);

Просмотреть файл

@ -43,14 +43,15 @@ mca_btl_portals_send(struct mca_btl_base_module_t* btl_base,
frag->hdr.tag = tag;
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"PtlPut (send) fragment %x", frag));
"PtlPut (send) fragment %lx",
(unsigned long) frag));
if (OPAL_THREAD_ADD32(&mca_btl_portals_module.portals_outstanding_ops, 1) >
mca_btl_portals_module.portals_max_outstanding_ops) {
/* no space - queue and continute */
opal_output_verbose(50, mca_btl_portals_component.portals_output,
"no space for message 0x%x. Adding to back of queue",
frag);
"no space for message 0x%lx. Adding to back of queue",
(unsigned long) frag);
OPAL_THREAD_ADD32(&mca_btl_portals_module.portals_outstanding_ops, -1);
opal_list_append(&(mca_btl_portals_module.portals_queued_sends),
(opal_list_item_t*) frag);
@ -79,9 +80,9 @@ mca_btl_portals_send(struct mca_btl_base_module_t* btl_base,
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output,
"fragment info:\n"
"\tstart: 0x%x\n"
"\tstart: 0x%lx\n"
"\tlen: %d",
frag->segments[0].seg_addr.pval,
(unsigned long) frag->segments[0].seg_addr.pval,
frag->segments[0].seg_len));
ret = PtlPutRegion(frag->md_h, /* memory descriptor */

Просмотреть файл

@ -29,8 +29,9 @@
mca_btl_portals_frag_t *qfrag = (mca_btl_portals_frag_t*) \
opal_list_remove_first(&(mca_btl_portals_module.portals_queued_sends)); \
OPAL_OUTPUT_VERBOSE((90, mca_btl_portals_component.portals_output, \
"retransmit for frag 0x%x, 0x%x", \
qfrag, qfrag->base.des_cbfunc)); \
"retransmit for frag 0x%lx, 0x%lx", \
(unsigned long) qfrag, \
(unsigned long) qfrag->base.des_cbfunc)); \
return mca_btl_portals_send(&mca_btl_portals_module.super, \
qfrag->endpoint, \
&(qfrag->base), \