number of CPU cores online in Jetson TK1

I used lscpu command to check how many CPU cores on Jetson board and it shows only one core is online the rest of 3 cpus are offline. Why is that? How to make all 4 cpus on-line?

Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0
Off-line CPU(s) list: 1-3
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1

Thanks,
Kaishi

In my experience, this behaviour is common to all of the embedded Linux distros on ARM processors.
The other CPUs will become “online” as soon as the scheduler has enough work that it feels it needs to wake them up. In my multithreaded codes, I’ve had to change the behavior of my thread pool logic so that on ARM platforms I ignore the number of CPUs online and instead spawn a number of threads equal to the number of physical CPUs. The scheduler will wake the other CPUs and start migrating threads to them, so that strategy works fine for my codes. The main problem is that many codes were written such that they check the number of “online” CPUs, which on big NUMA machines like the SGI Altix series was the better strategy. For these embedded platforms, just use the number of physical cores.

I am running an OpenMP application and utilizing 4 threads. Should this wake them up? Mine seem to still be offline.

Not a bug…see:

One thought on the OpenMP…this provides shared memory across platforms. 4 threads might mean a single thread on each platform, in which case no wake-up would occur. Try building a kernel with make -j4 to use 4 threads on the one host.

I highly recommend downloading htop source and running htop if you want to watch cpu loads.

I followed the link above and discovered how to disable the core power management and they are all enabled. However, are you saying it’s impossible to use MPI without the switch -j4?

OpenMP provides shared memory across machines. If one machine uses 4 threads, this will show on one machine as such…but if your OpenMP is arranged to distribute 4 threads across 4 machines, there will be only a single thread on each machine. When it is all on a single machine, there is no doubt where it is…don’t expect threads on other machines to show up on the one. Nobody here knows how many machines are involved, nor how the work load is distributed…shared memory in itself will not show as a process no matter how many threads are using it.

The -j4 example was just a way to guarantee 4 threads on a single machine…kernel compile does not use OpenMP.