Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!rochester!uhura.cc.rochester.edu!ur-valhalla!davis
From: davis@galaxy.ee.rochester.edu (Al Davis)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran versus C for numerical anal
Message-ID: <1483@valhalla.ee.rochester.edu>
Date: 22 Sep 88 01:43:49 GMT
References: <1475@valhalla.ee.rochester.edu> <3963@lanl.gov>
Sender: usenet@valhalla.ee.rochester.edu
Reply-To: davis@galaxy.ee.rochester.edu (Al Davis)
Organization: UR Dept. of Electrical Engg, Rochester NY 14627
Lines: 32

I said...
>> Here is a challenge: write a portable program that does LU decomposition of
>> a matrix of arbitrary size, in Fortran.  I believe it can't be done, in a
>> straightforward way.  (Read the input, do it, write the result)
>> Someone please prove me wrong.

In article <3963@lanl.gov> jlg@lanl.gov (Jim Giles) writes:
>We have a Monte-Carlo particle code that uses dynamic memory.  It is entirely
>written in standard Fortran except for the two routines that actually
>allocate and free the dynamic memory.

Well, then it is not portable.

>portability problems are limited to differences in file naming conventions
>on the various systems and to numerical differences in the hardware.  These
>problems would effect porting a code written in _any_ language.

They could, but they don't have to.  In my example, use stdin and stdout.
It is bad practice to hard code file names in any system.  I didn't say
anything about precision.  The machine default is fine, so numerical
differences are not an issue for such a simple problem.

>Please note that the C dynamic memory routines _also_ can't be written 
>entirely in C.

I don't care.  malloc exists as a part of the library supplied with every C
compiler, except for a few joke versions.  Portable Fortran has no
counterpart.  You are allowed to use the standard library.

Do you accept the challenge?  I still don't think you can do it.

Al Davis