error when the -malign-double flag is included in a Makefile
Jerry DeLisle
jvdelisle@verizon.net
Sat Oct 25 20:01:00 GMT 2008
jdelia@intec.unl.edu.ar wrote:
> Hi gfortran developers,
>
> I found a running crash with a rather big code and the following codes
> included in the "error.tgz" file is a reduced version.
>
> From some further tests I found that the runnig crash is caused by the
> "-malign-double" flag only when it is used in a Makefile.
>
> On the other hand, when each module and main program are compiled by
> turn and linked manualy, there is not any crashing.
>
> Please, how can I do to fix this?
>
The -malign-double is known to break ABI and it is recommended that you not use
this flag.
If you are running on a 64 bit architecture, it buys you nothing in performance.
The gfortran library is not compiled with it, so if you compile a routine or
program that contains calls to the library, in particular, the I/O routines,
your calls will not align correctly with the library functions and you will get
failures.
If you insist that you need -malign-double, then you must put all your programs
I/O in separate routines and compile those without -malign-double. Then you can
compile compute only routines with -malign-double and things may then work. I
can't guarantee that though.
Regards,
Jerry
More information about the Fortran
mailing list