[Wien] gfortran compilation and run problems for 19.1
Fecher, Gerhard
fecher at uni-mainz.de
Wed Jun 26 07:42:53 CEST 2019
Dear Gavin,
Sorry my question was probably to short, it should read
Does anyone know whether "== " works with gfortran ?
With ifort the following test works well, but I cannot test it with gfortran
The answer in the Intel forum that you quote does not include "=="
program logicaltest
implicit none
!
! test ==, .eq., .eqv.
!
logical a, b, c
a=.true.
b=.true.
if(a == b) then
write(6,*) 'a = b'
end if
if(a .eq. b) then
write(6,*) 'a .eq. b'
end if
if(a .eqv. b) then
write(6,*) 'a .eqv. b'
end if
end
Ciao
Gerhard
DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."
====================================
Dr. Gerhard H. Fecher
Institut of Inorganic and Analytical Chemistry
Johannes Gutenberg - University
55099 Mainz
and
Max Planck Institute for Chemical Physics of Solids
01187 Dresden
________________________________________
Von: Wien [wien-bounces at zeus.theochem.tuwien.ac.at] im Auftrag von Gavin Abo [gsabo at crimson.ua.edu]
Gesendet: Mittwoch, 26. Juni 2019 03:37
An: wien at zeus.theochem.tuwien.ac.at
Betreff: Re: [Wien] gfortran compilation and run problems for 19.1
The == should work for C/C++ language. I don't recall ever seeing that being used for Fortran.
A quote from a HP Doctor Fortran article [ https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/274462 ]:
"The real trouble with making assumptions about the internal value of LOGICALs is when you try testing them for "equality" against another logical expression. The way many Fortran programmers would naturally do this is as follows:
IF (LOGVAL1 .EQ. LOGVAL2) ...
but the results of this can vary depending on the internal representation. The Fortran language defines two operators exclusively for use on logical values, .EQV. ("equivalent to") and .NEQV. ("not equivalent to"). So the above test would be properly written as:
IF (LOGVAL1 .EQV. LOGVAL2) ..."
On 6/25/2019 3:14 PM, Fecher, Gerhard wrote:
Does == work ?
Ciao
Gerhard
DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."
====================================
Dr. Gerhard H. Fecher
Institut of Inorganic and Analytical Chemistry
Johannes Gutenberg - University
55099 Mainz
and
Max Planck Institute for Chemical Physics of Solids
01187 Dresden
________________________________________
Von: Wien [wien-bounces at zeus.theochem.tuwien.ac.at<mailto:wien-bounces at zeus.theochem.tuwien.ac.at>] im Auftrag von Sam Trickey [trickey at qtp.ufl.edu<mailto:trickey at qtp.ufl.edu>]
Gesendet: Dienstag, 25. Juni 2019 15:13
An: wien at zeus.theochem.tuwien.ac.at<mailto:wien at zeus.theochem.tuwien.ac.at>
Betreff: Re: [Wien] gfortran compilation and run problems for 19.1
See below
On 6/25/19 5:47 AM, Peter Blaha wrote:
Hi,
I can confirm the fix for inputpars.F. Of course, according to fortran standards a logical if should have an .eqv. operator (although I never "understood" what that should be good for ...).
Keeps computer scientists occupied introducing needless and annoying distinctions.
peace, Sam
--
Samuel B. Trickey
QTP, Depts. of Physics and Chemistry
2324 Physics Building
Box 118435
Univ. of Florida
Gainesville, FL 32611-8435
Vox: 352-392-6978 (direct)
Vox: 352-392-1597 (receptionist)
Fax: 352-392-8722
http://www.qtp.ufl.edu/ofdft
http://users.clas.ufl.edu/trickey
More information about the Wien
mailing list