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, 8, 9, 10
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 30, 2022 2:11 pm    Post subject: Reply with quote

simon

The SOURCE keyword (Fortran 2003) for the ALLOCATE statement has now been implemented (for arrays only) and will included in the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Mon Dec 05, 2022 9:47 am    Post subject: Reply with quote

All of the new 2003 and 2008 features that have been suggested on this thread have now been implemented (at least for the next release of FTN95) with the exception of ASSOCIATE.

Further suggestions are welcome so that the order of implementation can be prioritised, implementing first those features that our users would find most helpful.

Since this thread is now rather long, please start a new post for any further suggestions of this kind.

ASSOCIATE currently has a low priority. FTN95 users who understand and want to employ this feature should present a case for its early implementation.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Tue Dec 06, 2022 12:28 am    Post subject: Reply with quote

So soon this compiler will join this six-pack list to compile this widely used F2003 code of your neighbor university? Here is its Makefile:


Code:
# Specify a particular compiler with "make COMPILER=pgi", etc.
# Specify debugging flags with "make MODE=debug"
# If floating-point consistency is required then set the flag "CONS=1"
# Alternatively, these options can be specified as environment variables
# eg. "export COMPILER=gfortran" can be added to $HOME/.bashrc

# Compiler specific flags

# PGI
# ===
ifeq ($(strip $(COMPILER)),pgi)
  FFLAGS = -r8 -fast -fastsse -O3 -Mipa=fast,inline -Minfo # Optimised

# Intel
# =====
ifeq ($(strip $(COMPILER)),intel)
  FFLAGS = -O3 -g -stand f03

# gfortran
# ========
ifeq ($(strip $(COMPILER)),gfortran)
  FFLAGS = -O3 -g -std=f2003

# g95
# ========
ifeq ($(strip $(COMPILER)),g95)
  FFLAGS = -O3

# IBM Bluegene
# ============
ifeq ($(strip $(COMPILER)),ibm)
  FFLAGS = -O5 -qhot -qipa # Optimised
  # IBM compiler needs a -WF to recognise preprocessor directives
  D = -WF,-D
endif

# ARCHER (also works for HECToR)
# ========
ifeq ($(strip $(COMPILER)),archer)
  FFLAGS = -O3 -hipa2

# The following are a list of pre-processor defines which can be added to
# the above line modifying the code behaviour at compile time.

# Set every pseudoparticle in a species to represent the same number of
# real particles.
#DEFINES += $(D)PER_SPECIES_WEIGHT

# Use second order particle weighting (default is third order).
#DEFINES += $(D)PARTICLE_SHAPE_TOPHAT

# Use fifth order particle weighting (default is third order).
#DEFINES += $(D)PARTICLE_SHAPE_BSPLINE3


https://github.com/Warwick-Plasma/epoch

I think the best way to decide which new Standard's features to add is to compile broadly used modern codes. Only this will widen the pool of new customers because it will ensure that the compiler is future proof and hence it will be appealing to the younger generation.

By the way all these compilers despite support of the 2003-2008 features either not heard of any debuggers in Linux or use debuggers which are not far from punchcards era . You waste 10x more time with them making your code working. With this code I started my attempts to modify it to my needs in January and only now succeeded with gFortran.

Due to the same problem of absence of good debuggers on all other compilers and the fact that FTN95 was not compiling another large and pretty brain breaking code which has exactly this ASSOCIATE feature i failed so far to get through this another PIC code. It is even not clear if this F2003 feature was really necessary but it was among things which stopped the code to compile.

https://gitlab.com/MD-CWI-NL/afivo-pic

With the debugger like SDBG you would just get through the running code step by step and get everything in one day. Without debuggers in some cases you will be getting stuck like in an encrypted web. And learning new complex language features without debuggers is a pure hell.

It is obvious that ALL 15 and 20 years old Standard's features have to be implemented. What the point to implement only part of existing Standards ? Imagine some arbitrary compiler which only supports part of F2018 Standard, part of F2008 Standard, part of F2003, part of F1995, part of F1977, part of F1966 then it will essentially run just the Fortran4 codes gathering around only appropriate declining legacy codes public.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 553
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu Jan 05, 2023 12:42 pm    Post subject: Reply with quote

Paul, One to look at when you get the opportunity (a very minor issue).
Code:
complex z1
z1%re = 3.0 ; z1%im = 4.0
end

The Compiler says (Ver 8.95): "Warning 298 - Variable Z1 has been used without being given an initial value", which is not true in this case.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 05, 2023 1:53 pm    Post subject: Reply with quote

OK. Thanks.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1762

PostPosted: Thu Jan 05, 2023 4:24 pm    Post subject: Reply with quote

There is at least one more situation where a similar spurious warning is given -- parts of expressions wherein a variable name is required by the language rules but only the type of the variable matters. Here is an example:

Code:
program test

REAL    :: R4
Integer :: I4R

data I4R/Z'3F800000'/

print *,transfer(I4R,R4)

end program


The compiler warns that R4 is used without being given an initial value.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 05, 2023 5:34 pm    Post subject: Reply with quote

mecej4

I will make a note of this.
Back to top
View user's profile Send private message AIM Address
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, 8, 9, 10
Page 10 of 10

 
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