help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-threaded optimal interpolation module for octave


From: Joe Koski
Subject: Re: Multi-threaded optimal interpolation module for octave
Date: Mon, 10 Jul 2006 20:50:35 -0600
User-agent: Microsoft-Entourage/11.2.3.060209

on 7/10/06 7:46 AM, Alexander Barth at address@hidden wrote:

> Hi all,
> 
> I wrote a Fortran 90 module performing a n-dimensional local optimal
> interpolation. The optimal interpolation allows to interpolate
> arbitrarily located observations to a regular grid using a background
> field as first guess. It can be used as an alternative to griddata. The
> optimal interpolated module can be called from Octave using a C++ wrapper.
> 
> I was able to create a working oct-file with gfortran, g95, Intel
> Fortran Compiler (free as in beer) and PGI Compiler (commercial) .
> Unfortunately, gfortran version 4.0 doesn't work but version 4.1 works fine.
> 
> It is also possible to use multiple CPUs during the optimal
> interpolation in octave if the Fortran code is compiled with OpenMP
> support enabled. This works with the Intel and PGI compilers. OpenMP
> support for GCC is planned for version 4.2.
> 
> Instructions and the source code can be found at:
> http://ocgmod1.marine.usf.edu/OI
> 
> Suggestions are very welcome.
> 
> Cheers
> Alex

Alex,

I downloaded your OI-0.1 package to give it a spin. My octave-2.1.73 and
octave-forge are both built with g95, so I thought I was ready for a
straight mkoctfile optiminterp.cc. This was on my Mac G5 with OS X 10.3.9.
To be sure, I rebuilt octave and octave-forge with the most recent (7/10/06)
g95 for the Mac. (Andy Vaught recently modified his name mangling approach
for g95, so I thought it prudent to rebuild octave.)

When I run mkoctfile, I got the following:

Joe-Koskis-Computer:/Tools/OI-0.1 jakoski$ mkoctfile optiminterp.cc
ld: warning multiple definitions of symbol _xerbla_
/usr/local/lib/octave-2.1.73/liboctinterp.dylib(single module) definition of
_xerbla_
/usr/local/lib/octave-2.1.73/libcruft.dylib(single module) definition of
_xerbla_
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib
.framework/Versions/A/libBLAS.dylib(single module) definition of _xerbla_
ld: Undefined symbols:
_optiminterp_f77_

The multiple definitions of xerbla are normal, but why do I need
_optiminterp_f77_ with a Fortran 95 compiler? Are we having problems with .F
vs. .f as an extension? Macs are not as case sensitive as Linux, although I
tried renaming optimal_interpolation.F to optimal_interpolation.f90, and
optiminterp_f77.f to a dummy without success.

In my OI-0.1 directory I have (after running mkoctfile)

Joe-Koskis-Computer:/Tools/OI-0.1 jakoski$ ls
AUTHORS                         optiminterp.cc
COPYING                         optiminterp.o
README.html                     optiminterp1.m
example_optiminterp.f           optiminterp2.m
example_optiminterp.m           optiminterp3.m
ndgrid.m                        optiminterp_f77.f_unused
optimal_interpolation.F         test_optiminterp.m
optimal_interpolation.f90

Any ideas?

Joe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]