Re: [f2py] Problem compiling with F2PY using intel Fortran 64-bit compiler on OS X 10.6

Youngung Jeong <[email protected]> Mon, 14 Feb 2011 11:04:53 +0900
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
Congratulates. It does not mean your previous message was a spam. I guess
any discussion is meaningful in this group and that is what this group is
for.


Youngung Jeong

Graduate student
Materials Mechanics Laboratory
Graduate Institute of Ferrous Technology
Pohang University of Science and Technology
San 31 Hyoja-Dong, Nam-Gu, Pohang
Gyeongbuk, 790--784, Korea
phone: +82 (0)54-279-9217
mobile: +82 (0)10-2065-4855
email : [email protected]



On Mon, Feb 14, 2011 at 11:01 AM, Ravi Kanda <[email protected]> wrote:

>  I found the problem (a pretty silly one!).  My $DYLD_LIBRARY_PATH did not
> include the $INTEL_ROOT library paths.  After adding these paths, I can now
> import 'fib1.so' compiled using the 64-bit intel fortran compiler without
> any error messages.
>
> Apologies for the spam.   Just wanted to post in case anyone else runs into
> this issue.
>
> Regards,
> Ravi.
> ---------------------------------------
>
>
> On 2/11/11 5:22 PM, Ravi Kanda wrote:
>
> Hi,
>
> I have been using F2PY for over 2 years now, primarily on Linux (32-bit).
> I recently moved my python computations to a MacPro workstation (12-core,
> Intel Mac, 64-bit, with OS X 10.6.6; Python 2.6.1, Numpy
> 2.0.0.dev-799179d).  Just to be safe, I am doing some basic tests
> (compilers, speed, etc) before moving on to compiling more complex f90
> modules. I am able to compile the default test fortran scripts (Fib1_Quick,
> Fib1_Smart: from the F2PY website) without any problems using gfortran
> (4.2.1). However, with the intel 64-bit compiler, IFORT, I get a "Library
> not loaded ... Image not found" error message in the Python interpreter when
> I try to import the shared library 'fib1.so' created using f2py.  I want to
> use the Intel compiler for optimized performance of my f90 codes (I found
> f2py/intel-compiled codes to be much faster when working on Linux).  The
> source, wrap-script, and diagnostics are in the attached ZIP file.
>
> ----------------------------
> INTEL COMPILER ISSUE DETAILS:
> ----------------------------
> I installed intel's 64-bit Fortran compiler (ifort 12.0.0 20101006 for OS
> X) in INTEL_ROOT='/opt/intel'.  My $PATH contains $INTEL_ROOT/bin &
> $LD_LIBRARY_PATH contains $INTEL_ROOT/lib.  I can compile native f90
> programs from the Terminal.  Also, I store all my '*.so' libraries under:
> $USER_ROOT/dv/products/modules, which is in $PYTHONPATH.  When I compile
> Fib1_Quick example using the ifort compiler, I find that 'fib1.so' is
> generated in the current working directory, and copied to the above modules
> directory as well (see attached wrap script and logfile) - and this works
> for the gfortran generated 'fib1.so' library.  I also don't see any
> error/warning messages during the wrapping process (see logfile).  Now, when
> I try to import the intel 'fib1' from the python interpreter, I obtain the
> following error message:
> ---------------------------------------------------
> >>> import fib1
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: dlopen(/Users/rkanda/dv/products/modules/fib1.so, 2): Library
> not loaded: libifport.dylib
>   Referenced from: /Users/rkanda/dv/products/modules/fib1.so
>   Reason: image not found
> ---------------------------------------------------
>
> 'libifport.dylib' does exist under $INTEL_ROOT/lib, and hence, visible via
> my $LD_LIBRARY_PATH.  I tried using f2py with and without the '-L$LIB_DIR'
> as well as '-l$lib1 -l$lib2 ...' options but each time, I get an identical
> error message in the python interpreter that the library was not found.
> Looking online, I found suggestions for using 'otool' on the library to
> determine its dependencies.  This output is also included in the
> attachment.  However, from the 'otool' log, I can't figure out where python
> is looking for the '*.dylib' files.  In desparation, I created soft links to
> the intel libraries in the above modules directory, which is in my
> $PTYTHONPATH, as well as in the system Python site-packages (where I instal
> all my public and private Python packages).  That does not work either.
>
> I am probably doing something really stupid, but at a loss as to what.  I
> will really appreciate any suggestions/ideas.
>
> Thanks in advance.
>
> Regards,
> Ravi Kanda.
> ------------------
>
>
> _______________________________________________
> f2py-users mailing listf2py-users-Y4l6ocDipWBegg/[email protected]://cens.ioc.ee/mailman/listinfo/f2py-users
>
>
>
> --
> ---------------------------------------------------------------------
> Ravi Kanda
> PhD, California Institute of Technology, 2010
> Currently, Post-Doctoral Fellow
> Department of Geological Sciences
> Global Change Research Center
> National Taiwan University
> Taipei, 10617
> Taiwan.
>
> Web Page: http://www.gps.caltech.edu/~rkanda
>
> ----------------------------------------------------------------------
>
> For a human being, the unexamined life is not worth living - SOCRATES
>
> ----------------------------------------------------------------------
>
>
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
>

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users