Multiprocessor support: OpenMP problem in Core Audio thread
Multiprocessor support: OpenMP problem in Core Audio thread
- Subject: Multiprocessor support: OpenMP problem in Core Audio thread
- From: Dan <email@hidden>
- Date: Tue, 5 May 2009 22:31:57 +0100
Hi -
I was working on adding multiprocessor support to a piece of audio
software, by using OpenMP <http://www.openmp.org>. I can compile and
run OpenMP-enabled code fine - but *not* if the parallelised code is
in the Core Audio callback. If you add something like this, for
example:
#pragma omp parallel for
for(i=0; i<4; ++i){ // the iterations could occur on different cores
printf("%i\n", i);
}
...it will work fine in many cases, but will crash the app if in the
callback. The crash always looks something like this:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000028
Thread 13 Crashed:
0 libgomp.1.dylib 0x000129cc
gomp_resolve_num_threads + 76 (libgomp.h:380)
1 <<00000000>> 0xf070db60 0 + -261039264
2 libgomp.1.dylib 0x00012b34 GOMP_parallel_start +
48 (parallel.c:107)
So my question is: is there something about the way Core Audio works
that conflicts with what OpenMP does (namely, dynamically create
threads and distribute them across processors)? Is there any way you
can think of, that might allow the two to play nicely together?
Thanks in advance for any thoughts -
Dan
--
http://www.mcld.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden