Dear Fred,
I would say that you're using a buggy gfortran version
(http://lists.debian.org/debian-gcc/2009/03/msg00070.html). You may
want to check your version with 'gfortran --version' in order to be
sure of it. The '-malign-double' switch provides only a slight
optimization and as you have
Hi Jon,
Thanks for the feedback. The version I am using (which is not that
reported in the web page you mention, Version: 4:4.3.2-2) is:
GNU Fortran (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4).
Hence it appears that the bug hasn't been entirely dealt with. Ian
Tickle was getting segmentation
I'm using gcc 4.7.2 (latest stable version I think). I don't get the
compilation error of the FORMAT statement but I do get the segfault error
on running with the '-malign-double' switch that I reported. So it would
appear that even the current stable version is buggy! As Jon said the
Hello,
For those who still know the Fortran language and its Fortran 77
variant, I used to have a g77 compiler here (Linux box), and now on the
new box it's no longer g77 but gfortran.
When compiling Fortran77 code (these are the flags used for compilation:
-o ../bin/$1 -std=legacy
Hi Fred
If you look very carefully at your Fortran code you will probably
find a small error/inconsistency that g77 allowed but gfortran picked
up on or compiled as written rather than as intended. My move from
g77 to gfortran when building Mosflm (which is moderately large) was
pretty
Hi Fred
I regularly compile F77 code with gfortran: I always get lots of warnings
and the occasional error that I didn't get with g77 mainly because gfortran
is much stricter applying the standard (and a good thing too!). I also
regularly use ifort (which isn't quite as strict as gfortran and
Hi Fred,
From: CCP4 bulletin board [CCP4BB@JISCMAIL.AC.UK] on behalf of vellieux
[frederic.velli...@ibs.fr]
When compiling Fortran77 code (these are the flags used for compilation:
-o ../bin/$1 -std=legacy -Wno-globals -w -O3 -malign-double
Hi Fred,
vellieux frederic.velli...@ibs.fr writes:
[...]
I get errors (at run time) of the type:
At line 138 of file program.f (unit = 6, file = 'stdout')
Fortran runtime error: Missing initial left parenthesis in format
[...]
Mmm, that kind of error rings a bell … is the relevant
Dear all,
By popular request here is an example of some code where gfortran gives
run time errors. This is at the very beginning of the program, the first
write statement where a parenthesis is seen as missing at run time: (the
first hyphens are not within the Fortran code but there to
Fred
The relevant bit of code, with the FORMAT statement closed with a ')' and
an END statement added to make it a viable program, is:
WRITE (*,10)
10 FORMAT(///,25X,'*',
. /,25X,'* *')
END
For me this compiles
Hi all,
Problem solved thanks to Jorge Navaza's suggestion: remove all
compilation flags but only have -Wall as a compilation flag.
There is no run time error any more and there is no error at compilation
time. The program runs fine.
Thanks to Thomas Jens, Harry Powell, Ian Tickle, Ian
Fred, OK I just noticed I didn't have the -malign-double flag. With that
it compiles but on running I get:
Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.
Backtrace for this error:
#0 0x12244B
#1 0x122A9C
#2 0x473907
#3 0x1BD238
#4 0x1CB4BF
#5 0x80486E2 in
Hi again Ian and list,
The following flags seem to work fine:
gfortran -o ../bin/$1 -std=legacy -ffixed-format -Wno-globals -w -O3
-funroll-loops -ffast-math -fno-second-underscore $1.f (followed by the
library or libraries, compiled with the same flags).
Problem solved as far as I am
Hi,
The command:
$ aptitude install fort77
would install an f77 command on Ubuntu/Debian Linux.
In fact that's a wrapper for f2c, but maybe it behaves like
a real f77 compiler, I would give it a try personnally.
On 03/06/2013 06:48 PM, vellieux wrote:
Hello,
For those who still know the
14 matches
Mail list logo