CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Why Favoring Fortran over C/C++? (https://www.cfd-online.com/Forums/main/3923-why-favoring-fortran-over-c-c.html)

Zi-Wei Chiou September 19, 2001 13:09

Why Favoring Fortran over C/C++?
 
I am an experienced C/C++ programmer and a novice in CFD. While studying CFD and reading papers, I found most of them are implemented using Fortran 77/90 programming languages. One of the main reason is that in early days Fortran compiler is the only available compiler on most super-computers. Even today, Fortran code is still prevalence in CFD community.

When I asked some friends why they used Fortran instead of C/C++, the answer is: "This is the only programming language I know." Since most CFD student/engineers are usually not ordinary software developers and many numerical library are only available in Fortran.

***** QUESTION: What are the reasons to favor Fortran over C/C++? *****

Learning curve will be not steep for me, but it's a cost to switch to antoher programming language nevertheless - programmging style, debugger (if available) and libraries, etc. I don't have to do this except there are some very good reasons.

Thanks for your help.

Axel Rohde September 19, 2001 14:19

Re: Why Favoring Fortran over C/C++?
 
I think there are no reasons other than the one you already mentioned: Most people in the established industry just don't know any better. By 'established', I mean major companies who have been around for some time. The newcomers, e.g. CFD startup companies, do use C/C++ extensively. At least this has been my experience at the last AIAA CFD conference in Anaheim, CA (June 2001) while talking to many company representatives.

I am an aerospace engineer and part-time shareware developer (see post a few lines below "MicroTunnel..."), and to me, personally, neither Fortran nor C/C++ has much appeal. I never enjoyed programming in Fortran, and I don't even like the syntax of C. To me the structure of C code is obscure with all those curly brackets around, or perhaps I just don't get it.

In my shareware programming, I feel I have combined the best of two worlds. I use VB (VisualBasic) for ease of creating the graphical user interface and output, and if I really want speed, I replace bottleneck subroutines with assembly coded DLL's, which I can call from VB like any other subroutine.

Unlike popular belief, VB is no longer just an interpreted or pseudo-code language (although p-compilation is still available for size optimization). Version 6, which has been around for some time, has a pretty good native code compiler, which allows for many speed optimizations, including options for the math coprocessor. In the past, I have written benchmark assembly routines like a bubble sort for integer and floating point arrays that would outpace the VB code 10 to 20 fold under VB4, whereas under VB6 the saving is less than 1%. For more complex data structures, however, such as the multi-dimensional arrays often used in CFD, VB is not the most efficient language (see my earlier post "MicroTunnel V1.2 - Now 6x faster), and I would be highly interested in a Fortran or C/C++ comparison of my flow solver code.

John C. Chien September 19, 2001 16:16

Re: Why Favoring Fortran over C/C++?
 
(1). It is identical to the reason why you are posting the message in English. (2). I am sure that in Taiwan, most people use Chinese MS Windows. Then it would take forever for English speaking users to understand it. (3). The actual machine code executed by the computer changes from computer to computer, from operating system to operating system, for compiler to compiler, even if you are using the same C/C++. (4). Even in VC++, there are many different ways to write the same code. (5). Computer language should be much simpler than taking a course at a college. They are all about the same, except there is a big difference in thinking, in terms of procedural and object-oriented approaches. (5). You don't have to write a code in Fortran, you can write it in C/C++.

John C. Chien September 19, 2001 16:48

"must have" Fortran book
 
(1). Try this one, and it should save you a lot of time in Fortran and CFD. "Applied Numerical Methods", by Brice Carnahan, H.A. Luther and James O. Wilkes. published by John Wiley & Sons,Inc, 1969. (the more recent edition could be published by other publisher? )(2). This is a "must have" book in Fortran. It has tons of theory, samples, flow charts, Fortran listings. It should also answer your question of "why".

Sebastien Perron September 19, 2001 18:30

Re: Why Favoring Fortran over C/C++?
 
A while ago, there was a discussion related to fortran and C (C++).

From my point these are the major reason why people favor fortran ov C/C++

1) Many of the folks who work in CFD only know Fortran...

2) Many of the codes have been started a while ago when the best compilers available were for fortan 77.

3) Many of the CFD people work with computers (Cray, Fujitsu, SGI, HP, Sun, IBM... ) that provide more than one CPU's. For these architectures, the best compilers available which can take advantage of the multi-processors architecture are fortran compilers.

