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

Error on ppc from gcc flag march=native #2146

Closed
raminammour opened this issue Jun 14, 2023 · 4 comments · Fixed by #2174
Closed

Error on ppc from gcc flag march=native #2146

raminammour opened this issue Jun 14, 2023 · 4 comments · Fixed by #2174

Comments

@raminammour
Copy link
Contributor

Hello,

I am getting this error on ppc:
gcc -O3 -g -fPIC -Wall -std=c99 -march=native -Wno-unused-result -Wno-unused-variable -Wno-unused-but-set-variable -ffast-math -shared -fopenmp /tmp/devito-jitcache-uid280401/6ac5bd02be57b403f27b5b27c9ab6c7404ea091c.c -lm -o /tmp/devito-jitcache-uid280401/6ac5bd02be57b403f27b5b27c9ab6c7404ea091c.so
gcc: error: unrecognized command line option ‘-march=native’; did you mean ‘-mcpu=native’?

It looks like this is common (Switch between -march=native (x86) and -mcpu=native -mtune=native (PowerPC) ) and here is an example of how it is solved elsewhere, if it helps :)

mfem/mfem#219

Cheers!

@FabioLuporini
Copy link
Contributor

Ah, we do that with Clang but not with GCC:

https://github.com/devitocodes/devito/blob/master/devito/arch/compiler.py#L468-L470

Would you like to contribute a PR to fix this? patch goes around here:

https://github.com/devitocodes/devito/blob/master/devito/arch/compiler.py#L398

It's just a minor change, and should you decided to proceed, take a look here: https://github.com/devitocodes/devito/blob/master/CONTRIBUTING.md#making-changes

Thanks!

@raminammour
Copy link
Contributor Author

I submitted a PR, should not be too intrusive. I guess you are not testing on ppc regularly?

@FabioLuporini
Copy link
Contributor

Thanks a lot! Commented in PR, looking good

I guess you are not testing on ppc regularly?

We don't! I genuinely thought they weren't even around anymore :) Can I ask how/why you're finding yourself running on ppc?

@raminammour
Copy link
Contributor Author

I have the chagrin of dealing with an in-house ppc hpc system (I guess the other one still standing is SUMMIT). Devito is not the only code to drop support or support ppc at a lower tier, it is painful :)

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 a pull request may close this issue.

2 participants