Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

No parallelism with cilk++ on AMD 64 bit

pkroy
Beginner
558 Views
Hi,

Recently, I build the programs written in cilk++ on AMD, 64 bit Linux.
The program compiles well, i use -m32 to get the 32 bit version. I use gcc-4.2, and g++-4.2.
But I do not get any parallelism, i.e -cilk_set_worker_count switch has no effect, it seems that cilk++ compiler is not able to pick up the number of cores available ...

On the other hand, I compile the same programs on intel 32 bit Linux using same gcc-4.2 and g++-4.2 version. In this case, I build my program once again in this machine and I do get a speedup, and the switch
-cilk_set_worker_count seems to work.

In both the case, I try to build on same libraries, only difference is that one is 64 bit with 32 bit output and the later one is 32 bit.

My question is : Is it possible for Cilk++ compiler to be unaware of the number of cores and if yes when does it happen ?


Thanks in advance !
Pawan
0 Kudos
3 Replies
jimdempseyatthecove
Honored Contributor III
558 Views
Does a trivial OpenMP app obtain multiple threads?

If not, then the system may be configured to limit the number of threads a process can spawn (1 thread total).
or
If not, environment variable might limit/disable threading
or
If not, you might be linking in the OpenMP stubs

The above relates to OpenMP

Cilk++ may have similar issues (check for options that my link with stubs)

Jim
0 Kudos
pkroy
Beginner
558 Views
I have a similar program written in Cilk++ which scales very well...
I compiled this program on my laptop and then ran this on a multicore machine by linking the executable with cilk dynamic library.

But recently, I have compiled on the multicore machine itself, and the program does not read the number of cores.

Is it that for a cilk++ compilation one must have a specific version of gcc and linker ??

Thanks,
Pawan
0 Kudos
TimP
Honored Contributor III
558 Views
You may get more knowledgeable answers by asking about Cilk on the forum which is dedicated to that product.
0 Kudos
Reply