Re: just how bad is Fortran?

1997-07-23 Thread Adriano Nagelschmidt Rodrigues
Rick Hawkins writes:
  I don't mean fortran in generall, i mean the available linux versions.

From what I've read so far, Linux fortran tools aren't exactly state of the
art (as you know, chances are that gcc is going to optmize your code much
better).

  I'm familiar with Fortran, C, C++, etc., and the coding for fortran is
  far more efficient for what i'm doing: it comes down to applying
  functions to arrays.

You mean performance wise? Do you have some numbers? It's an interesting
comparison... As for the numerical libs, are there some you can't find in C?

  I also may have the world's only project that really calls  for an Object
  Fortran :)

Good luck with your project,

--
Adriano


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Bob Nielsen
On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:

 Sorry, I can't resist ;-)
 
 fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
 are in the end of the '90s (and I thought only *my* profs were forcing
 students to use it!)

But it sure beats the Fortran II of the '60s.  

(Hey, there are still some of us old guys around who used to use that
stuff.)

Bob


Bob Nielsen Internet: [EMAIL PROTECTED]
Tucson, AZ  AMPRnet:  [EMAIL PROTECTED]
AX.25:[EMAIL PROTECTED]
http://www.primenet.com/~nielsen


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Anthony Fok
Sorry, I can't resist either!  grin  (BTW, the following are just my
personal opinion, and I hope I'm not starting a language war.  :)
And the following might be off-topic.  (sorry!)

On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:

 Sorry, I can't resist ;-)
 
 fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
 are in the end of the '90s (and I thought only *my* profs were forcing
 students to use it!)
 
 You will be much better writing your code in ANSI C (pointers aren't difficult
 once you get to know them).

I don't know much about Fortran, and only basic C, but from what I've
read, while C is a wonderful language, there are also many pitfalls, and
in some ways this make things really ugly and dangerous, especially when
someone mess up the pointers, etc.  It is not type safe, and it puts a lot
of burden on the programmer to be careful and exercise discipline to avoid
errors.  I said that because I have tried to debug some really obscure
bugs in a relatively large C program written by previous students (Borland
C++ 4.5), and it took me a really long time to do so.  It was partly due
to bugs in Borland's C compiler, but some features in the C language
didn't help either.

This is where languages like Pascal, Modula-2, Modula-3 Oberon-2 come in. 
In perspective, they have much cleaner syntax than C, and they enforce
strict type checking and other safety features which prevent someone from
shooting oneself in the foot.  (Is that the right expression?  ^_^)
Also, I have read messages from people who program in Modula-2 (etc.)
claiming that they spend much less time debugging thanks to the clean
and safe design of the language.  I think there are some truths to their
claim.

So, in some ways, comparing C and Fortran 77, Fortran might not be so bad
after all.  At least, my former employer/supervisor really likes it and
uses it often to do engineering calculations.  The C program (a coal
proocessing graphing software) that we were working on?  It gave all of us
students and our supervisors big headaches due to the obscure bugs and
mysterious crashing that took us a long time to find and fix.

To be fair, the program had been worked on separately by many student, and
not all of us practised good programming style.  However, my opinion is,
while C is a great language for many tasks, it requires great discipline
(and a lot of time) on the part of the programmer to keep the code clean.
It is not the best candidate for every task.  ^_^

Anthony

