forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fortran 2003 and 2008 features
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
simon



Joined: 05 Jul 2006
Posts: 225

PostPosted: Tue Jun 21, 2022 4:27 pm    Post subject: Reply with quote

Hi Paul,
Since j is a scalar, should not the compiler complain at line 7?
Simon
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7348
Location: Salford, UK

PostPosted: Tue Jun 21, 2022 5:51 pm    Post subject: Reply with quote

Simon

Yes. I may need to take a closer look at this.

Is it important? Can you get it to work?
Back to top
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 225

PostPosted: Tue Jun 21, 2022 5:58 pm    Post subject: Reply with quote

Hi Paul,
Not important. I have worked around this. In this case I'm simply working from the attitude that all bug reports may be potentially useful.
Thanks,
Simon
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7348
Location: Salford, UK

PostPosted: Fri Jul 08, 2022 8:39 am    Post subject: Reply with quote

FINDLOC has now been added to FTN95 and the associated DLLs but without the KIND and BACK arguments at the momnent.
Back to top
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 225

PostPosted: Fri Jul 08, 2022 1:47 pm    Post subject: Reply with quote

Excellent! Thank you.
On another 2008 topic, are there any plans for submodules? Again not urgent from my side. I would simply use them to break up some large files, so their absence is not a big issue.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7348
Location: Salford, UK

PostPosted: Fri Jul 08, 2022 3:29 pm    Post subject: Reply with quote

Simon

The subject of SUBMODULEs has been raised recently elsewhere on this forum and I did briefly look at its definition.

A SUBMODULE is not a simple extension of the concept of a MODULE. Also a MODULE is already extremely complex from point of view of the compiler. You can have modules within modules and at each level components can be private to the module. Then there is the complexity of USE ONLY.

So my initial impression is that to add SUBMODULEs would involve a very large investment of time.
Back to top
View user's profile Send private message AIM Address
simon



Joined: 05 Jul 2006
Posts: 225

PostPosted: Fri Jul 08, 2022 9:47 pm    Post subject: Reply with quote

Understood. I can certainly manage without submodules high on the priority list fo rnow.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2565
Location: South Pole, Antarctica

PostPosted: Sun Jul 10, 2022 3:06 pm    Post subject: Reply with quote

Paul,
When playing with Warwick University 3D PIC code written in Fortran 2003 i found that it is so incredibly fast that actually works even on a single core and runs in less than 1 minute many test examples. It also probably will run on a cell phone or even calculator if it has good amount of memory. With other PIC codes i sometimes run for a month on a supercomputer Smile)

At the same time it is so advanced in using all these new Fortran features and also is written so pedantically (sometimes you feel that this is not a Fortran but some kind of perversion, a crazy puzzle, a dialect of Maya language. It took me 3 months to crack this nut, and i still not fully understand few things) that if you need to check compatibility of your added 2003-2008 features to FTN95 then i suggest using this code as a bench. You can just omit MPI parallelization, which can be added later.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2565
Location: South Pole, Antarctica

PostPosted: Mon Jul 11, 2022 1:32 am    Post subject: Reply with quote

P.S. Use tar.gz not zip archive version from their GitHub, zipped one misses stuff (as they mentioned themselves. Not sure why they do that as if there are problems with the download file sizes nowadays. May be also zip hiccups somewhere). Also observing 50 times faster compilation speed (i compile it for 6 minutes on Linux supercomputer) will make you happy every day Smile
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7348
Location: Salford, UK

PostPosted: Mon Jul 11, 2022 6:45 am    Post subject: Reply with quote

Dan

What does it use from Fortran 2003 that is not available with FTN95?
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2565
Location: South Pole, Antarctica

PostPosted: Wed Jul 13, 2022 8:13 pm    Post subject: Reply with quote

If FTN95 worked on Linux and supported its Make utility for compilation answering this question would take 5 seconds. So far i have not succeeded to compile this large Fortran 2003 code with FTN95 on Windows...
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 412
Location: Manchester

PostPosted: Thu Jul 14, 2022 11:39 am    Post subject: Reply with quote

Surely there are other 'makes' around.
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2565
Location: South Pole, Antarctica

PostPosted: Thu Jul 14, 2022 2:16 pm    Post subject: Reply with quote

I tried few times but never succeeded to adopt Make to use with FTN95. It is probably possible and doable but not a piece of cake. No one also was able to help me here when i asked questions about using Make. There also are differences between Linux and Windows Make utilities besides the fact that their languages substantially differ from command prompt commands we typically somewhat familiar with. And if Make for FTN95 is also a bit different from other compilers - you will not touch Make with FTN95!

As a result i usually failed with Make and end up with file by file batch compilation. When there are few files it's ok, but when there are 100s interdependable files with their modules using other modules you end up with the hell. While all other Fortran compilers have zero worries about that.

I'd be glad to see FTN95 joined all other a half a dozen (essentially all currently available on the market) Fortran compilers to use Make they seems all use with no problems, you just change one single keyword in Makefile file like Intel to PGI or to gfortran or to g95 or IBM or even the ones i never heard about Archer or Hector and all just works. No any hell with module dependencies, and when you edit only one source file - only one file is recompiled.

Since we are approaching broad adoption of multiprocessor calculations by masses, adding OpenMP support, synchronize FTN95 with other compilers in most of their options (including Make, ensuring better compatibility of binary read/write file formats, may be also improving compatibility of LIB files with at least Intel Fortran) and ideally supporting also Linux, would be beneficial for FTN95. Windows and Unix were completely abandoned by supercomputers lately, there only Linux rules now.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7348
Location: Salford, UK

PostPosted: Sat Jul 30, 2022 2:27 pm    Post subject: Reply with quote

Simon

The character handling features that you mention above have now been added for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2565
Location: South Pole, Antarctica

PostPosted: Sat Aug 06, 2022 7:17 am    Post subject: Reply with quote

Paul,
Have anyone asked to add Fortran 2008 feature NORM2 ? It's kind of unusual that it is not even in the Fortran90/95, because it is useful function and would be not hard to implement.

Besides, this code demonstrating NORM2 and some other tricks surprisingly runs on other compilers (look at the syntax of defining X)
Code:
PROGRAM test_sum
  REAL :: x(5) = [ real :: 1, 2, 3, 4, 5 ]
  print *, NORM2(x)  ! = sqrt(1**2 + 2**2 + 3**2 + 4**2 + 5.**2) = sqrt(55.) ~ 7.416
END PROGRAM


I saw already two large Fortran codes where authors started actively adopt F2003 and F2008 features. Here is another one which FTN95 can not compile https://gitlab.com/MD-CWI-NL/afivo-pic
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group