AstrOmatic forum
Error message of SkyMaker on MacBook Pro - Printable Version

+- AstrOmatic forum (https://www.astromatic.net/forum)
+-- Forum: AstrOmatic software (/forumdisplay.php?fid=3)
+--- Forum: SkyMaker (/forumdisplay.php?fid=19)
+--- Thread: Error message of SkyMaker on MacBook Pro (/showthread.php?tid=473)



Error message of SkyMaker on MacBook Pro - chyan - 08-04-2009 16:25

Hi,

I have compiled SkyMaker 3.3.3 and FFTW-3 3.2.2. However, I got an error message when I try to generate a simulated image with default configuration. Here is the error message.

----- SkyMaker 3.3.3 started on 2009-08-04 at 23:18:18 with 2 threads

Pupil range: 4.0-4125.3mm / Subsampling: 1X / ro=23.0cm / motion=0.00'' rms
> Adding 186 stars...

> *Error*: pthread_mutex_lock() failed for &addimagemutex

Is there anyone ever encounter this problem before?


RE: Error message of SkyMaker on MacBook Pro - Henry Joy McCracken - 08-04-2009 17:31

Hi,

Yes, I have seen this exact same problem. Threads don't work with skymaker on mac os X . The only way I have been able to get the program to work is by compiling with threads turned off.

cheers
henry


RE: Error message of SkyMaker on MacBook Pro - chyan - 08-05-2009 04:10

(08-04-2009 17:31)Henry Joy McCracken Wrote:  The only way I have been able to get the program to work is by compiling with threads turned off.

So, how should I do that? I have configured SkyMaker with "--enable-thread=0"? But it returns me Bus Error. Do you have installation instruction on Mac.

Chi-hung


RE: Error message of SkyMaker on MacBook Pro - Henry Joy McCracken - 08-05-2009 10:09

hi chi-hung,

I was able to compile skymaker-3.3.3 from the archive by doing ./configure --disable-threads

let me know if it works. I get the same error message as you do when I try to enable threads (and I am linking to the correct fftw library).

i guess you need to make sure it links with the correct version of libfftw3f .

cc -O3 -g -funroll-loops -fomit-frame-pointer -Wall -o sky alterimage.o fft.o galaxies.o image.o imaout.o list.o main.o makeit.o prefs.o psf.o random.o simul.o stars.o ../src/fits/libfits.a /usr/local/lib/libfftw3f.a -lm

cheers
henry


RE: Error message of SkyMaker on MacBook Pro - chyan - 08-06-2009 07:42

Hi Henry,

GREAT! I got it worked. Thanks a lot!

Cheers,
Chi-hung


RE: Error message of SkyMaker on MacBook Pro - thejll - 10-03-2009 16:57

Hi, I had the same "> *Error*: pthread_mutex_lock() failed for &addimagemutex" problem with skymaker under cygwin on Win/XP machine. The same advice helped, configure with threads disabled:

./configure --disable-threads

Thanks for the forum!

Cheers,

Peter Thejll
Denmark


RE: Error message of SkyMaker on MacBook Pro - Zhuoyi.Huang - 12-30-2011 03:40

Hi there,

I am using Snow Leopold (Mac OS X 10.6.8) and also had the same "mutex lock" problem using skymaker 3.3.3 when threads was enabled during configuration.

I looked into the code image.c and noticed that "addimagemutex" is declared but not initialized with pthread_mutex_init() (actually it is also not used, as far as I can see..). So I guess the built-in pthread library on Mac just complains (while on Ubuntu 11.04, the library is slient about it). Therefore I commented the following lines in image.c (in function add_image()) and get back the pthread feature of skymaker on Mac with --enable-threads in configuration.

/* #ifdef USE_THREADS */
/* QPTHREAD_MUTEX_LOCK(&addimagemutex); */
/* #endif */
...
/* #ifdef USE_THREADS */
/* QPTHREAD_MUTEX_UNLOCK(&addimagemutex); */
/* #endif */

Hope this helps, and please let me know if I am wrong.

Cheers,

Zhuoyi Huang


RE: Error message of SkyMaker on MacBook Pro - Emmanuel Bertin - 01-03-2012 21:41

Dear Zhuoyi Huang,

thanks! Note that this issue was fixed in revision 53 of the unstable version. You might want to download the development version of SkyMaker until it finds its way to the official version (will try to do that soon). Lots of other problems have been fixed too.
- Emmanuel.