-- 
Anthony Fok Tung-Ling[EMAIL PROTECTED]
Civil Engineeringhttp://www.ualberta.ca/~foka/
University of Alberta, CanadaKeep smiling!  *^_^*


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Syrus Nemat-Nasser
On Tue, 22 Jul 1997, Alex Romosan wrote:

 we are using a combination of f2c and a package called f77reorder
 (available from http://www-hermes.desy.de/ww/f77prob.html) to compile
 fortran programs initially written on sgi's without problems. you can
 get both these packages in debian format by anonymous ftp from my
 computer, caliban.lbl.gov in pub/debian. they require libc6-dev but
 you can always roll your own if you still have libc5-dev (just get the
 sources and recompile).

Cool.  For some reason, I screwed up my last compile of f77reorder, so 
I'll check out your .deb's.

 on a sort of related note, does anybody know what happened with f2c
 for debian. the version available in debian is rather old so i've been
 rolling my own for a while now. is this an orphaned package (or do
 people just don't care about fortran any more?)?.

Another good question.   I care.  But, we've been fairly happy of late 
with g77--presently using 0.5.19.1 which is the most stable version.  
It's getting better all the time.

Thanks.  Syrus.

-- 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Syrus Nemat-Nasser [EMAIL PROTECTED]UCSD Physics Dept.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Syrus Nemat-Nasser
On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:

 Sorry, I can't resist ;-)

Me either. ;-)

 fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
 are in the end of the '90s (and I thought only *my* profs were forcing
 students to use it!)
 
 You will be much better writing your code in ANSI C (pointers aren't difficult
 once you get to know them).

This is plainly untrue.  f77 is a much simpler command set with no 
dynamic allocation, etc.  As a result, a f77 compiler can be optimized to 
a much greater extent independent of the coding expertise of the 
programmer, i.e. me.  Thus, f77 is almost always faster than c or c++.  
Also, in ansi C, there is no intrisic or optimized support for complex 
numbers.  People who actually do intensive simulations where compile time 
is not a critical factor can still benefit from using f77.  f90 is 
another matter, meaning that I no nothing about its efficiency.

Thanks.  Syrus.

-- 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Syrus Nemat-Nasser [EMAIL PROTECTED]UCSD Physics Dept.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Michael Harnois
On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:

 fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer,
 etc. But we are in the end of the '90s (and I thought only *my*
 profs were forcing students to use it!)

In the early 80's a local computer rag ran a tongue-in-cheek
dictionary of computer terms. As I recall, the applicable entry was 

Fortran, n. A language meant to be written and not run. Unfortunately, 
it is often run anyway.

-- 
 Michael D. Harnois, Redeemer Lutheran Church, Washburn, IA
 [EMAIL PROTECTED]  [EMAIL PROTECTED]
 Few sinners are saved after the first 20 minutes of 
  a sermon.  --Mark Twain


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Dany Dionne
Your right, f77 is much more performant in intensive numerical
computations than c or c++, at least on SGI (IRIX). For example, on a
Indigo 2, a version of a code in f77 have a peak performance of 270
MFLOPS. The same code in c/c++ peak at 100 MFLOPS. Ok, maybe the c/c++
version could be more optimized but the fact is with f77 it's easy to
obtain a very performant code, so why use c/c++ and lose a lot of time  to
write a obscur, tricky and slow program?

Dany Dionne
Physics Department
Laval University, Canada  

On Tue, 22 Jul 1997, Syrus Nemat-Nasser wrote:

 On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:
 
  Sorry, I can't resist ;-)
 
 Me either. ;-)
 
  fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But 
  we
  are in the end of the '90s (and I thought only *my* profs were forcing
  students to use it!)
  
  You will be much better writing your code in ANSI C (pointers aren't 
  difficult
  once you get to know them).
 
 This is plainly untrue.  f77 is a much simpler command set with no 
 dynamic allocation, etc.  As a result, a f77 compiler can be optimized to 
 a much greater extent independent of the coding expertise of the 
 programmer, i.e. me.  Thus, f77 is almost always faster than c or c++.  
 Also, in ansi C, there is no intrisic or optimized support for complex 
 numbers.  People who actually do intensive simulations where compile time 
 is not a critical factor can still benefit from using f77.  f90 is 
 another matter, meaning that I no nothing about its efficiency.
 
 Thanks.  Syrus.
 
 -- 
 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Syrus Nemat-Nasser [EMAIL PROTECTED]UCSD Physics Dept.
 
 
 
 --
 TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
 [EMAIL PROTECTED] . 
 Trouble?  e-mail to [EMAIL PROTECTED] .
 
 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Oleg Krivosheev

Hi, there

  Sorry, I can't resist ;-)
 
 Me either. ;-)

