HDTenEightyP/NetNews huggingface dataset:
From: IFF291@DJUKFA11.BITNET (Stephan Petersen)
Newsgroups: comp.lang.fortran
Subject: SALFORD: your opinion wanted!
Date: 21 Jan 93 19:32:11 GMT
Organization: Forschungszentrum Juelich


Hi!

We have to invest in a new Fortran compiler for PC's, and from what I've
seen and heard so far, the Salford products seem to offer the most.

If anybody out there has collected some experience with FTN77, I'd like
to know how you like it and whether you noticed any negative things about
the compilers, especially compared to other products (Lahey, etc.).

Thanks in advance for your answers,

Stephan

+-----------------------------------------+----------------------------+
| Stephan Petersen                        | 5170 Juelich               |
| IFF (Institute of Solid State Research) | GERMANY                    |
| Research Center Juelich                 | st.petersen@kfa-juelich.de |
| P.O. Box 1913                           | IFF291@DJUKFA11            |
+-----------------------------------------+----------------------------+
From: am299bv@sdcc15.ucsd.edu (Ravinder Bhumbla)
Newsgroups: comp.lang.fortran
Subject: Comments in input files (not source code)?
Date: 27 Jan 93 08:41:31 GMT
Reply-To: rbhumbla@ucsd.edu (Ravinder Bhumbla)
Followup-To: poster
Organization: University of California, San Diego

