This is the proposed fix for the 32 cpu limit:
@@ -204,7 +204,7 @@
for ( uint8_t i = 0; i < ncpus; i++ )
{
// cpu mask
- if( (ncpus > 64) || ( mask & (1UL << i) ) ) CPU_SET( i, &set );
+ if( (ncpus > 64) || ( mask & (1ULL << i) ) ) CPU_SET( i, &set );
}
if ( id == -1 )
{
@@ -1690,9 +1690,9 @@
{
if (opt_debug)
applog( LOG_DEBUG, "Binding thread %d to cpu %d (mask %x)",
- thr_id, thr_id % num_cpus, ( 1 << (thr_id % num_cpus) ) );
+ thr_id, thr_id % num_cpus, ( 1ULL << (thr_id % num_cpus) ) );
- affine_to_cpu_mask( thr_id, 1 << (thr_id % num_cpus) );
+ affine_to_cpu_mask( thr_id, 1ULL << (thr_id % num_cpus) );
}
else if (opt_affinity != -1)
{