- Index
- » Users
- » chewabob
- » Profile
Posts
Posts
Page Start Prev 1 Next End
Hi,
I am a little bit confused about the c-code I generate with following options
Code:
setDebugFlags("hpcom hpcomDump"); getErrorString();
setCommandLineOptions("+n=5 +hpcomScheduler=mcp +hpcomCode=pthreads"); getErrorString();
Nevertheless the following OPENMP define is created in all c-files. However as far as I can see, OpenMP is used nowhere.
Code:
#define HPCOM
#if defined(HPCOM) && !defined(_OPENMP)
#error "HPCOM requires OpenMP or the results are wrong"
#endif
#if defined(_OPENMP)
#include <omp.h>
#else
/* dummy omp defines */
#define omp_get_max_threads() 1
#endif
pthreads are created as expected:
Code:
...
// number of threads: 5
static int finished; //set to 1 if the hpcom-threads should be destroyed
static pthread_t odeThread_0;
static pthread_t odeThread_1;
...
Also openmp compilerflag is activated in the makefile
Code:
CC=gcc -fopenmp
For me it is not clear why openmp is neccessary when using pthreads? Or is it a bug in the codegeneration template?
Thanks for help
Page Start Prev 1 Next End
- Index
- » Users
- » chewabob
- » Profile