C function vs Fortran function performance

Steve Lionel (Intel)
Total Points:
115,025
Status Points:
115,025
Black Belt
November 25, 2008 2:38 PM PST
Rate
 
#5 Reply to #4
Quoting - shachris23

I agree with your assertion there. I believe the language that can best solve the given problem should be used.

By the way, let's say if someone use Fortran with C\C++ code, how does one go about debugging it? So if we called a Fortan code from C...how does one go about "stepping into" Fortran code if needed be?

My environment is Windows Visual Studio C++.

Just do it.  It works just as if you stepped into a C routine.

My philosophy on these language wars is that you should choose the language that makes the most sense for that aspect of the application, that you know well and that can be maintained by your organization.  No matter how good Fortran is, it's a poor choice if it has to be maintained by people who know only C++.  Every language has its strengths and weaknesses.  Historically, C/C++ has been weak in array operations compared to Fortran.  That's still largely true, but some of the performance issues can be remedied by use of new features such as accelerated valarray.

Modern Fortran is very expressive and does not lack any significant features compared to usable C++.  I'll comment that there have been many studies of projects that settled on C++ - the studies found that a majority of these projects never got completed or finished late and had significant maintenance costs.  This is more likely to happen when developers are given free reign of all the C+ features and mis-features.  Fortran does not have this characteristic.




Intel Software Network Forums Statistics

8458 users have contributed to 31571 threads and 100533 posts to date.
In the past 24 hours, we have 17 new thread(s) 131 new posts(s), and 152 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Quoting - rase if (k.eq.0

Please welcome our newest member soundmyth