But I wish to add that:

1) if you work with a one-processor architecture or a SMP architecture for which there are no multi-processor compilers, C, C++ or Fortran will offer roughly the same performance (even though I managed to get my C++ rouines run faster than Fortran routines...)

2) For codes that can be parallized with a message passing interface (such as MPI or PVM), I don't think a fortran program will be faster. For this case, C can be a better langage since these environements were mostly written in C.

...

Two good books:

High Performance Computing from K. Down and C. Severance (O'reilly)

Programming guide to fortran 90 from Brained, Goldberg, and Adams (Springler Verlag)


Jim Park September 19, 2001 20:28

Re: Why Favoring Fortran over C/C++?
 
One thing that used to stated as an advantage for Fortran is the huge existing library of 'canned' routines, numerical libraries of lean, well-tested functions. Linear algebra, ODE integrators, sorts, even grid generators. Since these are for limited functions only and the Fortran language is now more-or-less standard, a well-written library routine doesn't even need to be rewritten to go from one computational box to another - machine independence.

Big emphasis on the 'well-tested'. I suppose these are being converted to C/C++ over time and a C programmer would probably convert a routine that he needed rather than learn Fortran (assuming he could read the Fortran well enough to convert it!).

Dan Williams September 19, 2001 23:34

Re: Why Favoring Fortran over C/C++?
 
I don't know enough about C++ to make a useful comment. I will point out that this is a somewhat useless debate, from a performance comparison standpoint, because performance so highly depends on the ingenuity of the programmer to develop clean, efficient data structures and write code which will compile into well optimised assembly language.

> 1) if you work with a one-processor architecture
: or a SMP architecture for which there
: are no multi-processor compilers, C, C++ or > Fortran will offer roughly the same
: performance (even though I managed to get my C++ > rouines run faster than Fortran
: routines...)

I always enjoy questionably useful comments like this, and especially when people publish their results. I guess you didn't spend enough time thinking about how to optimise your fortran subroutines then. Note that the inverse would apply if your result was the other way around.

Dan.

John C. Chien September 20, 2001 00:30

Re: Why Favoring Fortran over C/C++?
 
(1). The selection of a programming language in most cases has nothing to do with the performance of the code. (2). Historically, there was Fortran (Formula Translation) suitable for mathematical operations only. If you can write down a formula, you can easily write the Fortran code. It is almost one-to-one translation. (3). Then BASIC was developed as a teaching tool (for entry level programmers, engineer, scientist). It is easy to learn, and very slow to execute.(it is important for the entry level to use slow tools for obvious reasons) (4). Later, to handle more system programming, "c" was created. It was flexible enough, so most people in computer field use it. This is especially important for mini-computers and personal computers, because they have to deal with system problems. In the math operation part, "c" and "Fortran" are very similar. (5). That's about all, except that when "c" was extended to include the "object-oriented programming style", it became "C++". Officially, "c" is included in "C++" now. The extension of "c" to include the "class and object" make the new C++ somewhat confused. (6). So, it becomes somewhat difficult, only when people try to use the "class and object" portion. Otherwise, there is really nothing new. And one can still write in "c" style using "C++" compiler. (7). In some applications, such as computer graphics, it does make sense to use class and object concept to code the program. The same is true in business applications. (8). But since the use of class and object require extra work to allocate and de-allocate resources, it can slow down the calculation, if the performance is the goal. (8). But performance issue is rarely the major factor in selecting a programming language. Because, you will have to learn from existing codes, and add or modify the code. (9). The only reason to write a program is to document the process clearly, so that it can be read by the author himself or other people later on. The highly optimized code is nearly useless, because it is very hard to read, including the author himself. And a highly optimized code is useless in this rapid changing world. (even the hardware is changing in less than 3 months.) (10). For this reason, "C++" is good, because the class created can be re-used. I would say that performance issue is a personal issue, that is, it is a challenging task for individual.

Sebastien Perron September 20, 2001 08:01

Re: Why Favoring Fortran over C/C++?
 
I'm sorry Dan, but I took the time to optimize my fortran routines. These results were not meant for a publication. Furthermore, to actually get the C++ routines (mainly vector operations), I add to use programming practices only available with C++ ( explicit register variables). Without, this "trick", both langages offered roughly the same performances.

Regards.


Mr Code September 20, 2001 10:38

Re: Why Favoring Fortran over C/C++?
 
