Software Archive
Read-only legacy content

Cilk gcc

newport_j
Beginner
450 Views
I am assuming the the Cilk Arts version of gcc in


/INSTALLDIR/cilk/bin/ is the analogy Cilks Arts tool to gnu gcc.


However, I have a program that compiles perfectly under gnu gcc and not Cilk Arts gcc. Iam trying to compile some c source that I wish to speed up by paralellization.So for starters I tried to compile it under Cilk Artsgcc. I put it Cilk Arts gcc first in my path so gcc in the INSTALLDIR/cilk/bin/ would be used not gnu c.

However. it did not like it. The attached screenshot shows the error.

It game me a error about complex.h as you can see in the attched file.

It did not like the file complex .h. Now gnu gcc did like it. What did I do wrong so the Cilk Arts gcc did not like it.

I have attached the *.cilk source file so you can see where it is gaging.

Any help appreciated. Thanks in advance.

Newport_j
0 Kudos
7 Replies
BradleyKuszmaul
Beginner
450 Views
Intel Cilk is different from Cilk Arts Cilk and both are different from any of the MIT Cilk versions.
Here is good guide for converting from Cilk Arts Cilk to Intel Cilk.
0 Kudos
newport_j
Beginner
450 Views


That is good if your are using Intel Cilk++ and someday I hope to be doing that. I am using Cilk Arts Cilk++ now. There is not much in their manual about their version of gcc. I am assuming that it is to be used when you want to paralellize c code.

That is what I want to know more about. My legacy code is in c. Anything else onCilk Arts gcc besides what is in the manual?

Any help appreciated. Thanks in advance.

newport_j
0 Kudos
BradleyKuszmaul
Beginner
450 Views
I used Cilk Arts Cilk for several projects, and it was fine. But it's not supported by anyone, so if you find a bug or need help, you are on your own.
I suggest you just use the modern version (either icc or get the version of gcc that Intel ported Intel Cilk into). Why not switch?
0 Kudos
Jim_S_Intel
Employee
450 Views

Off the top of my head, I would guess there is some usage in either "complex.h" or "WAFmathbase.h" that is supported by newer versions ofgcc, but not the Cilk++ version of gcc (which is now fairly out-of-date at this point)?

Asmentioned elsewhere, Cilk++ is no longerbeingupdated,since Intel Cilk Plusis available (both through icc, and gcc). So it may be easier in the long run for you to switch.
Cheers,

Jim

0 Kudos
newport_j
Beginner
450 Views


I used Intel's icc for about a week, but the compiler program using icc gave me different numericalanswers. All calculations are sequential in this targetprogram.

I have a very complex c program that I frankly know only about parts of it (that is okay I doubt if anyone knows all of it, it would take carrer to do so). The hotspots as it were are my area. This program was developed by the US Navy over a period of years. When you use a different compiler even one from Intel and the results are similar, but different it does not seem like a good idea to go with that compiler until you have a firm grasp of paralellism Cilk style. That is whyI am using Cilk Arts Cilk++.

I assume the Cilks Arts gcc is very close to the gnu gcc.When I compile the Cilks Arts gcc and the gnu gcc the the numerical output is the same.

I have a downloaded copy of Intel Cilk++, but have not used it much for the reasons above. I am too new and inexperienced to be comfortable with two different compilers giving different answers.

I also think and you and others have confirmed, that is is very straightforward to move programs from Cilk Arts the Intlel Cilk++.

I really want to use the Intel Cilk++, but for the reasons above I do not. I believe that oncethe programis working on aCilk Arts Cilk++ then it will be easy to move to Intel Cilk++.

Newport_j




0 Kudos
TimP
Honored Contributor III
450 Views
If your results differ significantly among compilers, you should at least consider the consequences of your choice of compile options. If you require double evaluation of float expressions, plus observation of parentheses, and IEEE divide, sqrt and gradual underflow, for example, icc -fp-model double might be tried. Such options are likely to be relatively slow executing. Needless to say, more specificity about your requirements, or at least about your gcc architecture and options, might be helpful.
0 Kudos
Barry_T_Intel
Employee
450 Views
Both Cilk Arts Cilk++ and Intel Cilk++ for Linux are based on versions gcc. I don't recall exactly which versions. The Open Source implementation of Cilk Plus is also gcc based. I believe that's based on gcc 4.7.

Intel Cilk Plus (icc) is a completely separatecompiler.

- Barry
0 Kudos
Reply