Openpmd-api: spack install with gcc@>=9 fails because of a bug nlohmann/json (fixed for >3.5)

Created on 22 Aug 2019  路  6Comments  路  Source: openPMD/openPMD-api

spack install openpmd-api %[email protected]
fails at installing nlohmann/json with this.

This issue of json with gcc@>=9 was fixed, but spack's preferred version is 3.5.
When I manually set nlohmann-json version to 3.7, installation succeeds.

affects latest release bug install machinsystem third party

All 6 comments

Thank you for the detailed report and testing the new GCC compiler!
In your linked PR, this seams to be fixed in nlohmann-json 3.6 and newer. The problem only occurs while building its tests, which also is non-default in spack.

The following fixes address this:

yeah, i had a nasty experience of playing with update-initramfs -d (-c) after kernel-update in ubuntu screwed nvidia's xorg -- decided to make a fresh start with a new system, drivers and compilers 馃榿

Excellent choice :D Don't forget to compile with -mtune=native -march=native while rebuilding everything for speed ;)
All PRs are merged now. Please update your spack sources to see it in effect and feel free to close the issue if this solves it :)

checked 馃憣

by the way, @ax3l, in which context you suggest to use the flags exactly? Consider I have [email protected] built by spack (using default ubuntu's [email protected]), should I simply add

    flags:   
      cppflags: -mtune=native -march=native
      cflags: -mtune=native -march=native

to 9.2.0 part in .spack/linux/compilers.yaml?
Will it apply such optimization to everything built with [email protected] even outside spack (like if I do warpx from source) ? Or should I add

export CFLAGS="-mtune=native -march=native"
export CPPFLAGS="-mtune=native -march=native"

to my .bashrc?

Just joking a little, these flags will cause compiled binaries to be optimally tuned for the current platform it's compiling on. But you won't notice much on regular desktop applications. Adding those to spack's compilers.yaml only influences packages build with spack. If you compile outside of spack, use CFLAGS and CXXFLAGS (careful: CPPFLAGS is your pre-compiler, aka text replacements; same typo in first quote: use cxxflags instead). Yes, you can generally add this to .bashrc if you like, I usually add those manually during compile.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

titoiride picture titoiride  路  3Comments

ax3l picture ax3l  路  3Comments

C0nsultant picture C0nsultant  路  6Comments

ilomi picture ilomi  路  3Comments

pordyna picture pordyna  路  4Comments