Skip to content
Snippets Groups Projects
Commit 79e297b1 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix bug in queue assignment.

Former-commit-id: 7785c238d871b21c6056d4f55ccc1a2b1400437f
parent e39f6a63
Branches
Tags
No related merge requests found
...@@ -801,7 +801,7 @@ void engine_init ( struct engine *e , struct space *s , float dt , int nr_thread ...@@ -801,7 +801,7 @@ void engine_init ( struct engine *e , struct space *s , float dt , int nr_thread
#if defined(HAVE_SETAFFINITY) #if defined(HAVE_SETAFFINITY)
/* Set a reasonable queue ID. */ /* Set a reasonable queue ID. */
e->runners[k].qid = cpuid[ k ] * nr_queues / nr_threads; e->runners[k].qid = cpuid[ k ] * nr_queues / nr_cores;
/* Set the cpu mask to zero | e->id. */ /* Set the cpu mask to zero | e->id. */
CPU_ZERO( &cpuset ); CPU_ZERO( &cpuset );
...@@ -812,7 +812,7 @@ void engine_init ( struct engine *e , struct space *s , float dt , int nr_thread ...@@ -812,7 +812,7 @@ void engine_init ( struct engine *e , struct space *s , float dt , int nr_thread
error( "Failed to set thread affinity." ); error( "Failed to set thread affinity." );
#else #else
e->runners[k].qid = k % nr_queues; e->runners[k].qid = k * nr_queues / nr_threads;
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment