cn7gr8ag@ariel.unm.edu (04/20/88)
I need some advice on computer languages. I'm going to be writing a large numerical simulation which will need to be used on both mainframe and personal computers. The program will be about 5000 to 8000 lines long and portable. The basic design of the code will be to solve a number of coupled partial differential equations for a variety of boundary conditions. The question is which language(Fortran or C) will provide me with the best all around performance on both the mainframe and personal computers as well as the greatest pertability. Any information on both Fortran and C compilers for the personal computers will be a great help also. Speed is of the essence. Bill Rider UNM
eugene@pioneer.arpa (Eugene N. Miya) (04/22/88)
I don't think this is really a question which LANGUAGE is better. If you are really in a hurry, and want something portable, You should check out one of the numerous numeric libraries (most written in FORTRAN) this includes Dongarra's netlib, the Scientific Recepes book, and others. Don't write something (especially, 8000 lines [I don't know how you get this figure before hand]) when you might be able to get it for free. This perpetuates FORTRAN, but if you are in a hurry [like the prostitute says, "They all seem to be.."] this is the way to go. I should have mailed this, but I think it offers a lesson on comparisons. From the Rock of Ages Home for Retired Hackers: --eugene miya, NASA Ames Research Center, eugene@ames-aurora.ARPA "You trust the `reply' command with all those different mailers out there?" "Send mail, avoid follow-ups. If enough, I'll summarize." {uunet,hplabs,hao,ihnp4,decwrl,allegra,tektronix}!ames!aurora!eugene
cn7gr8ag@ariel.unm.edu (04/22/88)
Eugene N. Miya writes:
*I don't think this is really a question which LANGUAGE is better.
*If you are really in a hurry, and want something portable,
*You should check out one of the numerous numeric libraries (most written in
*FORTRAN) this includes Dongarra's netlib, the Scientific Recepes book,
*and others. Don't write something (especially, 8000 lines [I don't know
*how you get this figure before hand]) when you might be able to
*get it for free.
*This perpetuates FORTRAN, but if you are in a hurry [like the prostitute
*says, "They all seem to be.."] this is the way to go. I should have mailed
*this, but I think it offers a lesson on comparisons.
This leads me to believe that my first posting may not have been entirely
clear. The point I needed to clarify is that the speed of run time of the
code to be optimized for a mixed mainframe/personal computer environment.
The quality of the code and the quality of the code on both the large
and smaller systems is of concern to me. I am aware of the Numerical
Recipes book in C and it should either fill or nearly fill most of my
requirements. This program will take a long time to write, so it won't be
your typical "fly by night" sort of programming.
By the way 5000-8000 lines was just an intelligent guess at the size based
on similar modelling efforts by other investigators.
Bill Rider
cjl@ecsvax.UUCP (Charles Lord) (04/22/88)
As to which is BETTER, it depends on the potential targets that the "portable" program will be ported. Many may do better with C (some UNIX installations may not have a decent F77 compiler). I agree with Eugene- - look to the canned stuff first. There ARE some C canned scientific routines out. Don't ignore the PD, as there are some decent libraries on some BBS systems... Charles Lord Cary, NC cjl@ecsvax.UUCP cjl@ecsvax.BITNET
cpk@valideast.UUCP (NANJIL NESAN) (04/26/88)
I have used C as the prinicipal language in many matrix and relaxation oriented number crunchers with no problems. I feel using pointers is definitely a plus and it is done with ease in C. I have written most of my own libraries. I guess FORTRAN will have many more prepackage number crunccher libraries. However C libraries in simulation are definitely growing and for long term use I will tilt towards C.
terry@wsccs.UUCP (Every system needs one) (04/28/88)
In article <2869@charon.unm.edu>, cn7gr8ag@ariel.unm.edu writes: > I'm going to be writing a large numerical simulation which will need to > be used on both mainframe and personal computers. The program will be > about 5000 to 8000 lines long and portable. The basic design of the code > will be to solve a number of coupled partial differential equations for a > variety of boundary conditions. There is a very nice package in LISP called 'REDUCE' (or at least it WAS in lisp, last time I looked). I know it runs on VAXen, SAGE (Pronounced 'Stride') and Sun, among others. It will solve simultaneous partial differential equations handily, as well as a number of other intersting gee-gaws. terry@wsccs