There exists always the possibility to include fortran routines into C++ code. In my experience I have only really been able to get f77 code working in C++ programs but I am just a C++ beginner.

My advise to you is if you aready know C/C++ and are interested in CFD, learn FORTRAN simply for historical and code reuse issues.

John C. Chien September 20, 2001 13:34

Re: Why Favoring Fortran over C/C++?
 
(1). If a person is a professional programmer or a graduate from a computer science department, then I think, he should be able to write in different programming languages, learn easily new languages (new language usually takes a while to create), and have the training to create a new language. (2). If one does not know Fortran, he can not survive in CFD field at all.

Dan Williams September 20, 2001 20:44

Re: Why Favoring Fortran over C/C++?
 
Maybe you "think" you optimised your fortran, and that makes you feel good, but how do we know that you did a good job optimising it? How do we know that you are competent enough to properly optimise fortran? Maybe you are, maybe you are not. So, your comment is only anecdotal at best. I guess because of this I would personally never make any general statement that optimised C++ is faster than optimised fortran, or vice versa.

Just because your fortran was running slower doesn't mean you did the most efficient thing possible on whatever platform you were using. There could be a million different things wrong. Maybe you had your fortran compiled in debug mode by accident, maybe you didn't use the same compiler options, maybe you didn't use the most optimal compiler options, maybe you had a bunch of loops reversed (first index is the outer loop), maybe you didn't profile your fortran and C++ to identify bottlnecks, maybe you don't have decent data structures, maybe you didn't compare the assembly output of both compilers to address differences, etc.... there are so many variables.

Show me your C++, and show me your fortran if you want and I'll check it and reproduce your results for you. Then I would be convinced.

Dan.


toni September 20, 2001 21:22

Fortran ads over C/C++
 
Have had some experience with the languages mentioned. Each has it's strengths in different respects and in a project each can be used to perform the job it performs best. Why Fortran for sheer number crunching and fast handling? see: http://www.ibiblio.org/pub/languages/fortran/ch1-2.html

John C. Chien September 21, 2001 01:56

Re: Fortran ads over C/C++
 
(1). I am sure that BASIC language is "slow". So, BASIC is not suitable for "number crunching" job. It is an order of magnitude slower than FORTRAN, c/C++. Otherwise, VB is very flexible and easy to use for Windows programming. It is very similar to Fortran language. (2). For "number crunching" job, I think, Fortran language is "pretty fast" and "easy to learn". Unfortunately, MS is no longer supporting Fortran language. So, I am no longer using it for program development on my PC. I think, it was the victim of the shrinking market in 90's. (3). For myself, I need to have the access to the Windows programming, 3-D graphics API or library and the speed, naturally. The only thing avaliable is VC++ from MS. (4). I am sure that there are Fortran compilers available for PC. So, it is not a problem to write a Fortran code on a PC. And I think, it really depends on "what you are trying to do with the language". In my case, the speed alone is "not good enough". I must have access to the Windows and 3-D graphic library. (5). And I don't think, CFD is all "number crunching". This could be the major factor in selecting a programming language.

Sebastien Perron September 21, 2001 08:33

Re: Why Favoring Fortran over C/C++?
 
1) As I said before, these simple tests were done on simple vector operations (dot product, addition, sclar product...) No profiling has to be done, these were simple one routine program.

2)As for outer-inner loops, these weren't matrix operations. Well, I know too well that for fortran the inner-outer loops have to be reversed compared to C or C++.

3) These tests were conducted on a linux box with the Gnu compilers (not the best available, I sould say..) using the same options.

4) As I said, in order to obtain better results with C++, I had to explicitly declare register variables. As a matter of fact, with an other compiler or another architecture (alpha, SGI..), the results could have been different.

5) If you use some profiling, I hope you are aware that you code will be highly optimised for a specific compiler and architecture. And this might not be the case for another platform.

6) My point is that I'm tired of hearing people saying that a fortran is faster. The truth is that the best langage for speed will depand on the compiler and the architecture.

7) As John said, the choice of a langage depends on the people you are working with. (Now, where I work , I use fortran, because everybody knows fortran. Which is not the case with C or C++).

This week-end, If I get some time, I will be doing tests again. And send you the codes and the results.

Regards.


Axel Rohde September 21, 2001 08:46

Re: Fortran & C/C++ versus VB6
 
John,

I don't think that VB6 is an order of magnitude slower than Fortran or C when it comes to number crunching. Although I increased the speed of my inviscid flow solver by a factor of 6 when I converted from VB6 to assembly, the actual speedup from the 'optimized' VB code to the 'optimized' assembly code was only a factor of 4. There were some inefficiencies in the original VB code which I did not notice until I started programming in assembly.

Also, on other 'number crunching' routines for which I did a VB6 versus Assembler comparison, I was not able to get things faster than a factor of 4. I would assume that my assembly code, which makes full use of the math coprocessor (utilizing all eight floating point registers for intermediate results) is still faster than your best compiled Fortran or C code.

Another thing about VB that you may not know: You can call any Windows API function from VB. You just have to know its name, the parameters which are passed, declare it, and you can call it like any other subroutine. Daniel Appleman wrote a book "Visual Basic - Programmer's Guide to the Win32 API". I only have the old version from 1996, but I am still using it like a bible. That book lists about every API function and is over 1500 pages.

I think you would be pleasantly surprised if you gave VB (version 6 that is) a shot. Although it has its drawbacks, I think it is the "fastest" and easiest language for application development.

Axel

John C. Chien September 21, 2001 14:03

Re: Fortran & C/C++ versus VB6
 
(1). I have used VB since 91, but I am not using it anymore. It's great for business and web applications. (2). Number crunching using VB?, you are out of your mind. But to do prototyping ,it's all right. (3). Using assembly language? Not the long term solution.

Axel Rohde September 21, 2001 14:37

Re: Fortran & C/C++ versus VB6
 
That was the point I was trying to make: VB has gotten a lot better over the years when it comes to number crunching. I have only used it since 93 and have seen tremendous improvement with Version 6, which allows for native code compilation with several speed optimization options.

I have never done a side by side comparison myself, but I have talked to a developer who uses VB and VC++, and he told me that on math intensive routines VC++ was 'only' about twice as fast as VB.


John C. Chien September 21, 2001 14:48

Re: Why Favoring Fortran over C/C++?
 
(1). In old days, Byte magazine used to publish some simple integer and floating point test cases and the speed rating of various PC's. People were interested in the speed because PC was relatively slow in those days. (2). For a while, MS and Borland were competing against each other in terms of the compiler speed. These were golden days, when there were many hardware and software companies trying to improve the speed of computing. (3). With today's environment, the competition is almost gone. The general trend is the software is getting extremely large and slow. The hardware is controlled by one or at most two companies, so they control your speed. (4). Anyway, speed alone was never the only factor in selecting a programming language. There is a different trend though, on multi-tier network computing, people are using "COM" approach, where "interfaces" are used to talk to "binary-executables" written in "different languages". In that case, you are free to use any language to write the code, as long as you follow the interface specifications. (interfaces are methods or functions like IcomputeAplusB()...) But then the speed will be determined by the network speed. (5). Well, that's what they called "enterprise-computing". (6). My suggestion is: split MS into several language development groups, then you will see faster and smaller compilers every year. Otherwise, if the system program is written in c-language, then I guess Fortran is likely written in c.

John C. Chien September 21, 2001 14:57

Re: Fortran & C/C++ versus VB6
 
(1). That's very encouraging. (2). From business point of view, I don't think they are going to improve it to match the speed of VC++, even if it's possible. (3). Based on my experience, VB is much easier to use than VC++.

Axel Rohde September 21, 2001 15:12

Re: Fortran & C/C++ versus VB6
 
The point you made about Microsoft's monopoly was well taken. I think in the case of VB it turned out beneficial though. Being part of their Visual Studio package, I have seen a lot of "C stuff" migrate over to VB because the VB programmers wanted more power. I have even heard rumors that down the road VB would support OpenGL or a similar 3-D graphics language.

John C. Chien September 21, 2001 17:53

Re: Fortran & C/C++ versus VB6
 
(1). As you know, the programming and 3-D graphics require some training and experience already. (2). The Numerical analysis and math modeling are many orders of magnitude more difficult than programming task. (3). This is the case since late 80's when more companies are interested in making quick money. And less companies are spending time and effort in doing right in CFD. (4). In 80's, the questions used to be "should we invest in doing CFD?". While in 2001, the questions are mostly "Which is the best code to do CFD?". In other words, there are more layers of new questions on the top of the old question. (5). So, to do CFD right, one has to stop thinking that a CFD code alone will give him the right solution. And I must say that, the current goal of the forum is to keep it alive first. As long as it is alive, there is always a chance to make improvement. (6). And the importance of using the language like c/C++(w/wo object-oriented programming) is to encourage self-study to expand the experience into other fields, so that one can stay alive before attempting to solve CFD problems. It is a very expensive hobby, rather than a money making field or trade. (7). But if you know how to use it and turn the products into a more competitive one, then it is a different story.

