[PATCH][fortran] Rework allocator library interface

Tobias Burnus burnus@net-b.de
Thu Dec 14 13:43:00 GMT 2006


Hi all,

Richard Guenther wrote:
>> The patch is OK for trunk and 4.2.  Please wait a week or so before
>> committing to 4.2, to catch regressions that might still occur.
>>     
> Committed to trunk.  I have omitted the hunk bumping the shared library
> version as this will be not necessary if we backport to 4.2.
>   

I only want to point out that this change breaks the AMD Core Math
Library 3.6.
That library contains:

/opt/acml3.6.0/gfortran64/lib/libacml_mv.so
/opt/acml3.6.0/gfortran64/lib/libacml.so

/opt/acml3.6.0/gfortran64_mp/lib/libacml_mp.so
/opt/acml3.6.0/gfortran64_mp/lib/libacml_mv.so

The first two are the serial version, compiled with gfortran 4.1.0;
the second pair is the OpenMP version, compiled with "4.2.0 20061114".

Due to the allocate change, gfortran 4.3 programs linked to the OpenMP
version of ACML crash with:

#0  allocate_size (size=<value optimized out>, stat=0x500010) at /gcc/libgfortran/runtime/memory.c:187
187               *stat = 1;
#0  allocate_size (size=<value optimized out>, stat=0x500010) at /gcc/libgfortran/runtime/memory.c:187
#1  0x00002ba64ed18acd in zungtr8z_ () from /opt/acml3.6.0/gfortran64_mp/lib/libacml_mp.so


That their is no link-time error but a crash is rather bad :-(

Solutions:

- Simply wait - there will be surely a new ACML libraries and for
non-vendor libraries one can recompile oneself
(if one has figured out that the crash is due to the compiler update and
too old libraries.)

- Bump the library version number (we did this already recently in the
4.2-experimental version, which also broke the ACML. Upon request, one
could then get a semi-official version compiled with a newer 4.2 compiler.)

- Use other names for the new functions (= manual symbol versioning)

- Use (real) symbol versioning (unlikely to happen before 4.2.0 is released)


In any case, coredumps reported in the next weeks could be due to this
change.

Tobias



More information about the Gcc-patches mailing list