[J3] FORM TEAM statement NEW_INDEX= specifier & failed images

Malcolm Cohen malcolm at nag-j.co.jp
Wed May 8 21:07:00 EDT 2019


<<< 

I’m not convinced that Jon’s example is unreasonable.

>>> 

 

It’s definitively Not Standard Conforming!

 

<<< 

We currently allow the value of an image index to be larger than the number of active images in a team.

>>> 

 

We currently allow the user to drink hot coffee too, which is about as relevant.

 

Seriously, he suggested the image index being larger than NUM_IMAGES().  That is a horse of a completely different colour.  I assert that this is rather likely to lead to disastrous outcomes, like accessing data of non-existent images (but image number less than num_images!), or syncing with such, etc.  It’s not that unlikely that the runtime system itself has tables sized by the number of images, which could lead to sync all not syncing with the images whose numbers are out of range, using random garbage instead of network addresses, or indeed seg faulting.

 

<<< 

Otherwise, we are basically requiring that the user go through an exercise to track down which images are failed

>>> 

 

If only we had an intrinsic that returned the failed image numbers…

 

<<< 

before executing FORM TEAM and then communicating these boundary image index numbers at runtime

>>> 

 

Indeed, the user had better do this if he cares about his data, as the failed images Have Already Lost His Data!  Carefully forming a boundary image setup without knowing what data is available is a complete waste of time. (He might not even *have* any boundary data left, or all the images that would have belonged in “team 3”, which might be a critical team for his algorithm to work, might have failed.)

 

If he doesn’t care about the data why bother running the program at all.

 

Or if your concern is how he is going to recover without “going non-standard”, we would need to add that capability. There are two obvious possibilities: (1) NEW_INDEX is simply inoperative when an image has failed; (2) invalid NEW_INDEX is allowed, at least when images have failed, but doesn’t form a team.  There are many details to be worked out, but we could certainly do something about it.  STAT_INVALID_NEW_INDEX would be one possibility, but something more lightweight could also work.

 

In principle I support “doing something”, as long as we can all agree on what the something is, as otherwise there is a race condition anyway in between checking for failed images and executing FORM TEAM with NEW_INDEX.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20190509/cbb1d103/attachment.html>


More information about the J3 mailing list