who can ;)

  fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But 
  we
  are in the end of the '90s (and I thought only *my* profs were forcing
  students to use it!)
  
  You will be much better writing your code in ANSI C (pointers aren't 
  difficult
  once you get to know them).
 
 This is plainly untrue.  f77 is a much simpler command set with no 
 dynamic allocation, etc.  

hmm...

f77 is just a bit simplier, not very much. And dynamic allocation
is performed in C by library (aka external) function thus
is not affecting any optimizations at all. The key
problem here is aliasing. FYI, C suffers quite
a bit from this problem, but Fortran is not
aliasing free language either. And last there are
tons of languages with dynamic allocation and other
gudies but without any aliasing problems from
the beginning.

 As a result, a f77 compiler can be optimized to 
 a much greater extent independent of the coding expertise of the 
 programmer, i.e. me.  

don't get it. Compiler itself can be optimized ?
You're talking about Fortran compiler itself written in Fortran?

 Thus, f77 is almost always faster than c or c++.  

nope for tons of problem. f77 lacks support for pointers
and data structures (like struct in C) which can be
a big problems for lots of code.

 Also, in ansi C, there is no intrisic or optimized support for complex 
 numbers.  People who actually do intensive simulations where compile time 
 is not a critical factor can still benefit from using f77. 

the main advantage is tons of ready to run f77 code

YMMV

OK


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread M BAILEY


If you can use Pascal the GNU pascal suite is great

--Matt

On Tue, 22 Jul 1997, Rick Hawkins wrote:

 
 As i prepare to launch back into coding, is anyone familiar with just
 how bad the Fortran support is?  or is that all a myth?
 
 I really need as much performance as I can get, and the low level stuff
 in c/c++ is gross overkill for my usage.  The low-level stuff built into
 other languages took about 2/3 of my time.
 
 So is g77 or something else usable, or do I need to go to a c?
 
 rick
 
 
 --
 TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
 [EMAIL PROTECTED] . 
 Trouble?  e-mail to [EMAIL PROTECTED] .
 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Oleg Krivosheev

Hi,

On Wed, 23 Jul 1997, Dany Dionne wrote:

 Your right, f77 is much more performant in intensive numerical
 computations than c or c++, at least on SGI (IRIX). For example, on a
 Indigo 2, a version of a code in f77 have a peak performance of 270
 MFLOPS. The same code in c/c++ peak at 100 MFLOPS. 

There is something very wrong with your code,
not with f77 or C. To tell the truth, lots of
vendors provide uniform optimizer for all supplied language.
So all vendor compilers (C, F77, Ada) have different front-end but are
sharing the same optimizing back-end. This is just common business
practice. Sun is doing this as well as SGI, i believe
(well, i didn't check latest SGI C and F77 but it was true for
2yo compilers). Basically it means there is impossible to get
any essential difference from well written C or F77 code.

I believe i can attribute so huge difference in your f77 and 
C code to data allocation pattern. F77 and C keep the
matrices in memory in different way (column versus row strategy).
It means that each indexing operator in F77 steps through
continious memory region in your code thus making
L1/L2/L3 cache/memory bus/whatever happy, while C code
trash L1/L2/L3 cache during each indexing. SGI is especially
sensibile to cache hits strategy, alignment etc

I saw counterexamples where C code was faster 
exactly due to the same reasons.

 Ok, maybe the c/c++
 version could be more optimized but the fact is with f77 it's easy to
 obtain a very performant code, so why use c/c++ and lose a lot of time  to
 write a obscur, tricky and slow program?

hmm...

C++ promises to have quite clear code:

A = B*C+D; // A, B, C, D are huge matrices or tensors or ...
   // all n-dimensional loops are hidden


And again, f77 lacks tons of features (pointers and struct)
to write clean and simple code in lots of areas.


YMMV 

OK


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-23 Thread Mike Miller
 rick == Rick Hawkins [EMAIL PROTECTED] writes:
[...]
 I'm familiar with Fortran, C, C++, etc., and the coding for
 fortran is far more efficient for what i'm doing: it comes
 down to applying functions to arrays.  I also may have the
 world's only project that really calls for an Object
 Fortran :)