Axel Rohde September 22, 2001 16:00

Re: Fortran & C/C++ versus VB6
 
Very true!!!

Larry Clark September 23, 2001 14:04

Re: Why Favoring Fortran over C/C++?
 
The reason I have stayed with Fortran all these years is the inability of C/C++ to do run time allocatable arrays of higher dimension. I can easily do run time allocation of higher order arrays in PASCAL, and in JAVA and in FORTRAN but, so far, unless things have changed, I must write some fairly extensive code to do it in C/C++. One way is to write your code all in vector form with pointers to find the different components but this is error prone and unlike the mathematics used to do matrix analysis. I use VC for writing user interfaces to my FORTRAN code.

Mr. Code September 23, 2001 18:35

Re: Why Favoring Fortran over C/C++?
 
I don't like the use of the word inability. C++ IS able to do almost anything IF the programmer knows how to program it in. And then you just reuse the code and never worry about it again.

C++ is a lower level programming language and it gives the programmer more control. Although I was very much impressed with the OOL advances of f77 to F90.

Larry Clark September 23, 2001 19:04

Re: Why Favoring Fortran over C/C++?
 
I think that is what I said. The same can be said for assembly language, you can do anything you want, but I don't see many people advocating its usage. However, in the early 60's we did write application software for engineering problems using assembly language. Still, if productivity is of interest then one doesn't use it. It is very fast and 'once you have the routines written' etc, etc. I have FORTRAN code I wrote in the early 60's that will still compile with no errors on my F95 compiler. I have not had the same success with my C code. The C/C++ standard appears to be a moving target.

WhatEverYouLike September 24, 2001 11:08

Re: Why Favoring Fortran over C/C++?
 
You guys are too concerned about which language to use ... My primary goal is to develop a well structured code (and this DOESN'T depend on the language you use) ... with a well structured code you can use with satisfaction any language you like even a JIT language ... Btw it is obvious that a vb programmer prefers Vb and that a C programmer likes C most !!!

Mr. Mix September 24, 2001 12:13

Re: Why Favoring Fortran over C/C++?
 
How you are ABLE to structure the code IS dependent on which language you use. The higher level the language is the less code structuring you can do.

And yes a C programmer prefers C and a FORTRAN programmer prefers Fortran but what does a programmer that knows both C and FORTRAN prefer??? I think this was the original question.

John C. Chien September 25, 2001 02:35

Re: Why Favoring Fortran over C/C++?
 
(1). Well, if one is working alone, and the integration with other codes (being developed by other engineers or scientists) can be accomplished through file I/O, then he can just go ahead and write his code in his own way. (2). If he needs to turn in his code listings to his boss or other engineer for integration, then his boss or the program manager must make the decision right at the begining of the work. In this case, he will be forced to follow the decision if he still want the job. (3). Programming is tedious and bugs are common. So, the goal should be to focus on minimizing the error in the code. Fortran is easier than C/C++, so he should not be worrying about it at all.

WhatEverYouLike September 25, 2001 04:07

Re: Why Favoring Fortran over C/C++?
 
1)I'm sorry but I don't agree with you ... during my whole career I've seen many times CFD experts writing code without a clear PP to follow. 2)Moreover structuring is by definition indipendent from the programming language (both ANSI and ISO standards ...). 3)Do you really think that with an OOL you can't structure a code ? 4)I was just provocating ... is obvious that the lower level language you use the faster your code will run (I hope no argue with this !!!) ... but what about time and cost of developing ? So if the topic of this discussion is which language is faster I'd say : machine language (is this affordable ???????????) ... but if we're concerned with the general efficency of a code (comprised the developing time) than it depends on too many factors and nothing can be said "a priori". Btw if you like only the speed this is a list of the code speed registered with a fixed code portion on a fixed platform (Pc) with different languages made in 2000 by ANSI (faster to slower): 1) Machine code; 2) Assembly; 3) Ansi C; 4) C++; 5) Fortran; 6) Visual C; 7) Visual Basic; To this list I say : "nothing new under the sun!!!!"

Mr. Me September 25, 2001 09:45

