Skip to content

Commit

Permalink
🐛 FIX: compilation on Docker (#11)
Browse files Browse the repository at this point in the history
On Docker the image should not be compiled to use the host's spec,
since it could be used on another platform
  • Loading branch information
chrisjsewell authored Mar 24, 2021
1 parent 88d8c13 commit 2d15cca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ abinit_executables:
plugin: abinit

# See https://docs.abinit.org/INSTALL_Ubuntu/
# see also options defined in abinit/config/specs/options.conf
abinit_config_options:
# mandatory libraries
# ("yes" means auto-detect or provide a direct path.)
Expand All @@ -36,6 +37,14 @@ abinit_config_options:
with_linalg_flavor: "netlib"
LINALG_LIBS: "-L/usr/lib/x86_64-linux-gnu -llapack -lblas"

# by default CFLAGS = CXXFLAGS = "-g -O2 -mtune=native -march=native"
# but for Docker we do not want to use the spec of the host machine
# (see https://stackoverflow.com/a/54163496/5033292)
with_optim_flavor: "{{ 'safe' if (cloud_platform is defined and cloud_platform == 'docker') else 'standard' }}"
# alternatively you could set:
# CFLAGS: "-g -O2"
# CXXFLAGS: "-g -O2"

abinit_tests:
# - atompaw
# - bigdft
Expand Down
1 change: 1 addition & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ provisioner:
all:
vars:
ansible_python_interpreter: /usr/bin/python3
cloud_platform: docker
run_tests: true
test_libxc: "${MOLECULE_LIBXC:-no}" # run marvel-nccr.libxc first

0 comments on commit 2d15cca

Please sign in to comment.