Skip to content

Commit 881cc26

Browse files
author
Alessandro Fanfarillo
committed
Adding stat constraint to allocate
1 parent c1190e8 commit 881cc26

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mpi/mpi_caf.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,13 @@ void *
700700
/* PREFIX(sync_all) (NULL,NULL,0); */
701701
}
702702

703+
if(error_called == 1)
704+
{
705+
communicator_shrink(&CAF_COMM_WORLD);
706+
error_called = 0;
707+
ierr = STAT_FAILED_IMAGE;
708+
}
709+
703710
caf_static_t *tmp = malloc (sizeof (caf_static_t));
704711
tmp->prev = caf_tot;
705712
tmp->token = *token;
@@ -715,6 +722,8 @@ void *
715722

716723
if (stat)
717724
*stat = 0;
725+
else if(ierr == STAT_FAILED_IMAGE)
726+
error_stop (ierr);
718727

719728
return mem;
720729

0 commit comments

Comments
 (0)