general questions

general questions

Is there a way to get the serial elision of the Cilk c program? This was a nice option in Cilk Arts.

When and why do you underscore precedingcilk_spawn and cilk_for in Intel Cilk ? It seems that it is rare but at times the statements listed above must be precded by an underscore.

Any help appreciated.

Newport_j

5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

The icc command line option -cilk-serializemay do what you want.I agree that the extra underscore and the capitialization as in_Cilk_syncare an annoyance.

The keywords in Cilk Plusare _Cilk_spawn, _Cilk_sync, and _Cilk_for.

If you have included the followingfile:

#include

then you can write "cilk_spawn" instead of "_Cilk_spawn" (and similarly "cilk_sync" and "cilk_for").

This includefile contains preprocessor macros to make this work. If "cilk_spawn" (without the underscore)_ works in your code, then this file has probably already been included.
Cheers,

Jim

Hello,

in addition:

Setting $CILK_NWORKERS (environment variable) to "1" makes Intel Cilk Plus applications execute in a serialized way.
Alternatively you can set this variable to any (meaningful) amount of max. workers running in parallel.

Since this environment variable is evaluated during run-time you never need to recompile your application. By simply setting it before running the same binary it'll use the amount of workers specified.

Best regards,

Georg Zitzlsberger

The Intel Cilk Plus keywordnames follow C++ standards. Since Intel Cilk Plus is not part of the standard language, the keywords must have a leading "_" to prevent them from polluting the user namespace.

As others have pointed out, including cilk/cilk.h will define macros for the keywords to make them easier to type.

- Barry

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui