Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Fortran and C++ Developers

Rodrigues__Pedro
Beginner
468 Views

 

   Hello   

I am writing these lines today because I am very disappointed with C++ programmers. Recently I had to deeply study CFD to develop a code with a nice GUI with 2D and 3D graph capabilities as required to CFD analysis. But to do that I had to check around all the toolkit of numerical packages available to help me in the solution of the corresponding Navier Stokes equations. I found some good toolkits such has PETSc Trilinos and also OpenFoam. All of them are written in standard 'c' and also C++. That was quit a surprise for me because some years ago there was a lot numerical libraries in both FORTRAN and 'C' and also 'C++'. I contacted all of them to check if there was an implementation of interfaces to be used with FORTRAN. PETSc is highly portable since they built FORTRAN interfaces. Trilinos also have some interfaces, but OpenFoam doesn't. But, all of them discouraged me to write code in FORTRAN. They all called FORTRAN an obtuse language and advised me to upgrade to C++. Why does FORTRAN is so badly viewed by 'C' and 'C++' developers? Why this language is called old and named as language of 1950? They almost convinced me to migrate to C++ and abandon FORTRAN definitely.

0 Kudos
2 Replies
rase
New Contributor I
468 Views

One problem seems to be that C/C++ programming skills are required by software companies lead by managers who themselves have never developed software for numerical problems. CS students learn the language(s) required in most job descriptions. The bad image of Fortran stems also from the fact that the managers did not realize that there are newer Fortran standards than Fortran 66 or Fortran 77 they may have learned in the early stages of their career. Even Fortran 90 is outdated in the meantime. Word-of-mouth is much more powerful than factual knowledge. Don't bother me with facts when I have made up my mind, that's a usual human behavior also valid for programming languages.

0 Kudos
FortranFan
Honored Contributor II
468 Views

P R. wrote:

I am writing these lines today because I am very disappointed with C++ programmers. Recently I had to deeply study CFD to develop a code with a nice GUI with 2D and 3D graph capabilities as required to CFD analysis. But to do that I had to check around all the toolkit of numerical packages available to help me in the solution of the corresponding Navier Stokes equations. I found some good toolkits such has PETSc Trilinos and also OpenFoam. All of them are written in standard 'c' and also C++. That was quit a surprise for me because some years ago there was a lot numerical libraries in both FORTRAN and 'C' and also 'C++'. I contacted all of them to check if there was an implementation of interfaces to be used with FORTRAN. PETSc is highly portable since they built FORTRAN interfaces. Trilinos also have some interfaces, but OpenFoam doesn't. But, all of them discouraged me to write code in FORTRAN. They all called FORTRAN an obtuse language and advised me to upgrade to C++. Why does FORTRAN is so badly viewed by 'C' and 'C++' developers? Why this language is called old and named as language of 1950? They almost convinced me to migrate to C++ and abandon FORTRAN definitely.

P.R.,

I strongly suggest you forward thlis link, https://software.intel.com/en-us/forums/topic/509099, to EACH and EVERYONE of the people you talked for your CFD work.  Highlight the point made by the authors of the study reported therein where they state, "C++11/Blitz++, Python/NumPy and Fortran 2008 provide comparable functionalities in terms of matching the blackboard abstractions within the program code. Taking into account solely the part of code representing particular formulæ (e.g. listings C.21, P.17, F.20 and equation 4) all three languages allow to match (or surpass) LATEX in its brevity of formula translation syntax. All three languages were shown to be capable of providing mechanisms to compactly represent such abstractions as: • loop-free array arithmetics; • definitions of functions returning array-valued expressions; • permutations of array indices allowing dimensionindependent definitions of unctions (see e.g. listings C.12 and C.13, P.10 and P.11, F.11 and F.12); • fractional indexing of arrays corresponding to employment of a staggered grid.”

These points clearly show the opinion held by C++ folks you talked to that Fortran is obtuse and outdated is clearly false; if anything, "modern Fortran" makes code infinitely less obtuse than C++.

And finally point out the performance reports in the study which shows Fortran code is still often the most efficient in execution.

And please report back on this forum if you follow-up as I suggest and you hear back any comments or get other useful feedback.

0 Kudos
Reply