Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTS: address warnings and enable -Werror #247

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Conversation

ckoparkar
Copy link
Member

Following #246, this PR cleans up warnings in the RTS.

Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terrific!

@ckoparkar ckoparkar enabled auto-merge (rebase) December 28, 2023 12:11
@ckoparkar ckoparkar merged commit cde71de into main Dec 28, 2023
@ckoparkar ckoparkar deleted the fix-RTS-warnings branch December 28, 2023 12:26
@ulysses4ever
Copy link
Collaborator

Interestingly, it now fails for me in the nix-shell:

[nix-shell:/mnt/data/artem/Dev/gibbon/gibbon-2]$ $g --run --packed --parallel sumtree.hs
codegen: C RTS could not be compiled: gcc -Wall -Wextra -Wpedantic -Wshadow -Werror -std=gnu11 -flto -D_GIBBON_VERBOSITY=1 -D_GIBBON_GENGC=0 -fcilkplus -D_GIBBON_PARALLEL -D_GIBBON_EAGER_PROMOTION=1 -D_GIBBON_SIMPLE_WRITE_BARRIER=0 -O3  -flto  -c -o /mnt/data/artem/Dev/gibbon/gibbon-2/gibbon-rts/rts-c/gibbon_rts.o /mnt/data/artem/Dev/gibbon/gibbon-2/gibbon-rts/rts-c/gibbon_rts.c

In file included from /mnt/data/artem/Dev/gibbon/gibbon-2/gibbon-rts/rts-c/gibbon_rts.c:4:0:
/mnt/data/artem/Dev/gibbon/gibbon-2/gibbon-rts/rts-c/gibbon_rts.h: In function 'gib_get_thread_id':
/mnt/data/artem/Dev/gibbon/gibbon-2/gibbon-rts/rts-c/gibbon_rts.h:358:12: error: implicit declaration of function '__cilkrts_get_worker_number' [-Werror=implicit-function-declaration]
     return __cilkrts_get_worker_number();
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

I can fix it by adding the cilk #include to the gibbon_rts.h but I wonder why it fails only for me...

@ulysses4ever ulysses4ever mentioned this pull request Jun 11, 2024
@ckoparkar
Copy link
Member Author

I suppose no one built with --parallel after this commit. Some of the tests should have triggered this?

@ulysses4ever
Copy link
Collaborator

Right, I'm surprised none of the tests caught it. I hope to look closer into tests...

@ulysses4ever
Copy link
Collaborator

I looked into test-gibbon-examples.yaml, and it only has three --parallel examples, e.g.

- name: Vector.hs
dir: examples/vectors
test-flags: ["--parallel"]
failing: [interp1]
answer-file: examples/vectors/Vector.hs.ans
# Cilk not supported on newer GCCs.
skip: true

All of them are skipped! Because... wait for it!

Cilk not supported on newer GCCs.

It would be great to figure something out about Cilk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants