opencilk / cheetah Goto Github PK
View Code? Open in Web Editor NEWSource for the OpenCilk runtime system, based on Cheetah.
License: Other
Source for the OpenCilk runtime system, based on Cheetah.
License: Other
I am trying to build the cheetah runtime and on the cmake --build .
step I get the following log:
CMakeFiles/cheetah_shared.dir/closure.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: multiple definition of `cilkrts_zero'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: first defined here
CMakeFiles/cheetah_shared.dir/fiber.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/init.h:12: multiple definition of `cilkg_nproc'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.c:17: first defined here
CMakeFiles/cheetah_shared.dir/global.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/init.h:12: multiple definition of `cilkg_nproc'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.c:17: first defined here
CMakeFiles/cheetah_shared.dir/init.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/init.h:12: multiple definition of `cilkg_nproc'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.c:17: first defined here
CMakeFiles/cheetah_shared.dir/invoke-main.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/init.h:12: multiple definition of `cilkg_nproc'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.c:17: first defined here
CMakeFiles/cheetah_shared.dir/invoke-main.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: multiple definition of `cilkrts_zero'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: first defined here
CMakeFiles/cheetah_shared.dir/personality.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: multiple definition of `cilkrts_zero'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: first defined here
CMakeFiles/cheetah_shared.dir/reducer_impl.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/init.h:12: multiple definition of `cilkg_nproc'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.c:17: first defined here
CMakeFiles/cheetah_shared.dir/ZERO.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: multiple definition of `cilkrts_zero'
CMakeFiles/cheetah_shared.dir/cilk2c.c.o:/home/giannis/cilk/opencilk-project/cheetah/runtime/cilk2c.h:8: first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [runtime/CMakeFiles/cheetah_shared.dir/build.make:354: lib64/libopencilk.so.1.0] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:323: runtime/CMakeFiles/cheetah_shared.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
Any ideas on how to fix this?
Something I've noticed happens in all hand-compiled tests is the following line, right before the definition of a __cilkrts_stack_frame
:
dummy(alloca(ZERO));
Why is this required? I'm guessing it's maintaining some invariant of the stack pointer, but I'm not sure why exactly. I'm trying to understand it as I work on my own hand-compiled code for the loop frame code.
Using make, the first parallel build of OpenCilk often fails because of a missing dependency:
ld: error: cannot open /usr/obj/Cilk/17/lib/clang/17/lib/freebsd/libclang_rt.asan_static-x86_64.a: No such file or directory
*** [/usr/obj/Cilk/17/lib/clang/17/lib/x86_64-unknown-freebsd13.2/libopencilk-asan-personality-c.so.1.0] Error code 1
This might happen more than once if all builds are parallel. Running make -k builds libclang_rt.asan_static and the next build will succeed. A serial build, make -j1, will also succeed.
My CmakeCache.txt says the runtime components appear in the order compiler-rt;cheetah;cilktools.
I ran into the following error message:
/usr/bin/ld.gold: error: hidden symbol 'get_workerwarn_msg' is not defined locally
After removing lines https://github.com/OpenCilk/cheetah/blob/release/runtime/cilk2c.c#L56-L61, the error went away and I was able to compile without issues.
Minor issue, but just wanted to report this in case anyone else runs into similar problems.
I am unable to initialize the runtime when building/running using WSL (WIndows Subsystem for Linux).
Functional workaround seems to be to remove MAP_GROWSDOWN from the flags to mmap. I did not attempt to do any performance testing or any significant correctness tests however.
Details:
Basic programs (fib) fail with errno code 95, which is an unsupported operation, at the following line that calls mmap.
Line 210 in 832aeeb
The MAP_GROWSDOWN flag seems to be unsupported on my test machine.
Building OpenCilk using WSL2 with Linux version Ubuntu 20.04.3 LTS. (Windows 10 build, 19043.1466)
I couldn't find any obvious documentation to indicate whether this is expected behavior for WSL Linux or not, so it might be a gap in the WSL implementation? TBD.
We have a user request for a function to get the worker number, usable as an array index, but it's really a request for worker local storage.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.