Hi all,

I've been trying to build octave324 on i386-darwin10 now, and I think I 
understand the cause of more ff2c-related failures.
On both darwin8 and darwin10, the Accelerate framework needs -ff2c for the 
correct calling convention to system-atlas.
Any fink-built atlas (gfortran) will not need it.
So far, qrupdate and octave are both atlas-varianted.
arpack however is not, but I think it needs to be, even if it doesn't link 
against atlas/lapack.  Since octave/qrupdate need to be ff2c-consistent, 
so does arpack, but the current packaging doesn't give the option to 
select ff2c or without.

What I propose is to variant-ify arpack so that non-fink-atlas is 
uses -ff2c and is compatible with system-atlas variants, and -atlas omits 
-ff2c to work properly with -atlas variants.
I think this will take care of funny errors we see with arpack 
functionality, namely in eigenvalue-related parts of the packages and 
their tests.

Any other fortran packages that eventually link to an atlas-varianted 
package may need the same treatment.

Thoughts?

Fang


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 9/13/11 11:58 AM, Dominique Dhumieres wrote:
>>> Did anyone happen to notice during octave324-atlas's build:
>>
>> If was too sleepy (2am local time), I saw that octave324-atlas
>> 3.2.4-21 was built without atlas. 3.2.4-22 seems to work as
>> expected (build in progress). The only glitches I have spotted so
>> far are some
>>
>> configure:12470: flag-sort -r gcc -o conftest -g -O3 -MD
>> -I/sw/include -I/sw/include -L/sw/lib conftest.c -lqrupdate
>> /sw/lib/liblapack.dylib /sw/lib/libf77blas.dylib
>> /sw/lib/gcc4.6/lib/libgfortran.dylib -lhdf5 -lz -lm
>> -lGraphicsMagick -lmetis >&5
>> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple
>> definitions of symbol _ilaenv_ /sw/lib/libf77blas.dylib(single
>> module) definition of _ilaenv_ /sw/lib/liblapack.dylib(single
>> module) definition of _ilaenv_
>> /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning suggest
>> use of -bind_at_load, as lazy binding may result in errors or
>> different symbols being used symbol _ilaenv_ used from dynamic
>> library /sw/lib/libf77blas.dylib(single module) not from earlier
>> dynamic library /sw/lib/liblapack.dylib(single module)
>>
>> probably harmless.
>>
>> The problem is more serious on x86_64-apple-darwin10, on which I
>> get
>>
>> configure:12126: checking whether CDOTU is called correctly from
>> Fortran configure:12146: /sw64/bin/gfortran-fsf-4.6 -o conftest -O3
>> -Wl,-dead_strip_dylibs -L/sw64/lib conftest.f
>> -Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>> -lhdf5 -lz -lm -lGraphicsMagick -lmetis >&5 configure:12146: $? =
>> 0 configure:12146: ./conftest ./configure: line 2499: 66156
>> Segmentation fault      ./conftest$ac_exeext configure:12146: $? =
>> 139 configure: program exited with status 139 configure: failed
>> program was: |       program main | |       complex
>> cdotu,a(1),b(1),w |       external cdotu |       a(1) =
>> cmplx(1e0,1e0) |       b(1) = cmplx(1e0,2e0) |       w =
>> cdotu(1,a,1,b,1) |       if (w .ne. a(1)*b(1)) stop 1 | |
>> end configure:12155: result: no
>>
>> and the same with ZDOTU with the result
>>
>> configure:12398: WARNING: A BLAS library was detected but found
>> incompatible with your Fortran 77 compiler.  The reference BLAS
>> implementation will be used. To improve performance, consider using
>> a different Fortran compiler or a switch like -ff2c to make your
>> Fortran compiler use a calling convention compatible with the way
>> your BLAS library was compiled, or use a different BLAS library.
>>
>> Manual tests show that -ff2c is required for (C|Z)DOTU with
>> -Wl,-framework,Accelerate. I have checked on some codes I have that
>> this flag does not hurt *GEMM.
>>
>
> I wound up with more errors when I tested it with -ff2c than without
> it on some platform.  I think it was 10.6/x86_64, but I don't recall
> that for a fact.  I'll try it again for my available platforms.
>
>> Question: why the ugly
>> -Wl,-framework,Accelerate,-dylib_file,/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib:/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>
>>
> while -Wl,-framework,Accelerate seems enough?
>
> It was like that when I took the package over :-) .  I'm certainly
> willing to simplify that on the next update.
>
>>
>> Work in progress here.
>>
>> Cheers,
>>
>> Dominique
>
>
> - --
> Alexander Hansen, Ph.D.
> Fink User Liaison
> http://finkakh.wordpress.com/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5vgbAACgkQB8UpO3rKjQ8m2ACgnQGJseOf1eerSne0462kiQhe
> niwAn1oYxQl0NKk+vO4eqM7AQzMddiks
> =X+fD
> -----END PGP SIGNATURE-----
>

-- 
David Fang
http://www.csl.cornell.edu/~fang/
http://www.achronix.com/


------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to