I want to access Cilk runtime information within the Cilk program.I want to know how many threads are created by Cilk runtime........Can any body help me?
By default, the runtime will create a number of workers equal to the number of cores in your computer. You can specify a different value with the environment variable: CILK_NPROC, or if you are using cilk_main(), you can specify the argument "-cilk_set_nworkers=n" on the command line.
cilk::current_worker_count() will tell you how many workers the runtime created.
I tried to use cilk:current_worker_count() in Intel Parallel studio and I got this error.
"cilk" has no member "current_worker_count"
Is this because the new CILK Plus take away this member from the cilk.h?
Do you know any replacement from the current cilk.h?
If you're using Intel Cilk Plus, which is part of the Intel C/C++ compiler, then the cilk:: class has been replaced by the API in cilk/cilk_api.h . The new function is
Since Intel Cilk Plus supports both C and C++, this is a simple global function. For example:
There is a document on converting an application from Cilk++ to Intel Cilk Plus at http://software.intel.com/en-us/articles/converting-a-cilk-arts-cilk-application-to-intel-cilk-plus/ .