Silverfrost Forums

Welcome to our forums

F2003 and F2008 extensions

25 Jan 2013 3:37 #11479

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

25 Jan 2013 7:52 #11481

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.

29 Jan 2013 10:20 #11498

Quoted from JohnCampbell

What about [ and ] for vector syntax ?

for vector syntax ?

[quote:c2f4cb6168="PaulLaidler"] 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. 😄

30 Jan 2013 8:55 #11501

Any example demonstrating the benefit of that?

4 Feb 2013 12:07 #11511

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

4 Feb 2013 5:52 #11513

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.

5 Feb 2013 7:34 #11515

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.

5 Feb 2013 10:30 #11516

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!

5 Feb 2013 8:52 #11519

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

6 Feb 2013 5:00 #11523

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

6 Feb 2013 5:31 #11524

Dan,

I am having some success with parallel calculation at the moment. Could you replace the matrix = 0 with

!$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

6 Feb 2013 5:45 #11530

You definitely do that not with this compiler 😦

Or while i was in my fox hole FTN95 magically started to support OpenMP?

Please login to reply.