diff --git a/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.c b/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.c index 72004917cd..d024d37ab8 100644 --- a/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.c +++ b/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.c @@ -31,7 +31,7 @@ int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size) sb.sb_fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600); if(-1 == sb.sb_fd) { - opal_output(1, "pml_v: vprotocol_pessimist: sender_based_init: open (%s): %s", + opal_output(0, "pml_v: vprotocol_pessimist: sender_based_init: open (%s): %s", path, strerror(errno)); return -1; } @@ -44,19 +44,19 @@ void vprotocol_pessimist_sender_based_finalize(void) if(sb.sb_comm != MPI_COMM_NULL) { -/* TODO: cleanup that works... +/* TODO: check this has already been freed by MPI_Finalize * ret = ompi_comm_free(&sb.sb_comm); * if(MPI_SUCCESS != ret) - * opal_output(1, "pml_v: protocol_pessimist: sender_based_finalize: ompi_comm_free failed (%d)", ret); + * opal_output(0, "pml_v: protocol_pessimist: sender_based_finalize: ompi_comm_free failed (%d)", ret); */ ret = munmap(sb.sb_addr, sb.sb_length); if(-1 == ret) - opal_output(1, "pml_v: protocol_pessimsit: sender_based_finalize: munmap (%p): %s", + opal_output(0, "pml_v: protocol_pessimsit: sender_based_finalize: munmap (%p): %s", sb.sb_addr, strerror(errno)); } ret = close(sb.sb_fd); if(-1 == ret) - opal_output(1, "pml_v: protocol_pessimist: sender_based_finalize: close (%d): %s", + opal_output(0, "pml_v: protocol_pessimist: sender_based_finalize: close (%d): %s", sb.sb_fd, strerror(errno)); } @@ -73,12 +73,12 @@ void vprotocol_pessimist_sender_based_alloc(size_t len) /* Take care of alignement of sb_offset */ sb.sb_offset += (intptr_t) sb.sb_cursor - (intptr_t) sb.sb_addr; - sb.sb_cursor = (char *) (sb.sb_offset % sb.sb_pagesize); /* pos in window */ - sb.sb_offset -= (off_t) sb.sb_cursor; /* position of window */ + sb.sb_cursor = (char *) ((intptr_t) (sb.sb_offset % sb.sb_pagesize)); + sb.sb_offset -= (intptr_t) sb.sb_cursor; /* Adjusting sb_length for the largest application message to fit */ if(sb.sb_length < len) - sb.sb_length = len + (off_t) sb.sb_cursor; + sb.sb_length = len + (size_t) sb.sb_cursor; if(-1 == lseek(sb.sb_fd, sb.sb_offset + sb.sb_length, SEEK_SET)) { diff --git a/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.h b/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.h index a9d94640b9..8ee1b5acc7 100644 --- a/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.h +++ b/ompi/mca/pml/v/protocol_pessimist/vprotocol_pessimist_sender_based.h @@ -39,7 +39,7 @@ typedef struct vprotocol_pessimist_sender_based_header_t int dst; int tag; uint32_t contextid; - uint64_t sequence; + vprotocol_pessimist_clock_t sequence; } vprotocol_pessimist_sender_based_header_t; int vprotocol_pessimist_sender_based_init(const char *mmapfile, size_t size); @@ -98,7 +98,7 @@ void vprotocol_pessimist_sender_based_alloc(size_t len); mca_vprotocol_pessimist.sender_based.sb_cursor += sbhdr->size; \ mca_vprotocol_pessimist.sender_based.sb_vacant -= (sbhdr->size + \ sizeof(vprotocol_pessimist_sender_based_header_t)); \ - V_OUTPUT_VERBOSE(70, "pessimist:\tsb\twrite\t%x\tsize %ld", VPESSIMIST_REQ(&req->req_base)->reqid, sbhdr->size); \ + V_OUTPUT_VERBOSE(70, "pessimist:\tsb\twrite\t%"PRIpclock"\tsize %ld", VPESSIMIST_REQ(&req->req_base)->reqid, sbhdr->size); \ } while(0) /** Copy data associated to a pml_base_send_request_t to the sender based