Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
15 Views

Linking with cilk on OSX

On MAC OSX I link with

   -lcilkrts

 At runtime it seems to expect

    libcilkrts.5.dylib

but I had expected it would require

   libcilkrts.dylib

However, there is versioned and a nonversioned variants:

compilers_and_libraries_2016.1.111/mac//bin/intel64/libcilkrts.5.dylib

compilers_and_libraries_2016.1.111/mac//compiler/lib/libcilkrts.5.dylib

compilers_and_libraries_2016.1.111/mac//compiler/lib/libcilkrts.dylib

Have I misunderstood something?

 

 

0 Kudos
5 Replies
Highlighted
15 Views

It seems if I link with

-lcilkrts.5

and use 

libcilkrts.5.dylib

on runtime seems to work. 

 

 

 

 

 

0 Kudos
Highlighted
Employee
15 Views

It's been a while since I looked at this, but I believe that if you look at libcilkrts.dylib in an editor, you'll find that it is a linker script that pulls in libcilkrts.5.dylib. Unfortunately I don't have a Mac handy to check this.

0 Kudos
Highlighted
15 Views

To us it does not seem like linker script.

I guess my main point is linking with cilk is poorly documented. Yes, you can figure it it out and it is not too complicated but it would be nice with some official documentation.

Btw I really like cilk. And have written a quite bit code using it.

 

 

0 Kudos
Highlighted
15 Views

Can you try to load compiler environment before compiling your code as follows? The compiler driver should be automatically inserting the required linker flag, so users do not have to do it manually if environment variables are properly defined.

> source $TOP_DIR/bin/compilervars.sh intel64

$TOP_DIR is the top compiler installation directory.

0 Kudos
Highlighted
15 Views

I got my problem solved so that is fine. I seem to have gotten confirmed that things as I guessed they are.

I do not understand the purpose of the last reply. In any case I hate all those magic automatic stuff. You never knows how things interact with each other. Since we are selling software then we really wants to know exactly what is going on. So we want to be able set up the build environment ourselves so with 110% control over what is going.

 

 

 

 

0 Kudos