On 21-03-2010, at 18:47, Allin Cottrell wrote:
On Sun, 21 Mar 2010, Berend Hasselman wrote:
.....
> However, running my bold of cvs gretl results in the following
> error on startup (and gretl quits):
>
>
-----------------------------------------------------------------------------------------------
> dyld: lazy symbol binding failed: Symbol not found: _omp_get_wtime
> Referenced from:
/Users/berendhasselman/tmp/gretl-image/Gretl.app/Contents/Resources/bin/../lib/libgretl-1.0.0.dylib
> Expected in: flat namespace
>
> dyld: Symbol not found: _omp_get_wtime
> Referenced from:
/Users/berendhasselman/tmp/gretl-image/Gretl.app/Contents/Resources/bin/../lib/libgretl-1.0.0.dylib
> Expected in: flat namespace
>
> Trace/BPT trap
>
-----------------------------------------------------------------------------------------------
>
> I have also tried the option --disable-openmp of configure.
> Same result.
> This must have something to do with the recent changes wrt openmp.
>
> What's going on and what could be done about this (if at all possible)?
The use of omp_get_wtime(), in gretl_utils.c, is conditional on
_OPENMP being defined. So it seems there are two things to look at
here:
1. At present, in CVS, openmp is used if the configure check for
its presence goes OK. In that case the compiler flag -fopenmp will
be added, in consequence _OPENMP should be defined, and the
symbol omp_get_wtime will be required. With gcc on Linux this
is handled automatically: the program is linked against libgomp.
Apparently it's not handled automatically on OS X; we'll have to
find out what's needed.
It seems to work for a small and simple program.
2. If you tell configure to "--disable-openmp", then it
seems to
me that the flag -fopenmp should not be added, _OPENMP should
therefore not be defined, and so the symbol omp_get_wtime should
not be required. What's going wrong with that? Can you check
lib/Makefile after configuring with --disable-openmp? There will
be a line
OMP_OPT =
and it should look as above, with nothing to the right of the
equals sign.
I checked and indeed it looks like OMP_OPT =
with nothing after the = sign.
I have recompiled Gretl cvs (again) with --disable-openmp and created a Gretl.app.
Gretl.app now just starts and runs. (as it should and as expected)
I haven't got a clue as to what went wrong in my previous attempt.
Well at least disable-openmp just works:-)
Thanks.
Question: what openmp option do you use for gretl cvs for the mac?
Berend