Optional compile flags
See original GitHub issueIn response to #920, and following the discussion in #949, we need some way to make the compile flags optional during setup. The -march=native
is the probable cause of issues with the conda-forge build #647, and also causes problems for some installing in a cluster environment.
However, for most people installing on a local machine, -march=native
is likely to have significant performance advantages. The suggestion is then to have some cmd line option to choose compile flags where the default is ‘optimal’, which would include -march=native
.
@Ericgig we can discuss this next week
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
CPP/C++ Compiler Flags and Options
cpp c++ compiler flags command line options. ... This option is better for incremental compilation when using multiple files.
Read more >Option Summary (Using the GNU Compiler Collection (GCC))
Here is a summary of all the options, grouped by type. Explanations are in the following sections. Overall Options. See Options Controlling the...
Read more >Recommended compiler and linker flags for GCC
This article walks through a list of recommended build flags for when you compile your C or C++ programs with GCC. Do you...
Read more >The Best and Worst GCC Compiler Flags For Embedded
In this article we will explore some of the best and worst compiler flags for GCC (and Clang). Our focus will be on...
Read more >cc Compiler Options - Oracle Help Center
The following table summarizes the cc compiler options by functionality. ... -flags. Prints a brief summary of each available compiler option.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I might oppose to the fact that it should be default. The reason is that majority of people don’t read the documentation and don’t know what “segfault: illegal instruction” means. It might better to note somewhere that
CFLAGS="-march=native" pip install qutip
will lead to 30% increased performance in certain scenarios.For future posterity: we simply can never issue
-march=native
commands to build wheels for distribution via pip or conda; we have to have these appeal to the lowest common denominator instruction set. We have hard-coded SSE2 instructions inzspmv.cpp
, but these are ancient, and that’s probably the baseline we need to support at least for now (it’s been working without issue for a few years now). Computing clusters don’t have the latest and greatest hardware, but usually are just a weird amalgam of other bits.The CFLAGS changes were merged already, so I’m closing this now.