|
[Sponsors] |
March 4, 2006, 01:40 |
Re: Fortran 90 faster than C/C++
|
#41 |
Guest
Posts: n/a
|
This kind of C code can be written only by a Fortran programmer. If you realy want to try and taste programming in C++ take a good programming course in C++.
Andy |
|
March 4, 2006, 06:53 |
Re: Fortran 90 faster than C/C++
|
#42 |
Guest
Posts: n/a
|
Sorry, as I said, C is to much for me... I'll keep programming in Fortran.
|
|
March 4, 2006, 14:31 |
Re: Fortran 90 faster than C/C++
|
#43 |
Guest
Posts: n/a
|
Even though I belong to a Fortran generation I have never written any programme in this language. Simply at the time I started my programming experience the only compiler available to me was Algol 60. Yes, yes I am so old and I think if I was able to learn C++ and become an expert everyone else can. The only problem is if you want to do it. If you are in a group of people programming in Fortran under version control you probably do not have any immediate need to switch to another language. But it is only temporary.
Andy |
|
March 6, 2006, 08:29 |
Re: Fortran 90 faster than C/C++
|
#44 |
Guest
Posts: n/a
|
Well, we agree in something. I'm santista and I'll never be a flamenguista - even in Tokio!!!!!!!!
By the way, I've been working with fortran (77+90) since january. Do you know how to link c++ and fortran executables? I mean, one fortran executable calls a c++ one, or vice-versa? |
|
March 6, 2006, 09:31 |
Re: Fortran 90 faster than C/C++
|
#45 |
Guest
Posts: n/a
|
In order to link mixed-programmed routines you must firstly compile your routines with its respective compilers, after that you can link the compiled files (object files) with the main linker of your program, for example:
I use the Metis library (entirely written in C standard) with my Fortran 90 programs. After compiling Metis I have the libmetis.a file, thus I link this file with my executable program doing: ifort -o MyProgram *.o libmetis.a in Compaq Visual Fortran you must insert the libmetis.a file in the link tab, or set the enviroment variables INCLUDE and LIB of the compiler. It's the easiest way. Some libraries and routines may require to write interfaces between the languages in order to define argument passing rules (but it's not so hard to do). Cheers Renato. |
|
March 6, 2006, 09:37 |
Re: Fortran 90 faster than C/C++
|
#46 |
Guest
Posts: n/a
|
Thanks, that's what I was looking for.
|
|
March 6, 2006, 10:21 |
Re: Fortran 90 faster than C/C++
|
#47 |
Guest
Posts: n/a
|
And if you are porting to multiple platforms, bear in mind that you'll have more success if you use the C++ compiler as a front end to the linker. I.e. compile each file with the appropriate compiler, but link the lot together with a C++ compiler command on the objects.
|
|
March 6, 2006, 13:26 |
a few good quotes
|
#48 |
Guest
Posts: n/a
|
This is always a heated debate. Perhaps we can close it off with a few good laughs about the "fun" of programming:
http://www.bellevuelinux.org/q_programming.html |
|
March 6, 2006, 14:49 |
Re: Fortran 90 faster than C/C++
|
#49 |
Guest
Posts: n/a
|
I guess this will be the case, since we're going to use the solver written in fortran, and a GUI written in C++. So the GUI would call the solver at some moment, and the final user would just click a button for it.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 06:37 |
Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77 | hawk | Main CFD Forum | 1 | April 12, 2005 23:13 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 21:45 |
Fortran77 or Fortran 90 | Swapnil | CFX | 2 | November 26, 2002 16:16 |
Why Favoring Fortran over C/C++? | Zi-Wei Chiou | Main CFD Forum | 35 | September 26, 2001 10:34 |