[f2py] user fortran type declaration
pearu.peterson at gmail.com
Fri Sep 3 09:19:19 EEST 2010
On 09/03/2010 02:54 AM, Xavier Barthelemy wrote:
> 2010/9/2 Pearu Peterson<pearu.peterson at gmail.com>:
>>> I wrap it using
>>> f2py --fcompiler=intelem -c -m Test Test.f --opt=" -I<APPRECLIBDIR>
>>> -larprecmod -larprec -larprec_f_main -mp" --no-lower
>>> where libarprecmod.a libarprec. libarprec_f_main.a are my module
>> Perhaps `-mp` should read `-lmp`?
> nope, -mp is an intel fortran compiler option that maintain floating
> point precision
Still, can you determine which library defines mprealmod_mp_mpeq_?
I would always start from that when having undefined symbol problems.
>>> It compiles, but when I type in python
>>> then When I look at the ARPREC documentation, it says:
>>> f -> o : ifort Test-f -c Test.o -I<APPRECLIBDIR> -mp
>>> o -> exec: gcc -o test Test.o -L<ARPRECLIBDIR> -l<ARPRECLIBS>
>>> -L<BunchOfLibDir> -lifport -lifcore -limf -lsvml -lm -lipgo -lirc
>>> -lirc_s -ldl
> I made a mistake, to link everything have to compile with g++, not gcc
> how can i force f2py to use it?
> the thing is the test program is working when I compile it, but not
> with f2py. I understand I have to compile it with g++.
> Have you got a solution?
There is no direct solution. However, though I don't see how that
would fix the original problem, you can try the following:
1) build extension module with f2py as above
2) copy the linking command of the f2py build output and
replace gcc with g++ and rerun the linking command.
This way you can test whether the new extension module linked with g++
imports or not.
More information about the f2py-users