How would one go about writing a program that would understand a `$'
in a data file to be a comment character and would skip to the next
line as soon as it encountered it?  That would enable you to document
input data nicely.  I can't think of a simple way to do it.  Please
forgive me if this is an RTFM question but my Fortran book did not
have any suggestion.

The only way I have been doing it so far is to add information at the
end of each line where my program does not expect any data to be.  For
example I could have the following source code:
	...
	read(7,*) abc, ijk, def
	read(7,*) nnn, rrr
	...

and the input file would be:
	...
	10.0 5 25.6  These are values for abc, ijk, def
	235 22.5     These are values for nnn, rrr
	...

But this does not let me put comments at arbitrary places in the input
data.  Could you please let me know what techniques you use to add
comments to your input data files?  Please e-mail directly to me and
I'll post a summary if I get any positive responses.

Thanks,
Ravi

--
Ravinder Bhumbla	rbhumbla@ucsd.edu    U. of California, San Diego
From: drobinow@falcon.aamrl.wpafb.af.mil
Newsgroups: comp.lang.fortran
Subject: Re: IAND,IOR... - Thank you
Date: 27 Jan 93 17:30:22 EST
Organization: USAF AL/CFH, WPAFB, Dayton, OH

In article <1993Jan26.190831.8026@newshost.lanl.gov>, jlg@cochiti.lanl.gov (J. Giles) writes:
> I've never run across a Fortran implementation which did not have 
> these as operations as either intrinsic functions or operators which 
> are inlined and which use the hardware instructions (if the hardware 
> has them) to perform these operations.  A glance at the document for 
> your particular Fortran implementation would probably have revealed a 
> non-clumsy Fortran solution.  Certainly it's less clumsy to use a
> implementation defined extension to Fortran than to rely on C (the
> interface to which is also implementation defined and not portable).
 The original post mentioned that the compiler, if you can call it that, was
f2c, which is a translator. The version of f2c which I have used does not
recognize IAND,IOR, etc., as intrinsic functions and generates a function
call.
 This turns out to be a mildly interesting problem if the Fortran program
uses the aforementioned LOGICAL functions as generic, i.e., calling it with
different data types within the same program. This creates a problem for
the translator since it doesn't know how to prototype the function. My
version of f2c (it's old, I don't know if there's anything newer) issues a
warning in this case.
 The correct answer to the original question is, indeed, to write C code to
implement the functions. I might be tempted to replace (inline) the function
calls in the f2c output (C source) with the appropriate C code due to the
problem I mentioned above. In any case, one must use code that is correct.

David Robinow		DROBINOW@falcon.aamrl.wpafb.af.mil
Logicon Technical Services, Inc.
P.O. Box 317258
Dayton, Ohio 45431-7258		  (speaking for myself)
From: hempatel@gandalf.rutgers.edu (Hemanshu Patel)
Newsgroups: comp.lang.fortran
Subject: Maximum number of openfiles on MS FORTRAN 5.1?
Date: 22 Jan 93 14:43:13 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


	I am using MS Fortan 5.1 on a PC running DOS, and I've written 
	a program on a SPARC 1 which opens 20 or so files. It compiles
	and runs fine.  I then transfered it to a PC, it compiles fine
	but I  get a runtime  error of  too many files opened. I don't 
	remember the  exact error code. Does  anyone know  the maximum 
	number of files openable at one time under MS Fortran 5.1, and
	any tricks around. I really don't want to  open and close each 
	file every time,  especially since the data  stored in them is 
	sequentially  written. Any help  would be appreciated. Than...

	Hemanshu
Newsgroups: comp.lang.fortran
From: hshubs@cis.umassd.edu (Howard S Shubs)
Subject: Poor programming (was: Block Data is evil)
Organization: University of Massachusetts Dartmouth
Date: Sat, 23 Jan 1993 16:15:58 GMT

In <1993Jan23.151052.6593@hubcap.clemson.edu> jtbell@hubcap.clemson.edu (Jon Bell) writes:

>In article <C1AMpC.BAt@umassd.edu> hshubs@cis.umassd.edu (Howard S Shubs) writes:

[poor method for doing memory management from FORTRAN deleted to prevent
its spread]

>>You're not seriously suggesting that this be used in production code,
>>are you?  If you are, is this intended as job security?

>It's already been done.  When I was a grad student in experimental
>particle physics, I worked with CERN's HYDRA library, which implemented
>dynamic memory allocation in FORTRAN using the same basic idea.  I 
>think this package is still widely used in particle physics.

That's meaningless.  Just because something has been done poorly is not
a reason to continue to do it poorly.  Someone has to maintain that code.
-- 
Howard S Shubs    hshubs@bix.com          For to win 100 victories in 100
The Denim Adept   hshubs@cis.umassd.edu   battles is not the acme of skill.
From: jhok@ctcvax.ccf.swri.edu
Newsgroups: comp.lang.fortran
Subject: Math Interpreter Needed!
Date: 22 Jan 93 17:36:28 CST
Organization: Southwest Research Institute

Hello,

We are looking for a program or subroutine, preferably Fortran, that can 
take as input an general algebraic equation and the values for the variables 
in the equation, and calculate the result of the equation by substituting 
the variable values.  For instance, the program would take as input:

      X = 1
	Y = 2
 	Z = 3
	R = X + Y * EXP(Z**2)

and the program would return the correct value for R.  

Is there such a beast?

Jim Hokanson
Southwest Research Institute
jhok@swri.edu

Newsgroups: comp.lang.fortran
From: shenkin@still3.chem.columbia.edu (Peter Shenkin)
Subject: Re: dbx headache
Organization: Dept. of Chem, Columbia U, New York
Date: Mon, 25 Jan 1993 15:48:01 GMT
X-Posted-From: still3.chem.columbia.edu
NNTP-Posting-Host: sol.ctr.columbia.edu

In article <93023.210754MATOVICM@QUCDN.QueensU.CA>
 <MATOVICM@QUCDN.QueensU.CA> writes:
>Thanks a lot to all the people that bothered to respond. At least I know now
>that my headache is real, because the responses seem to point somewhere in the
>future (if FORTRAN lives long to see it?), with the exception of the dbx fea-
>ture offered on the SPARC, but, then, I work on SGI for the time being.

Does anyone out there have experience with SGI's new CASEvision debugging
tools applied to Fortran code?

	-P.
-- 
************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb************************
Peter S. Shenkin, Box 768 Havemeyer Hall, Dept. of Chemistry, Columbia Univ.,
New York, NY  10027;  shenkin@still3.chem.columbia.edu;  (212) 854-5143
******* ...ghostlier demarcations, keener sounds.  (Wallace Stevens) ********
Newsgroups: comp.lang.fortran
From: cabhhmm@cli74aa.NoSubdomain.NoDomain (Michele Morin 5115 A408)
Subject: Re: Fast I/O
Organization: EDF Direction des Etudes et Recherches
Date: Thu, 21 Jan 1993 12:54:13 GMT

In article <1jhqkhINNno3@bigboote.WPI.EDU>, you write:
|> I have to write a Fortran program which writes and reads tremendous amount
|> of data to to and from hard-disc.I wrote it in C using binary files and
|> low level I/O.It worked quite well.I tried to use unformatted files in
|> Fortran but they're at least 4 times slower.I used following open, write
|> and read statements
|>     open(8,File='Filename',FORM='unformatted')
|>     write(8)(A(J),J=1,N) 
|>     read(8)(A(J),J=1,N)   ( A is a double )
|> I also tried direct-access unformatted files but i couldn't figure out
|> how to specify RECL most efficiently.
|> I'm working in UNIX.
|> I will greatly appreciate any help that will make I/O in the Fortran 
|> program faster.
|> Please respond to ustundag@blakey.WPI.EDU
|> thanks
|>   
 The first thing to observe is generally the array dimension, because it's
always faster to execute :
      dimension A(N)
      ...
      write(8)A

The second is to look about buffering on you computer : if you have big file
perhaps you can find a way to write and read without buffering.
If direct access is not necessary, forget it : it's always lower that sequential one.
Good luck !

michele.morin@der.edf.fr
From: jwhite@oasys.dt.navy.mil (Joseph White)
Newsgroups: comp.lang.fortran
Subject: Re: Maximum number of openfiles on MS FORTRAN 5.1?
Date: 25 Jan 93 14:22:17 GMT
Organization: Annapolis Detachment, CARDEROCKDIV, NSWC  Code 2723 
	      (formerly David Taylor Research Center, Annapolis MD)

In article <1993Jan24.174628.1@afit.af.mil> cwillits@afit.af.mil writes:
>In article <Jan.22.09.43.13.1993.26857@gandalf.rutgers.edu>, 
>hempatel@gandalf.rutgers.edu (Hemanshu Patel) writes:
>> 
>> 	I am using MS Fortan 5.1 on a PC running DOS, and I've written 
>> 	a program on a SPARC 1 which opens 20 or so files. It compiles
>> 	and runs fine.  I then transfered it to a PC, it compiles fine
>> 	but I  get a runtime  error of  too many files opened. I don't 
>> 	remember the  exact error code. Does  anyone know  the maximum 
>> 	number of files openable at one time under MS Fortran 5.1, and
>> 	any tricks around. I really don't want to  open and close each 
>> 	file every time,  especially since the data  stored in them is 
>> 	sequentially  written. Any help  would be appreciated. Than...
 
>According to Appendix C of the _Microsoft FORTRAN Reference_, a program written
>in MS FORTRAN 5.1 and run under DOS or OS/2 cannot open more than 20 files at a
>time.  (Under certain situations involving OS/2, this can be extended to 40.)
>
>Another poster referred to changing the "FILES=" line in CONFIG.SYS.  Setting
>this limit to more than 20 has no effect on the MS FORTRAN limit of 20 open
>files.

The following is quoted from the file 'filehand.doc' that is located
on the MicroSoft Fortran Ver 5.1 distribution disks.  It is not qouted
in full and is done so without permission.  The exercise in finding
the entire file on the disk(s) is up to the reader, (Hint: Looking at
the file 'packing .lst' )  I have never done this, but I suspect that
you also have to increase the Config.sys line Files=XX.

Begin 'filehand.doc'----------------------

Increasing File Handles for the FORTRAN 5.10 Run-Time Libraries
---------------------------------------------------------------

There are two methods available for increasing the number of file handles
available to a program.  One method is to modify and assemble the files
CRT0DAT.ASM and UNIT.ASM as described in the header of the file UNIT.ASM.

The other method is to use the pre-compiled modules provided in this
directory tree. The files CRT0DAT.ASM and UNIT.ASM have been compiled

Joe White
jwhite@oasys.dt.navy.mil
Newsgroups: comp.lang.fortran
From: zkdc05@trc.amoco.com (Kelly D. Crawford)
Subject: Re: intrinsic function for the imaginary part and conjugate?
Originator: zkdc05@church
Organization: Amoco Production Company, Tulsa Research
Distribution: usa
Date: Thu, 21 Jan 1993 22:17:51 GMT


In article <C183Gu.7MK@athena.cs.uga.edu>, shen@athena.cs.uga.edu (Mingzuo Shen) writes:
>
>     Metcalf's book (Effective Fortran, 1985) has a list of
> intrinsic functions. Among them, the intrinsic function for
> obtaining the imaginary part of a complex number is AIMAG,
> which makes sense. However, there is no intrinsic function
> for obtaining the real part of a complex number?
> 
>     More seriously(?), the instrinsic function for complex
> conjugate is also AIMAG? I am sure this is a typo or something.

To get the real part of a complex number, use the intrinsic function REAL.
To get the conjugate of a complex argument, use the intrinsic function CONJG.

Kelly

-- 
Kelly D. Crawford             | Amoco Production Research | These are my own
kcrawford@trc.amoco.com       | 4502 East 41st Street     | opinions, not
phone: (918) 660-4043         | Tulsa, OK  74102          | Amoco's...
          >>> *** This line intentionally left blank *** <<<
Newsgroups: comp.lang.fortran
From: cliveg@cix.compulink.co.uk (Clive Grace)
Subject: Fortran Books for sale
Cc: cliveg@cix.compulink.co.uk
Reply-To: cliveg@cix.compulink.co.uk
Date: Tue, 26 Jan 1993 23:42:00 +0000

UK-based books clearout

I have the following books for sale. If you live in the UK and want any 
of these, please email me. Each book costs #10 (ten uk-sterling pounds), 
Postage and Packaging is calculated on an individual basis -- basically 
the more books you buy the cheaper it gets :-)

FORTRAN Programming 
===================
FORTRAN And The Art Of PC Programming Tim Ward/Eddie Bromhead 
Computational Physics-FORTRAN Version S.E.Koonin/D.C.Meredith 
Programming With FORTRAN 77-A Structured Approach 
Dhaliwal/Kumar/Gupta 

Email me if you want more info or the full list of other books
+-------------------------------------------------------------------+
|  ..    "When I grow up, I want to stop being a computer journalist|
| .OO.    and learn how to write."                                  |
| O/\O                                                              |
|  --                              Tanais - friend to all furkindred|
+-------------------------------------------------------------------+
|cliveg@cix.compulink.co.uk | Bisexual knitter of quality since 1992|
+-------------------------------------------------------------------+
Organization: Middle East Technical University - Computer Center
Date: Wednesday, 27 Jan 1993 12:40:59 TUR
From: <E59173@TRMETU.BITNET>
Newsgroups: comp.lang.fortran
Subject: HELP| Unix Fortran compiler on PC? Xenix runs Unix Fortran?

Hi,

I need to compile a fortran program supposedly to have been written under
Unix. (i.e., the prof says so but naturally, being a prof, he doesn't know
what particular kind or system of Unix).  The question is: Where canI find
a Fortran compiler that doesn't cost me my whole fortune?  Any FW/SW/PD?
Another question.  Will SCO Xenix run the stuff? I mean I have a friend
who has Xenix but I have to know for sure before attempting a long journey
to reach him.

Please e-mail.

Thanks in advance.

*******************************************************************************
******
**N. Caglar S. Kiral <E59173@TRMETU>**Any sufficiently advanced       **
****technology is indistinguishable **
**Middle East Technical University **from magic. **
**Department of Mechanical Engineering**Arthur C. Clarke  **
**Ankara-Turkey****
*******************************************************************************











Newsgroups: comp.lang.fortran
From: rvenable@helix.nih.gov (Richard M. Venable)
Subject: Re: IAND(I,J) IOR(I,J) ???
Reply-To: rvenable@helix.nih.gov (Richard M. Venable)
Organization: National Institutes of Health
Date: Mon, 25 Jan 1993 23:19:08 GMT

In article <1993Jan25.191236.27552@sun1x.actc.res.utc.com>,
mark@sun1x.actc.res.utc.com (Mark Stucky) writes:

|> kroeker@oc1.oc.chemie.th-darmstadt.de (Martin Kroeker) writes:
|> : Could somebody please point me to a fortran source code that
provides the
|> : functionality of the non-standard functions IAND, IOR, IEOR and
BTEST ?
|> : I am trying to port a database application from a soon-to-be-junked
IBM
|> : mainframe to a workstation where the fortran compiler is in fact
f2c, and my
|> : own attempts at these bit-handling functions have failed
miserably.
|> : Thanks in advance,
|> : Martin
|> 
|> Here's some...
|> 
|>       INTEGER*2 FUNCTION IAND(I1,I2)
|> C BITWISE LOGICAL FUNCTIONS - MAY HAVE TO BE CHANGED
|> C  ACCORDING TO A GIVEN SYSTEM'S IMPLEMENTATION
|>       INTEGER*2 I1,I2
|>       IAND = I1.AND.I2
|>       RETURN
|>       END

	[similar examples deleted]

The problem here is that while LOGICAL .and. is quite standard,
BITWISE .and. is not part of the f77 standard, although widely
implemented.  The same applies to .or., .not., etc.  The above
will probably work on most (but not all) complilers, so be warned.

-----------------------------------------------------------------
 Rick Venable                  |    "Eschew
 FDA/CBER Biophysics Lab       |   Obfuscation"  
 rvenable@helix.nih.gov        |         -- the Phantom Nerd   
-----------------------------------------------------------------



Newsgroups: comp.lang.fortran
From: kocks@leland.Stanford.EDU (Peter Kocks)
Subject: How to get command line arguments from unix with FORTRAN?
Organization: DSG, Stanford University, CA 94305, USA
Date: Mon, 25 Jan 93 21:40:08 GMT


Subject says all.

Can someone tell me how to read the command line arguments of
a unix command line from with FORTRAN.  Something presumably similar
to the c

main(int argc, char **argv){
}

Thanks 
Peter Kocks
kocks@chemistry.stanford.edu
Newsgroups: comp.lang.fortran
From: amoroso@ghost.dsi.unimi.it (paolo amoroso)
Subject: FORTRAN code ftp sites?
Keywords: archive sites, ftp
Organization: Computer Science Dep. - Milan University
Date: Wed, 27 Jan 1993 12:18:15 GMT
Summary: Archive sites for FORTRAN public domain code


Is there any archive site (possibly in Europe) which allows anonymous
ftp access to public domain FORTRAN 77 source code?
Thanks.

Paolo Amoroso - Via Pietro Boifava, 24 - 20142 Milano - ITALY
paolo@explora.sublink.ORG (Home) - amoroso@ghost.dsi.unimi.it (Univ.)
-- 
Paolo Amoroso - Via Pietro Boifava, 24 - 20142 Milano - ITALY
Newsgroups: comp.lang.fortran
From: lionel@quark.enet.dec.com (Steve Lionel)
Newsgroups: comp.lang.fortran
Subject: Re: Compiler groups working on real apps?
Date: 25 Jan 93 20:26:50 GMT
Reply-To: lionel@quark.enet.dec.com (Steve Lionel)
Organization: Digital Equipment Corporation, Nashua NH


In article <C1Cnq5.1zt@news.cso.uiuc.edu>, ercolessi@uimrl3.mrl.uiuc.edu 
(furio ercolessi) writes:
|>
|>Moreover, these loops play with arrays which are quite small.
|>For example, 4096 elements in total for each array in kernel 13.
|>Maybe this is not of much concern to compiler writers, since this is
|>after all a hardware issue, but nowadays the cache behavior is a 
|>factor which often dominates benchmark results on real-world programs.  
|>With present CPUs and memories, array sizes are happily going into the 
|>millions, usually exceeding the cache sizes.   If compilers are tuned to 
|>tiny benchmarks which fit into the cache, there could be surprises when 
|>moving to the real world applications.  It is not rare to see dramatic 
|>changes in performance when increasing the problem size, or transposing 
|>arrays, on many new RISC architectures. 
|>Could compilers at least try to alleviate these problems?
|>

Yup.  DEC Fortran V6 for OpenVMS VAX has an optional level of optimization which
is intended to improve performance of applications which operate over large
arrays and which tend to induce cache thrashing.  It uses dependence analysis
to see if it is safe to add an additional level of "chunking loops" and/or
do loop reordering so that memory accesses are clustered together.  If
this optimization is used, it can allow the application to maintain level
performance no matter how large the problem size, rather than having performance
decrease due to cache thrashing and excessive page faults.  The qualifier to
enable this is /OPTIMIZE=LEVEL=4; look for more details on it in the 
DEC Fortran Performance Guide for OpenVMS VAX Systems when it reaches your
door.

If you have the KAP preprocessor, it too can do some amount of optimization
for improved memory access.

However...  this optimization won't help the particular piece of code you
posted, as the order of element access is unpredictable at compile-time.  It
looks like a good test of the OS/hardware treatment of memory access, less so
of compiler optimization.
--

Steve Lionel                    lionel@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
Organization: Doctoral student, Industrial Administration, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.lang.fortran
Date: Wed, 27 Jan 1993 10:47:38 -0500 
From: "Bruno W. Repetto" <br0w+@andrew.cmu.edu>
Subject: Re: How to get command line arguments from unix with FORTRAN?

Excerpts from netnews.comp.lang.fortran: 26-Jan-93 Re: How to get
command line.. by Pat Murphy@nrao.edu 
> From: pmurphy@nrao.edu (Pat Murphy)
> Subject: Re: How to get command line arguments from unix with FORTRAN?
> Date: Tue, 26 Jan 1993 17:18:47 GMT
>  
[Stuff deleted.]

> A brief experiment with telnet shows that his posting machine is not a
> Sun: "ULTRIX V4.2A (Rev. 47)".  My f77 info for Ultrix (4.0),
> fortunately shows getarg identical to the above.  However I know that
> for other flavors of unix it is different.  For example, HP-UX uses a
> function IGETARG with three arguments.

My guess is that it works as in Microsoft Fortran, versions 5. or better:
The first argument is the argument number, integer.
The second is the argument itself, a char.
The third one is the lenght of the argument, integer.

In some systems, the first argument is the program name.  Careful with this.

Bruno.  br0w+@andrew.cmu.edu
>                                 - Pat
> --
> ==========================================================================
> | Patrick P. Murphy, Ph.D.                Scientific Programming Analyst |
> | National Radio Astronomy Observatory    Net:       pmurphy@nrao.edu    |
> | 520 Edgemont Road                       Phone:     (804) 296-0372      |
> | Charlottesville, VA 22903-2475          VoiceMail: (804) 980-5889      |
> |      "I don't believe in the no-win scenario"  --- James T. Kirk       |
> ==========================================================================

Newsgroups: comp.lang.fortran