Skip to content

Commit f38320a

Browse files
aingersonj-xiong
authored andcommitted
prov/psm3: check atomic op error code
Report atomic op errors back to the application. Some datatype/op combinations were falsely being reported to the application but failing when the atomic was being performed. These failures were silently treated as successful because the errors were not passed back. Check the error code to catch future issues Signed-off-by: Alexia Ingerson <[email protected]>
1 parent 4caa966 commit f38320a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

prov/psm3/src/psmx3_atomic.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@ int psmx3_am_atomic_handler(psm2_am_token_t token,
601601

602602
if (!op_error) {
603603
addr += mr->offset;
604-
psmx3_atomic_do_write(addr, src, datatype, op, count);
604+
op_error = psmx3_atomic_do_write(addr, src, datatype,
605+
op, count);
605606

606607
if (rx->ep->caps & FI_RMA_EVENT) {
607608
cntr = rx->ep->remote_write_cntr;
@@ -646,8 +647,8 @@ int psmx3_am_atomic_handler(psm2_am_token_t token,
646647
addr += mr->offset;
647648
tmp_buf = malloc(len);
648649
if (tmp_buf)
649-
psmx3_atomic_do_readwrite(addr, src, tmp_buf,
650-
datatype, op, count);
650+
op_error = psmx3_atomic_do_readwrite(addr, src,
651+
tmp_buf, datatype, op, count);
651652
else
652653
op_error = -FI_ENOMEM;
653654

@@ -698,9 +699,10 @@ int psmx3_am_atomic_handler(psm2_am_token_t token,
698699
addr += mr->offset;
699700
tmp_buf = malloc(len);
700701
if (tmp_buf)
701-
psmx3_atomic_do_compwrite(addr, src, (uint8_t *)src + len,
702-
tmp_buf, datatype,
703-
op, count);
702+
op_error = psmx3_atomic_do_compwrite(addr, src,
703+
(uint8_t *)src + len,
704+
tmp_buf, datatype,
705+
op, count);
704706
else
705707
op_error = -FI_ENOMEM;
706708

0 commit comments

Comments
 (0)