http://www.lsoft.com/images/listserv-community.gifhttp://www.lsoft.com/images/listserv_small.gifCOMP-FORTRAN-90 ListCOMP-FORTRAN-90 List Archiveshttps://www.jiscmail.ac.uk/cgi-bin/webadmin?RSS&L=COMP-FORTRAN-90&v=ATOM1.0

This is an Atom formatted XML site feed. It is intended to be viewed in a Newsreader.
Alternatively you can view the HTML archives at https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=COMP-FORTRAN-90.

LISTSERV Web Interface 2.4.12018-02-22T23:06:35ZVipul Parekh2018-02-22T18:06:30-05:002018-02-22T18:06:30-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;81d63331.1802On Thu, Feb 22, 2018 at 5:10 PM, John Harper <harper@msor.vuw.ac.nz> wrote:<br>> In what circumstances would IMPLICIT NONE in a block instead of its host<br>> (sub)program be a good idea?<br>><br><br>When the host cannot be modified for any number of reasons, usually<br>non-technical involving legacy code that makes heavy use of IMPLICIT<br>typing. The BLOCK construct is great, it allows one to introduce some<br>set of instructions into such a host to achieve some end, an immediate<br>use case I came across was some help I was extending to a friend debug<br>some issues with decades-old code.John Harper2018-02-23T11:10:23+13:002018-02-23T11:10:23+13:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;7b4d0473.1802In what circumstances would IMPLICIT NONE in a block instead of its host<br>(sub)program be a good idea?<br><br>On Thu, 22 Feb 2018, Vipul Parekh wrote:<br><br>> Date: Thu, 22 Feb 2018 01:00:24 -0500<br>> From: Vipul Parekh <parekhvs@GMAIL.COM><br>> Reply-To: Fortran 90 List <COMP-FORTRAN-90@JISCMAIL.AC.UK><br>> To: COMP-FORTRAN-90@JISCMAIL.AC.UK<br>> Subject: Re: Starting with Fortran 2018,<br>> is IMPLICIT statement permitted in a BLOCK construct?<br>><br>> Thank you very much for sharing your understanding on the BLOCK<br>> construct, appreciate it greatly.<br>><br>> My curiosity about IMPLICIT and NAMELIST statements in a BLOCK<br>> construct are based on practical [...] Vipul Parekh2018-02-22T14:40:41-05:002018-02-22T14:40:41-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;9350fdec.1802Thanks much, Tom, for your input.<br><br>I think there is a bit of misunderstanding: as I mentioned earlier,<br>I'm curious about the situation where the host scope of a BLOCK indeed<br>has IMPLICIT typing but where a code does NOT want that in the BLOCK,<br>hopes to explicitly declare all the entities relevant to the BLOCK,<br>and seeks IMPLICIT NONE within the BLOCK to help the process. [...]Clune, Thomas L. (GSFC-6101)2018-02-22T12:59:05+00:002018-02-22T12:59:05+00:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;ee864d97.1802Hi Vipul,<br><br>Just in case this is a simple matter of misunderstanding … If you have IMPLICIT NONE in the outer scope, then you effectively have it in the inner scope. You simply are not able to alter that.<br><br>If instead you are hoping for a mechanism that _ignores_ any declared variables in the outer scope, then you would presumably want to use IMPORT mechanism. [...]Vipul Parekh2018-02-22T01:00:24-05:002018-02-22T01:00:24-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;1af448fc.1802Thank you very much for sharing your understanding on the BLOCK<br>construct, appreciate it greatly.<br><br>My curiosity about IMPLICIT and NAMELIST statements in a BLOCK<br>construct are based on practical considerations and I'm looking at<br>this somewhat differently. I don't want to be bothered by an<br>"inclusive scope" particularly when it has IMPLICIT typing. I simply<br>want the "blade guard" of IMPLICIT NONE in the BLOCK scope then. Why<br>can this not be possible other than the current standard simply<br>stating it should not be? In fact there is an implementation out<br>there which conforms to constraint C806 except for [...]Vipul Parekh2018-02-21T23:49:53-05:002018-02-21T23:49:53-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;f3a05a59.1802It's very encouraging to see the interest in capturing a more detailed<br>record of discussions, particularly Steve's plans and support for this<br>as the next convenor. Such effort will benefit users. I personally<br>will find it very useful, especially if it can inform and educate me,<br>even in a read-only mode, on the whats, whys, why nots around the<br>points and items that get considered during the development of a<br>facility e.g., BLOCK construct in Fortran 2008.. And if such saved<br>development threads can help WG5 and J3 committees in any way, say<br>restart some enhancement more quickly in the [...]Malcolm Cohen2018-02-22T11:54:25+09:002018-02-22T11:54:25+09:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;fa9f7bcf.1802If you’re not advocating it, why suggest it on a public form?<br><br>A lot of people might object to being recorded… and there are often laws about recording people without consent…<br><br>Cheers,<br><br>--<br><br>..............Malcolm Cohen, NAG Oxford/Tokyo.Clune, Thomas L. (GSFC-6101)2018-02-22T02:40:29+00:002018-02-22T02:40:29+00:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;c5cf4574.1802Note - I’m not advocating this, but … thought it might be useful to mention some technology changes that may impact the decision.<br><br>There are now tools such as LiveScribe (https://store.livescribe.com), that record conversation and use special paper to synchronize with the notes. I had some fun a few years back playing with early models, and I assume they have just gotten better. With such a tool, the “scribe” would only need to take a very rough outline which would then help others search for relevant discussions. [...]Malcolm Cohen2018-02-22T10:28:05+09:002018-02-22T10:28:05+09:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;538ddc1a.1802Van Snyder wrote:<br>> There was a time when at least some X3J3 discussions were scribed.<br><br>There was a time when there were more people on the committee than could<br>talk in a discussion. We don't have "spare people" any more.<br><br>And subgroup discussions have never been scribed to my knowledge.<br><br>> I don't know whether this was ever done for WG5. [...] Van Snyder2018-02-21T16:25:42-08:002018-02-21T16:25:42-08:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;85e0da2.1802On Wed, 2018-02-21 at 19:17 -0500, Steve Lionel wrote:<br>> On 2/21/2018 7:07 PM, Malcolm Cohen wrote:<br>> > BTW most discussion takes place at meetings. Sometimes there are papers before or after such discussions which mention rationale, but not always. And the rationale for one person is not necessarily the rationale for another (for example, someone might consider COMMON and NAMELIST to be old-fashioned and undesirable in principle, so prefers not to extend them further). So my stated rationale above is merely my opinion as to what the most important factors in the decisions were - it's common to [...] Steve Lionel2018-02-21T19:17:12-05:002018-02-21T19:17:12-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;569477c3.1802On 2/21/2018 7:07 PM, Malcolm Cohen wrote:<br>> BTW most discussion takes place at meetings. Sometimes there are papers before or after such discussions which mention rationale, but not always. And the rationale for one person is not necessarily the rationale for another (for example, someone might consider COMMON and NAMELIST to be old-fashioned and undesirable in principle, so prefers not to extend them further). So my stated rationale above is merely my opinion as to what the most important factors in the decisions were - it's common to have multiple factors affecting a decision, and someone else might well [...]Malcolm Cohen2018-02-22T09:07:53+09:002018-02-22T09:07:53+09:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;1725735e.1802Nothing gets implicitly typed in a BLOCK construct, they always get typed in the "inclusive scope". You can think of that as being the scope ignoring the existence of BLOCK; basically, the innermost subprogram containing it.<br><br>That is so that adding a BLOCK-ENDBLOCK in the middle of a subprogram, perhaps in an IF construct, to add an explicitly typed variable local to the BLOCK, does not change the scope of any pre-existing variable. Otherwise BLOCK would be so extremely error-prone as to be unusable without IMPLICIT NONE. [...]Dan Nagle2018-02-21T09:16:30-07:002018-02-21T09:16:30-07:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;42b39a5c.1802Hi,<br><br>> On Feb 21, 2018, at 08:03 , Vipul Parekh <parekhvs@GMAIL.COM> wrote:<br>><br>> is there any discussion thread anyone knows of re: any<br>> prior J3 (or other) communication threads, notes, presos, etc.leading<br>> toward the introduction of BLOCK construct in Fortran 2008 that can<br>> explain why IMPLICIT and NAMELIST are impossible in a BLOCK construct? [...] Vipul Parekh2018-02-21T10:03:16-05:002018-02-21T10:03:16-05:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;bc3ff53a.1802Thanks, I didn't notice the subtle difference is the wording of syntax<br>rules where N2146 elaborates on the block-specification-part with<br>R1109 and R1107 has:<br><br>R1107 block-construct is block-stmt<br>[ block-specification-part ]<br>block<br>end-block-stmt<br><br>compared to 10-007r1 which states<br><br>R807 block-construct is block-stmt<br>[ specification-part ]<br>block<br>end-block-stmt<br><br>Separately, is there any discussion thread anyone knows of re: any<br>prior J3 (or other) communication threads, notes, presos, etc.leading<br>toward the introduction of BLOCK construct in Fortran 2008 that can<br>explain why IMPLICIT and NAMELIST are impossible in a BLOCK construct? [...]Malcolm Cohen2018-02-21T13:49:38+09:002018-02-21T13:49:38+09:00Re: Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;e787f08e.1802The syntax for a BLOCK construct does not contain <implicit-stmt>, so it's already impossible. Constraints are only against things that would otherwise be permitted by the syntax rules.<br><br>Cheers,<br>--<br>..............Malcolm Cohen, NAG Oxford/Tokyo.<br><br>-----Original Message-----<br>From: Fortran 90 List [mailto:COMP-FORTRAN-90@JISCMAIL.AC.UK] On Behalf Of Vipul Parekh<br>Sent: Wednesday, February 21, 2018 1:40 PM<br>To: COMP-FORTRAN-90@JISCMAIL.AC.UK<br>Subject: [COMP-FORTRAN-90] Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? [...]Vipul Parekh2018-02-20T23:39:37-05:002018-02-20T23:39:37-05:00Starting with Fortran 2018, is IMPLICIT statement permitted in a BLOCK construct? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;1daf6a26.1802Document N2146 toward Fortran 2018 DIS has in section 11.1.4 BLOCK<br>construct a constraint:<br><br>C1107 (R1107) A block-specification-part shall not contain a COMMON,<br>EQUIVALENCE, INTENT, NAMELIST, OPTIONAL, statement function, or VALUE<br>statement.<br><br>whereas 10-007r1 toward Fortran 2008 has in the corresponding section 8.1.4:<br><br>C806 (R807) The specification-part of a BLOCK construct shall not<br>contain a COMMON, EQUIVALENCE, IMPLICIT, INTENT, NAMELIST, OPTIONAL,<br>statement function, or VALUE statement. [...]Carlson, Neil2018-02-05T14:32:32+00:002018-02-05T14:32:32+00:00Re: Elemental procedure pointer component? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;702740ac.1802Thanks for the detailed response Malcolm! I need to carefully<br><br>study it further, but I'm sure I'll find the understanding I was<br><br>looking for there.<br><br>-Neil Malcolm Cohen2018-02-05T09:13:53+09:002018-02-05T09:13:53+09:00Re: Elemental procedure pointer component? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;d0eaa717.1802One piece of wording would be “An elemental procedure is an elemental intrinsic procedure or a procedure that is defined by an elemental subprogram.”<br><br>Obviously, a procedure pointer is neither of those, therefore it cannot be elemental.<br><br>Outside of a type definition, it is clear that you cannot say<br><br>PROCEDURE(iface),POINTER :: fp<br><br>because that violates C1218: "If a proc-interface describes an elemental procedure, [...]Malcolm Cohen2018-02-05T08:38:46+09:002018-02-05T08:38:46+09:00Re: Elemental procedure pointer component? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;650814a7.1802Hi Neil,<br><br>“cos” is not the intrinsic elemental. It is the specific cos not the generic cos (the generic one is elemental, the one that you can pass as an actual argument or use as the target of a procedure pointer assignment is not elemental!)<br><br>Those “specific intrinsic” names always come back to bite us… [...]Neil Carlson2018-02-04T00:22:12-07:002018-02-04T00:22:12-07:00Re: Elemental procedure pointer component? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;9b39c310.1802I forgot to add that NAG has no issues with this (cos is the intrinsic<br>elemental):<br><br>type :: foo<br>procedure(cos), nopass, pointer :: f<br>end type<br><br>This further confused me.Neil Carlson2018-02-03T23:36:43-07:002018-02-03T23:36:43-07:00Elemental procedure pointer component? https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;d2783359.1802Consider this example<br><br>type :: foo<br>procedure(iface), nopass, pointer :: f<br>end type<br><br>abstract interface<br>elemental real function iface(arg)<br>real, intent(in) :: arg<br>end function<br>end interface<br><br>Here F is a procedure pointer component that is elemental. The NAG compiler<br>says this is not allowed. I'm really struggling to understand why this is<br>so. This<br>constraint is not explicitly stated in the F08 standard anywhere that I can<br>find.<br>However I am finding bits and pieces that, when put together, do seem to<br>imply this constraint, But I'm not quite there yet and am looking for help<br>(Malcolm? :-) [...]Anton Shterenlikht2018-01-19T09:40:16+00:002018-01-19T09:40:16+00:00Re: 2 abstract interfaces and IMPORT https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;bccc3420.1801Bill<br><br>>An interface body is a host.<br><br>Right.<br>I thought that an interface *block* is a host.<br><br>Thank you for the clarification<br><br>Anton Bill Long2018-01-18T23:12:25+00:002018-01-18T23:12:25+00:00Re: 2 abstract interfaces and IMPORT https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;7d9c1575.1801> On Jan 18, 2018, at 11:15 AM, Anton Shterenlikht <as@CMPLX.UK> wrote:<br>><br>> Is this module conformant?<br>><br>> module m<br>><br>> abstract interface<br>> integer pure function kernel_proto( space, coord )<br>> integer, intent( in ), allocatable :: space(:,:,:)<br>> integer, intent(in) :: coord(3)<br>> end function kernel_proto<br>><br>> subroutine iter_proto( space, fun )<br>> ! import :: kernel_proto<br>> integer, intent(in), allocatable :: space(:,:,:)<br>> procedure( kernel_proto ) :: fun<br>> end subroutine iter_proto<br>> end interface<br>><br>> end module m<br>><br>> 2 compilers accept it<br>> 2 compilers reject, complaining<br>> that [...]Anton Shterenlikht2018-01-18T17:15:01+00:002018-01-18T17:15:01+00:002 abstract interfaces and IMPORT https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;e906b68c.1801Is this module conformant?<br><br>module m<br><br>abstract interface<br>integer pure function kernel_proto( space, coord )<br>integer, intent( in ), allocatable :: space(:,:,:)<br>integer, intent(in) :: coord(3)<br>end function kernel_proto<br><br>subroutine iter_proto( space, fun )<br>! import :: kernel_proto<br>integer, intent(in), allocatable :: space(:,:,:)<br>procedure( kernel_proto ) :: fun<br>end subroutine iter_proto<br>end interface<br><br>end module m<br><br>2 compilers accept it<br>2 compilers reject, complaining<br>that interface kernel_proto is not defined. [...] Anton Shterenlikht2018-01-05T15:15:31+00:002018-01-05T15:15:31+00:00NWP with OO Fortran https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;9b25de51.1801They call it "Modern Fortran":<br><br>https://ams.confex.com/ams/98Annual/webprogram/Paper330888.html<br><br>Anton Anton Shterenlikht2018-01-05T11:22:51+00:002018-01-05T11:22:51+00:00Re: f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;6e84b7f0.1801Bill<br><br>>Very interesting set of tests. In the Discussion section you mention that some of these functions might be implemented by calling the system libm routines. (And hence matching output of similar tests written in C.) To the extent that is the case, the results are indicative of the OS (SUSE, RedHat, …) that supplied the libm library, rather than the compiler used. For example, if you ran the tests for Cray and PGI on the same system, then for the libm cases you would expect the same outcome. Of course, it is useful information that the libm routines are [...]Bill Long2018-01-04T22:43:26+00:002018-01-04T22:43:26+00:00Re: f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;4b724cbb.1801Very interesting set of tests. In the Discussion section you mention that some of these functions might be implemented by calling the system libm routines. (And hence matching output of similar tests written in C.) To the extent that is the case, the results are indicative of the OS (SUSE, RedHat, …) that supplied the libm library, rather than the compiler used. For example, if you ran the tests for Cray and PGI on the same system, then for the libm cases you would expect the same outcome. Of course, it is useful information that the libm routines are wrong, [...]arrl2018-01-03T17:17:29-05:002018-01-03T17:17:29-05:00Re: f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;68445f70.1801On 1/3/2018 3:58 PM, Anton Shterenlikht wrote:<br>> Tim<br>><br>>> Definitely of interest. I didn't see a statement about whether the<br>>> results were affected by violating the documented requirements of<br>>> certain compilers on command line options for USE IEEE_ARITHMETIC.<br>>><br>>> --<br>>> Tim Prince<br>><br>> Have I violated the documented requirements?<br>> I'd be grateful for any details.<br>><br>> Thanks<br>><br>> Anton<br>><br>Intel says that ifort requires the option -fp-model precise for full<br>support of IEEE_ARITHMETIC. That option would be unpopular for<br>performance. Which IEEE_ARITHMETIC features will work with the option<br>you [...]Anton Shterenlikht2018-01-03T20:58:31+00:002018-01-03T20:58:31+00:00Re: f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;f1f60797.1801Tim<br><br>>Definitely of interest. I didn't see a statement about whether the<br>>results were affected by violating the documented requirements of<br>>certain compilers on command line options for USE IEEE_ARITHMETIC.<br>><br>>--<br>>Tim Prince<br><br>Have I violated the documented requirements?<br>I'd be grateful for any details.<br><br>Thanks<br><br>Anton arrl2018-01-03T06:36:34-05:002018-01-03T06:36:34-05:00Re: f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;52717382.1801On 1/3/2018 6:04 AM, Anton Shterenlikht wrote:<br>> Might be of interest to some.<br>><br>> https://arxiv.org/abs/1712.10230<br>><br>> On quality of implementation of Fortran 2008 complex intrinsic functions on branch cuts<br>> Anton Shterenlikht<br>> (Submitted on 29 Dec 2017)<br>><br>> Branch cuts in complex functions in combination with signed zero<br>> and signed infinity have important uses in fracture mechanics,<br>> jet flow and aerofoil analysis. We present benchmarks for validating<br>> Fortran 2008 complex functions - LOG, SQRT, ASIN, ACOS, ATAN,<br>> ASINH, ACOSH and ATANH - on branch cuts with arguments<br>> of all 3 [...]Anton Shterenlikht2018-01-03T11:04:15+00:002018-01-03T11:04:15+00:00f2008 complex intrinsics on branch cuts - quality of implementation https://www.jiscmail.ac.uk:443/cgi-bin/webadmin?A2=COMP-FORTRAN-90;2c8b8a6a.1801Might be of interest to some.<br><br>https://arxiv.org/abs/1712.10230<br><br>On quality of implementation of Fortran 2008 complex intrinsic functions on branch cuts<br>Anton Shterenlikht<br>(Submitted on 29 Dec 2017)<br><br>Branch cuts in complex functions in combination with signed zero<br>and signed infinity have important uses in fracture mechanics,<br>jet flow and aerofoil analysis. We present benchmarks for validating<br>Fortran 2008 complex functions - LOG, SQRT, ASIN, ACOS, ATAN,<br>ASINH, ACOSH and ATANH - on branch cuts with arguments<br>of all 3 IEEE floating point binary formats:<br>binary32, binary64 and binary128. Results are reported with<br>8 Fortran 2008 compilers: GCC, Flang, Cray, Oracle, [...]