Re: Why Favoring Fortran over C/C++?
 
>>2)Moreover structuring is by definition indipendent >>from the programming language (both ANSI and ISO >>standard ) ---------------------------------------------------

You have a language. This language has rules. If you need to do something that breaks these rules than you cannot use this language. Therefore you must find a language that does not break the rules. In this case my experience is that c++ has less "rules" than fortran. Thus you are able to do more with it and have more options on how to structure it.

For example say you want to structure a code to make it the most easy for timmy to read. Timmy has a problem that his mind mixes the first two lines of code up, thus you want to do the following:

IMPLICIT NONE

PROGRAM Timmy_Tool

You cannot do this in Fortran. Well, I'm not quite too sure if you can do this in any language but it is a simple arguement that shows that structuring of a code DEPENDS on the language.

As a response to your standards... At the end, all languages have to produce something the computer can understand. Whats done in between is a whole different ball game.

I really cannot see any justification for your comment that structure is independent of language. Its simply not true. Possibly our ideas of "structure" are different.

Axel Rohde September 25, 2001 10:13

Re: Why Favoring Fortran over C/C++?
 
Hi,

I agree with your ANSI list of fastest to slowest languages, mostly. But what is the difference of assembly versus machine code? In assembly, you use mnemonics instead of numbers to code processor instructions. The end result is the same.

If you have read the earlier thread, you may know that I program flow solver routines in assembly. Once you get the hang of it, you can put the same structure into your assembly routines as into any other code. The only difference: What takes 10 lines in Fortran or VB to program can take over 100 lines in assembly. Compactness of code, like 'structure', is critical in understanding and following it. Especially when you look at your code years down the road.

Axel Rohde

Amadou Sowe September 25, 2001 11:11

Re: Why Favoring Fortran over C/C++?
 
Here is a useful link on this topic: http://www.kai.com/publications/comp_phys/index.html

John C. Chien September 26, 2001 00:27

Re: Why Favoring Fortran over C/C++?
 
(1). Are we going to have the programming contest : "The fastest program only the machine can understand". (2). I would say that, (a). write the code in your own language first, maybe something like a flow chart.(b). write it in one of the programming language you are familiar with. (c). In the contest, translate it into assembly language. That's how the game programs are written, I think. (3). By the way, the assembly language is hardware specific, while Fortran and c/C++ are not. So, even if the assembly code is faster, it can only work on one type of machine. And most of the time, it will be useless, on other types of machine.

Jim Park September 26, 2001 09:01

Re: Why Favoring Fortran over C/C++?
 
From the old-timer's corner again:

When access to the computer (main frame, housed in an air-conditioned 'temple' with its own complement of feeders, caretakers, and such) was expensive, the middle ground was often useful.

Most of the code in a CFD solver was devoted to I/O and setup, lots of lines of FORTRAN, not much of the CPU time. So the code was profiled to identify the time-sucking loops. These were usually a small fraction of all the lines of code. The compiler-generated assembly code for those few loops was examined carefully, then replaced with hand coded assembly instructions. Most of the code remained FORTRAN, but the inefficient assembly it generated ate only a small part of the machine's resources.

As an extreme example, I've seen the CPU required for a big CFD job (hours of CPU time) reduced by a factor of 5. For this example, perhaps 40 assembler instructions were replaced by 10. The readibility of the code was compromised not at all (the orginal FORTRAN in the replaced loop was commented so that its intent was preserved).

I suppose this could be done with C++ as well?

But, the catch is that memory and CPU time are relatively cheap now; it's the analyst who's so expensive.

WhatEverYouLike September 26, 2001 09:34

Re: Why Favoring Fortran over C/C++?
 
I do agree with you ... if we just think at the economics of the sw development (in terms of costs and benefits) for a one shot sw. Suppose your company is developing a certain sw to solve a certain problem (this approach is true not only for CFD) ... optimizing the code will cost you 1000$ (just an example...) buying more RAM or a faster CPU will cost you 500$ (again an example ...) maybe it could seems that the second option is cheaper, but what if in the next year you want to implement some new features or modify something ? What if in this year the programmer team is changed and the previous team made no or poor analysis ? Answer : if you're lucky and your new working team is good enough they have to build back the analysis (some months of work ...)to proceed further, but you could be unlucky and your team has to rewrite the whole code from scratch ... So now what is cheaper ?


All times are GMT -4. The time now is 15:05.