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

-march=native option not supported on powerpc #216

Closed
lee218llnl opened this issue Jun 7, 2017 · 5 comments
Closed

-march=native option not supported on powerpc #216

lee218llnl opened this issue Jun 7, 2017 · 5 comments

Comments

@lee218llnl
Copy link

It looks like mfem's build system automatically sets -march=native for the GNU compilers. However, this is an x86-specific option and give an error on PowerPC systems:

'''[lee218@ray23:Crandom]$ uname -a
Linux ray23 3.10.0-514.2.2.2chaos.ch6.ppc64le #1 SMP Wed Jan 11 16:59:26 PST 2017 ppc64le ppc64le ppc64le GNU/Linux
[lee218@ray23:blueos_3_ppc64le_ib]$ gcc -march=native -Q --help=target
gcc: error: unrecognized command line option '-march=native'
'''

Here are a few relevant links:

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options

Can the build system be updated such that -march=native is only set when building for x86?

@v-dobrev
Copy link
Member

v-dobrev commented Jun 7, 2017

I believe on PowerPC you can use -mcpu=native -mtune=native instead. The options in that makefile (miniapps/performance/makefile) are meant to be just an illustration for the specific case of GCC compiler and Intel processor.

@lee218llnl
Copy link
Author

The problem that I see is that this option is not just an illustration, it is actually set and will be thrown at g++ by default. That said, no one will be able to just download mfem and build it on PowerPC without tripping on this error and having to modify the makefile. My suggestion here is to not set this option for all g++ invocations, either removing it entirely or only setting it when run on x86.

@tzanio
Copy link
Member

tzanio commented Jun 8, 2017

@lee218llnl, please see and comment on PR #219.

@tzanio tzanio removed the bug label Jun 8, 2017
@lee218llnl
Copy link
Author

#219 looks good to me, thanks!

@tzanio tzanio added the in-next label Jun 8, 2017
@tzanio
Copy link
Member

tzanio commented Jun 21, 2017

Resolved by cbb74a9.

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

No branches or pull requests

3 participants