Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comex/ofi: max_bytes_in_atomic may not fit in int #58

Merged
merged 1 commit into from
May 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions comex/src-ofi/comex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ static int iov_acc(int datatype, void * scale,

acc_data_t* acc_data = 0;

int max_bytes_in_atomic = ofi_data.max_bytes_in_atomic[COMEX_DTYPE_IDX(datatype)];
ssize_t max_bytes_in_atomic = ofi_data.max_bytes_in_atomic[COMEX_DTYPE_IDX(datatype)];
EXPR_CHKANDJUMP(max_bytes_in_atomic > 0, "datatype is not supported: %d", datatype);

/* calculate common count of iov elements & common length of data to send */
Expand Down Expand Up @@ -1929,7 +1929,7 @@ static int iov_acc(int datatype, void * scale,
{
for (iov_column = 0; iov_column < iov[iov_idx].count; iov_column++)
{
int bytes_to_send = iov[iov_idx].bytes;
ssize_t bytes_to_send = iov[iov_idx].bytes;
for (; bytes_to_send > 0;
bytes_to_send -= max_bytes_in_atomic)
{
Expand Down Expand Up @@ -2039,7 +2039,7 @@ static int iov_acc(int datatype, void * scale,
"failed to lookup window");
assert(wnd);

int bytes_to_send = iov[iov_idx].bytes;
ssize_t bytes_to_send = iov[iov_idx].bytes;
char* src = sbuf ? sbuf : iov[iov_idx].src[iov_column];
char* dst = iov[iov_idx].dst[iov_column];

Expand Down
2 changes: 1 addition & 1 deletion comex/src-ofi/ofi.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef struct ofi_data_t
ofi_ep_t ep_atomics;
int msg_prefix_size;
int rma_iov_limit;
int max_bytes_in_atomic[COMEX_DTYPES_COUNT]; /* bytes in one atomic operation per comex datatype */
ssize_t max_bytes_in_atomic[COMEX_DTYPES_COUNT]; /* bytes in one atomic operation per comex datatype */
int max_buffered_send;
} ofi_data_t;
extern ofi_data_t ofi_data;
Expand Down