[J3] (SC22WG5.6293) RE: [ukfortran] WG5 letter ballot 1 on Fortran 2018 interpretations

Reid, John (-,RAL,SC) john.reid at stfc.ac.uk
Tue Oct 6 14:08:44 EDT 2020


Malcolm,

Here are my comments

(1)
The present code is wrong and I was going to suggest changing "-10" to "-9" but I far prefer Anton's suggestion:
    images_spare = 0
    if ( NUM_IMAGES() .GE. 10  ) images_spare = 1
    if ( NUM_IMAGES() .GE. 200 ) images_spare = NUM_IMAGES()/100
It is absolutely clear what this does, which I see as an example of good practice. It does not need a comment to explain what is going on. This can be changed to
    ! Choose how many images to keep as spares.

(2)
I agree with you.

(3)
Yes, we should test status. I think
    IF (status/=0 .AND. status/=STAT_FAILED_IMAGE) EXIT outer
would be OK in both cases.

Cheers,

John.
________________________________
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Reid, John (-,RAL,SC) via J3 <j3 at mailman.j3-fortran.org>
Sent: 06 October 2020 10:46
To: 'WG5 List' <sc22wg5 at open-std.org>; General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: Reid, John (-,RAL,SC) <john.reid at stfc.ac.uk>; Malcolm Cohen <malcolm at nag-j.co.jp>
Subject: [J3] (SC22WG5.6292) RE: [ukfortran] WG5 letter ballot 1 on Fortran 2018 interpretations

Malcolm,

I have been working on C.6.8 in response from comments by Nathan Weeks. I was planning to submit a paper to J3 in the hope that it would work on it during the J3 meeting. The latest draft is attached. I will now rewrite this as a WG5 interp. vote. Comments from you or anyone else will be most welcome.

I will comment on your suggestions later today.

Cheers

John.

________________________________
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Malcolm Cohen via J3 <j3 at mailman.j3-fortran.org>
Sent: 05 October 2020 06:13
To: 'WG5 List' <sc22wg5 at open-std.org>
Cc: Malcolm Cohen <malcolm at nag-j.co.jp>
Subject: [J3] (SC22WG5.6291) RE: [ukfortran] WG5 letter ballot 1 on Fortran 2018 interpretations

This is not my vote... I am considering:

-N- --- F18/015  Example in C.6.8 is wrong

I have three problems with this interp; the first two are the same issues Anton raised. Before I commit my suggestions to a vote, I am floating this in hope of receiving some enlightening comments...

(1)
I don't see a strong reason to follow the existing formula precisely - 0.5% is not terribly close to 1% so the 1% comment is a bit misleading anyway. So how about:

! With 10+ images, keep at least 1% spare.
images_spare = MERGE(0,CEILING(NUM_IMAGES()/100.0),NUM_IMAGES()<10)

Obviously this keeps more spare images than the original (the same number up to 100, +1 when >100).

(2)
I agree that a variable with the same name as an intrinsic is not good style.
"team_num" would be okay.
But I do not agree that the intrinsic should be used at line 88 - that should be the variable.

(3)
I find the use of STAT= followed by ignoring the result to be very poor style indeed - unacceptably poor. I note that other places have e.g.
    IF (STATUS/=0 .AND. STATUS/=STAT_FAILED_IMAGE) EXIT outer
I think this should be the case for the END TEAM and its following SYNC ALL statement.
Or, if there is some good reason why not, that needs to be at least briefly explained in a comment after each of those statements.

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



This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20201006/745aadd2/attachment-0001.htm>


More information about the J3 mailing list