Chapel: `-march=native` unrecognized command line option on Summitdev (POWER architecture)

Created on 20 Sep 2018  路  9Comments  路  Source: chapel-lang/chapel

Summary of Problem

Failing to build Chapel programs on Summitdev (POWER architecture) using GCC 7.1.1. Compilation fails with error that -march=native is an unrecognized command line option. Chapel version is 1.17.1.

I understand from some Googling that -march=native is a x86-specific flag and ppc64 prefers -mcpu=native. Is there something I need to do during my Chapel install to fix this? Chapel picks up the CHPL_HOST_PLATFORM as linux_ppc_le64, which seems correct.

Steps to Reproduce

Compile command:
I installed Chapel as described in the "Using a more full-featured Chapel" part of the Chapel Quickstart guide, then attempted to compile a simple hello world Chapel program.

-bash-4.2$ isx hello.chpl --fast -o hello
gcc: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'?
gmake: *** [/tmp/chpl-b2v-159097.deleteme/isx.tmp] Error 1
error: compiling generated source

Configuration Information

  • Output of chpl --version:
-bash-4.2$ chpl --version
chpl version 1.17.1
Copyright (c) 2004-2018, Cray Inc.  (See LICENSE file for more details)
  • Output of $CHPL_HOME/util/printchplenv --anonymize:
-bash-4.2$ $CHPL_HOME/util/printchplenv --anonymize
CHPL_TARGET_PLATFORM: linux_ppc_le64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: intrinsics
CHPL_GMP: gmp
CHPL_HWLOC: hwloc
CHPL_REGEXP: re2
CHPL_AUX_FILESYS: none
  • Back-end compiler and version, e.g. gcc --version or clang --version:
-bash-4.2$ gcc --version
gcc (GCC) 7.1.1 20170718
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Portability user issue

All 9 comments

I'm observing the same behavior with Chapel 1.18.0.

As a quick workaround you should be able to set CHPL_TARGET_ARCH=none, and rebuild.

I think we had a similar issue with ARM (https://github.com/chapel-lang/chapel/pull/9013), @dmk42 could you take a look?

Thanks for pointing this out. I think it has similar roots to #10905 which I am also working on, so I will check this out.

@BenBrock: Thanks for reporting this. We haven't had a chance to try Chapel on Summit, and it's been years since we've last tried Chapel on a POWER-based system.

I see what the issue is. We've been assuming -march= is the normal case. That is only true for x86-based architectures. Everywhere else, -mcpu= should be used. I'll take care of that.

@BenBrock - Would you mind showing us the output of uname -m to make sure I catch your case?

Note that if you want to continue working with an official release, a workaround that wouldn't leave this performance on the floor would be to use Elliot's workaround and then throwing the appropriate -mcpu= flag via Chapel's --ccflags option (which specifies additional flags for the back-end compiler).

@dmk42 Here's my uname -a output.

-bash-4.2$ uname -a
Linux summitdev-login1 3.10.0-693.21.1.el7.ppc64le #1 SMP Fri Feb 23 14:02:56 EST 2018 ppc64le ppc64le ppc64le GNU/Linux

@bradcray Thanks! I'll do that.

I see what the issue is. We've been assuming -march= is the normal case. That is only true for x86-based architectures. Everywhere else, -mcpu= should be used. I'll take care of that.

@dmk42 - do you still plan to address this?

Yes

Was this page helpful?
0 / 5 - 0 ratings