replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - F2003 and F2008 extensions
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 

F2003 and F2008 extensions

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri Jan 25, 2013 4:37 am    Post subject: F2003 and F2008 extensions Reply with quote

Paul,

Has a review of extensions to the standard by F2003 and F2008 been reviewed to provide some that are easy to implement ?

I know that command line options from 2003 are included.
What about [ and ] for vector syntax ?
Given the huge changes with 2008, I'm surprised they did not include ^ as an alternative to **.

It would be good to know if there are any other features that would be easy to include.
I'm definately not asking for any implementation of the big changes in 2008; just asking if any of the small ones might be made available.

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Jan 25, 2013 8:52 am    Post subject: Reply with quote

We have not recently reviewed extensions to the Standard and in the short term we will have to rely on recommendations from users who can appreciate what might be easy to implement.

I think that there is already some coding to parse square brackets so this ought to be fairly easy to implement.
Back to top
View user's profile Send private message AIM Address
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Jan 29, 2013 11:20 pm    Post subject: Re: F2003 and F2008 extensions Reply with quote

JohnCampbell wrote:

What about [ and ] for vector syntax ?


PaulLaidler wrote:

I think that there is already some coding to parse square brackets so this ought to be fairly easy to implement.


The [ ] feature is already implemented in FTN95, just use /F2K option. Very Happy
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Jan 30, 2013 9:55 am    Post subject: Reply with quote

Any example demonstrating the benefit of that?
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Mon Feb 04, 2013 1:07 pm    Post subject: Reply with quote

Dan,

See "Statement that does not compile" in the Support list, if you were asking for an example of the syntax.
[ is a bit easier than (/.

My original question was also trying to find out if there were other features of F2003 that were not too onerous to provide and perhaps some other users had considered them a benefit.

John
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Mon Feb 04, 2013 6:52 pm    Post subject: Reply with quote

Is there any new syntax which allows fast parallel wipe out (zeroising) of the matrix ? If matrix is large that operation done by usual way may take substantial time, but novel syntax potentially should take advantages of vector capabilities of processors.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Feb 05, 2013 8:34 am    Post subject: Reply with quote

I am guessing that this question is not about FTN95 which has no "vector capabilities". However, the /ZEROISE command line switch might possibly be of some relevance.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Tue Feb 05, 2013 11:30 am    Post subject: Reply with quote

Yes, that is good option for initial zeroizing, what of interest is where Standard and development are heading to as well as to know what was already done with other compilers in parallelization area. Right now I'm pondering how to avoid to zeroise matrices million times during one single run!
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Tue Feb 05, 2013 9:52 pm    Post subject: Reply with quote

Dan,

Why not just use array syntax and use:
matrix = 0
Leave it up to the compiler to generate the quickest fill code.
There is a FILL@ routine, but I've have not found the difference significant. Both ways appear to be quick for large arrays.

I wouldn't recommend trying to zero multiple arrays in one statement. The use of "variable = 0" for each array is a good coding discipline, documenting the initialisation.

John
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Feb 06, 2013 6:00 am    Post subject: Reply with quote

John,
matrix=0 works when you are not using parallel solvers. Typically on sequential machines matrix solution takes more time then preparing the matrix. But when you solve in parallel the matrix solver is improving its speed proportionally to the number of cores while zeroising and preparation of the matrix which is done sequentially becomes the bottleneck
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Wed Feb 06, 2013 6:31 am    Post subject: Reply with quote

Dan,

I am having some success with parallel calculation at the moment.
Could you replace the matrix = 0 with
Code:
!$OMP DO
  do i = 1,n
    do j = 1,m
      matrix(j,i) = 0
    end do
end do
!$OMP END DO

or possibly explicitly split code to allow parallel operation:
matrix(:,1:n1) = 0
matrix(:,n1:n2) = 0
matrix(:,n2:n) = 0
It will depend on what the compiler can recognise and non-conflicting.

The problem you will have is that = 0 is a very quick operation, and unless matrix is very large (say some gb), you might not get much improvement, due to thread initiation.
Then again, you might be searching for nanoseconds.

John
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Feb 06, 2013 6:45 pm    Post subject: Reply with quote

You definitely do that not with this compiler Sad

Or while i was in my fox hole FTN95 magically started to support OpenMP?
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 -> General All times are GMT + 1 Hour
Page 1 of 1

 
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