There is an article that you may find interesting on the relative
merits of Fortran, C, C++, and Python at
URL:http://studbolt.physast.uga.edu/templon/fortran/fort-alternative.html.
Although I haven't done any large-scale coding in python, it is
object-oriented and has more or less replaced Fortran for much of
my small-scale numerical work.  Jeff Templon has also collected
some information about using Fortran codes under Linux at
URL:http://studbolt.physast.uga.edu/templon/fortran.html.

 The question is really whether the fortran tools available
 are good enough for real work.

There is a good amount of real work being done with Fortran under
Linux.  The Hermes collaboration is doing a lot of serious number
crunching with Fortran ported to a Linux farm.  Wolfgang Wander's
f77 Problem Page at
URL:http://www-hermes.desy.de/ww/f77prob.html discusses some
ways to avoid certain pitfalls that he and Hermes came across.
The f77reorder script mentioned earlier in this thread is
discussed there.

There are also a number of web sites that have information in the
general category of Linux in science.  Many of them include
discussions of porting Fortran codes to Linux.  I have a few
links in that category collected at
URL:http://www.npl.uiuc.edu/~miller/linux. 

Regards, Mike


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


just how bad is Fortran?

1997-07-22 Thread Rick Hawkins

As i prepare to launch back into coding, is anyone familiar with just
how bad the Fortran support is?  or is that all a myth?

I really need as much performance as I can get, and the low level stuff
in c/c++ is gross overkill for my usage.  The low-level stuff built into
other languages took about 2/3 of my time.

So is g77 or something else usable, or do I need to go to a c?

rick


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-22 Thread Alex Romosan
we are using a combination of f2c and a package called f77reorder
(available from http://www-hermes.desy.de/ww/f77prob.html) to compile
fortran programs initially written on sgi's without problems. you can
get both these packages in debian format by anonymous ftp from my
computer, caliban.lbl.gov in pub/debian. they require libc6-dev but
you can always roll your own if you still have libc5-dev (just get the
sources and recompile).

on a sort of related note, does anybody know what happened with f2c
for debian. the version available in debian is rather old so i've been
rolling my own for a while now. is this an orphaned package (or do
people just don't care about fortran any more?)?.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-22 Thread Adriano Nagelschmidt Rodrigues
Sorry, I can't resist ;-)

fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
are in the end of the '90s (and I thought only *my* profs were forcing
students to use it!)

You will be much better writing your code in ANSI C (pointers aren't difficult
once you get to know them).

Regards,

--
Adriano


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-22 Thread Norris Preyer
 Adriano == Adriano Nagelschmidt Rodrigues [EMAIL PROTECTED] writes:

Adriano Sorry, I can't resist ;-) fortran (77) is horrible. Well,
Adriano it _was_ ok, Backus was a pioneer, etc. But we are in the
Adriano end of the '90s (and I thought only *my* profs were
Adriano forcing students to use it!)

Adriano You will be much better writing your code in ANSI C
Adriano (pointers aren't difficult once you get to know them).

Adriano Regards,

Adriano -- Adriano

I agree that Fortran 77 is pretty awful, but there is a Fortran 90
that seems *very* nice.  Is anyone working on a gpl'ed version of
this?

--Norris

-- 
Norris Preyer   (541) 962-3310 (office)
Physics Program (541) 962-3873 (fax)
Eastern Oregon University   [EMAIL PROTECTED]
La Grande, OR  97850http://physics.eou.edu/npreyer.html
   *** Linux, for those with an IQ above 95 ***


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: just how bad is Fortran?

1997-07-22 Thread Rick Hawkins
 
 fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
 are in the end of the '90s (and I thought only *my* profs were forcing
 students to use it!)

 You will be much better writing your code in ANSI C (pointers aren't difficult
 once you get to know them).

I don't mean fortran in generall, i mean the available linux versions.

I'm familiar with Fortran, C, C++, etc., and the coding for fortran is
far more efficient for what i'm doing:  it comes down to applying
functions to arrays.  I also may have the world's only project that
really calls  for an Object Fortran :)

The question is really whether the fortran tools available are good
enough for real work.

rick


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .