Closed abaillod closed 1 year ago
Hi Antoine! Could you try conda install boost
? Does it help compile SIMSOPT afterwords?
Hi Rogerio! Thank you for answering.
I tried, but I still get the same error. Another thing I tried is to compile manually with cmake
- going into a fresh build
directory, I do ccmake ..
, and then press c
to configure. I then get many information about the Makefile - the part related to boost
is:
Boost_DIR */misc/anaconda3/envs/simsopt/lib/cmake/Boost-1.80.0
Boost_INCLUDE_DIR */misc/anaconda3/envs/simsopt/include
It seems to me that cmake
finds the correct boost
path; nevertheless, after generating the Makefile
, running make
I get:
(simsopt) abaillod@spcpc602:~/simsopt/build> make
[ 4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[ 8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 12%] Linking CXX static library libfmt.a
[ 12%] Built target fmt
[ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o
[ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o
[ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o
[ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o
[ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o
[ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o
[ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o
[ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o
[ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o
[ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o
[ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o
[ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o
[ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o
[ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o
[ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o
[ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o
[ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o
[ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
/home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory
19 | #include <boost/math/tools/roots.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Which is really weird; manually, I find the boost
library at
(simsopt) abaillod@spcpc602:~/simsopt/build> ls /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp
/misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp
Is there another environment variable I am unaware of that might be causing the trouble?
Uninstall boost in anaconda and try
Bharat Medasani
Engineer Princeton Plasma Physics Lab (PPPL)
On Thu, Apr 6, 2023 at 7:58 AM abaillod @.***> wrote:
Hi Rogerio! Thank you for answering.
I tried, but I still get the same error. Another thing I tried is to compile manually with cmake - going into a fresh build directory, I do ccmake .., and then press c to configure. I then get many information about the Makefile - the part related to boost is:
Boost_DIR /misc/anaconda3/envs/simsopt/lib/cmake/Boost-1.80.0 Boost_INCLUDE_DIR /misc/anaconda3/envs/simsopt/include
It seems to me that cmake finds the correct boost path; nevertheless, after generating the Makefile, running make I get:
(simsopt) @.:~/simsopt/build> make [ 4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o [ 8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o [ 12%] Linking CXX static library libfmt.a [ 12%] Built target fmt [ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o [ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o [ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o [ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o [ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o [ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o [ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o [ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o [ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o [ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o [ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o [ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o [ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o [ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o [ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o [ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o [ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o [ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o /home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory 19 | #include <boost/math/tools/roots.hpp> | ^
~~~~~~~ compilation terminated. make[2]: [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2 make: [Makefile:91: all] Error 2Which is really weird; manually, I find the boost library at
(simsopt) @.***:~/simsopt/build> ls /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp /misc/anaconda3/envs/simsopt/include/boost/math/tools/roots.hpp
Is there another environment variable I am unaware of that might be causing the trouble?
— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/simsopt/issues/298#issuecomment-1498948597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEGKPCP6RHEPKLBAK7LW72VVLANCNFSM6AAAAAAWS3USNA . You are receiving this because you were assigned.Message ID: @.***>
Hi Bharat,
I still get the same error (both with the pip install .
and the cmake
compilation). This might be useful to find the problem:
(simsopt) abaillod@spcpc602:~/simsopt/build> conda info --all --verbose --verbose
DEBUG conda.gateways.logging:set_verbosity(236): verbosity set to 2
active environment : simsopt
active env location : /misc/anaconda3/envs/simsopt
shell level : 1
user config file : /home/abaillod/.condarc
populated config files : /home/abaillod/.condarc
conda version : 4.13.0
conda-build version : 3.21.8
python version : 3.9.12.final.0
virtual packages : __linux=5.14.21=0
__glibc=2.31=0
__unix=0=0
__archspec=1=x86_64
base environment : /misc/anaconda3 (writable)
conda av data dir : /misc/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /misc/anaconda3/pkgs
/home/abaillod/.conda/pkgs
envs directories : /misc/anaconda3/envs
/home/abaillod/.conda/envs
platform : linux-64
user-agent : conda/4.13.0 requests/2.27.1 CPython/3.9.12 Linux/5.14.21-150400.24.46-default opensuse-leap/15.4 glibc/2.31
UID:GID : 137447:12021
netrc file : None
offline mode : False
# conda environments:
#
base /misc/anaconda3
backup1 /misc/anaconda3/envs/backup1
desc /misc/anaconda3/envs/desc
descur /misc/anaconda3/envs/descur
simsopt * /misc/anaconda3/envs/simsopt
simsopt_save /misc/anaconda3/envs/simsopt_save
spec_analyze /misc/anaconda3/envs/spec_analyze
spec_dev /misc/anaconda3/envs/spec_dev
spec_env /misc/anaconda3/envs/spec_env
test /misc/anaconda3/envs/test
vmec /misc/anaconda3/envs/vmec
sys.version: 3.9.12 (main, Apr 5 2022, 06:56:58)
[G...
sys.prefix: /misc/anaconda3
sys.executable: /misc/anaconda3/bin/python
conda location: /misc/anaconda3/lib/python3.9/site-packages/conda
conda-build: /misc/anaconda3/bin/conda-build
conda-content-trust: /misc/anaconda3/bin/conda-content-trust
conda-convert: /misc/anaconda3/bin/conda-convert
conda-debug: /misc/anaconda3/bin/conda-debug
conda-develop: /misc/anaconda3/bin/conda-develop
conda-env: /misc/anaconda3/bin/conda-env
conda-index: /misc/anaconda3/bin/conda-index
conda-inspect: /misc/anaconda3/bin/conda-inspect
conda-metapackage: /misc/anaconda3/bin/conda-metapackage
conda-pack: /misc/anaconda3/bin/conda-pack
conda-render: /misc/anaconda3/bin/conda-render
conda-repo: /misc/anaconda3/bin/conda-repo
conda-server: /misc/anaconda3/bin/conda-server
conda-skeleton: /misc/anaconda3/bin/conda-skeleton
conda-token: /misc/anaconda3/bin/conda-token
conda-verify: /misc/anaconda3/bin/conda-verify
user site dirs: ~/.local/lib/python3.6
~/.local/lib/python3.9
CIO_TEST: <not set>
CMAKE_PREFIX_PATH: /misc/anaconda3/envs/simsopt:/misc/anaconda3/envs/simsopt/x86_64-conda-linux-gnu/sysroot/usr
CONDA_BACKUP_ADDR2LINE: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-addr2line
CONDA_BACKUP_AR: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ar
CONDA_BACKUP_AS: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-as
CONDA_BACKUP_BUILD: x86_64-conda-linux-gnu
CONDA_BACKUP_CC: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cc
CONDA_BACKUP_CC_FOR_BUILD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cc
CONDA_BACKUP_CFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CMAKE_PREFIX_PATH: /misc/anaconda3/envs/simsopt2:/misc/anaconda3/envs/simsopt2/x86_64-conda-linux-gnu/sysroot/usr
CONDA_BACKUP_CONDA_BUILD_SYSROOT: /misc/anaconda3/envs/simsopt2/x86_64-conda-linux-gnu/sysroot
CONDA_BACKUP_CONDA_TOOLCHAIN_BUILD: x86_64-conda-linux-gnu
CONDA_BACKUP_CONDA_TOOLCHAIN_HOST: x86_64-conda-linux-gnu
CONDA_BACKUP_CPP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-cpp
CONDA_BACKUP_CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt2/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt2/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/spec/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/spec/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CXX: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++
CONDA_BACKUP_CXXFILT: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++filt
CONDA_BACKUP_CXXFLAGS: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_CXX_FOR_BUILD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-c++
CONDA_BACKUP_DEBUG_CFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_CPPFLAGS: -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt2/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt2/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/spec/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/spec/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include -D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_CXXFLAGS: -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt2/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_FFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_DEBUG_FORTRANFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_ELFEDIT: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-elfedit
CONDA_BACKUP_F77: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_F90: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_F95: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-f95
CONDA_BACKUP_FC: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_FC_FOR_BUILD: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_FFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_FORTRANFLAGS: -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/spec/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /misc/anaconda3/envs/simsopt/include
CONDA_BACKUP_GCC: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc
CONDA_BACKUP_GCC_AR: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-ar
CONDA_BACKUP_GCC_NM: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-nm
CONDA_BACKUP_GCC_RANLIB: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gcc-ranlib
CONDA_BACKUP_GFORTRAN: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-gfortran
CONDA_BACKUP_GPROF: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-gprof
CONDA_BACKUP_GXX: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-g++
CONDA_BACKUP_HOST: x86_64-conda-linux-gnu
CONDA_BACKUP_LD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ld
CONDA_BACKUP_LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt2/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt2/lib -L/misc/anaconda3/envs/simsopt2/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt2/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt2/lib -L/misc/anaconda3/envs/simsopt2/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/spec/lib -Wl,-rpath-link,/misc/anaconda3/envs/spec/lib -L/misc/anaconda3/envs/spec/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/spec/lib -Wl,-rpath-link,/misc/anaconda3/envs/spec/lib -L/misc/anaconda3/envs/spec/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/misc/anaconda3/envs/simsopt/lib -Wl,-rpath-link,/misc/anaconda3/envs/simsopt/lib -L/misc/anaconda3/envs/simsopt/lib
CONDA_BACKUP_LD_GOLD: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ld.gold
CONDA_BACKUP_MESON_ARGS: --buildtype release
CONDA_BACKUP_NM: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-nm
CONDA_BACKUP_OBJCOPY: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-objcopy
CONDA_BACKUP_OBJDUMP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-objdump
CONDA_BACKUP_RANLIB: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-ranlib
CONDA_BACKUP_READELF: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-readelf
CONDA_BACKUP_SIZE: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-size
CONDA_BACKUP_STRINGS: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-strings
CONDA_BACKUP_STRIP: /misc/anaconda3/envs/simsopt2/bin/x86_64-conda-linux-gnu-strip
CONDA_BACKUP__CONDA_PYTHON_SYSCONFIGDATA_NAME: _sysconfigdata_x86_64_conda_cos6_linux_gnu
CONDA_BACKUP_build_alias: x86_64-conda-linux-gnu
CONDA_BACKUP_host_alias: x86_64-conda-linux-gnu
CONDA_BUILD_SYSROOT: /misc/anaconda3/envs/simsopt/x86_64-conda-linux-gnu/sysroot
CONDA_DEFAULT_ENV: simsopt
CONDA_EXE: /misc/anaconda3/bin/conda
CONDA_PREFIX: /misc/anaconda3/envs/simsopt
CONDA_PROMPT_MODIFIER: (simsopt)
CONDA_PYTHON_EXE: /misc/anaconda3/bin/python
CONDA_ROOT: /misc/anaconda3
CONDA_SHLVL: 1
CONDA_TOOLCHAIN_BUILD: x86_64-conda-linux-gnu
CONDA_TOOLCHAIN_HOST: x86_64-conda-linux-gnu
CURL_CA_BUNDLE: <not set>
MANPATH: /usr/local/man:/usr/local/share/man:/usr/share/man
MODULEPATH: /usr/share/modules:/usr/share/Modules/$MODULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/local/Modules/modulefiles
PATH: /misc/anaconda3/bin:/misc/anaconda3/envs/simsopt/bin:/misc/anaconda3/condabin:/home/abaillod/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin:/misc/anaconda3/envs/simsopt/include
PYTHONSTARTUP: /etc/pythonstart
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session1
XNLSPATH: /usr/share/X11/nls
Is it a Mac? Or linux?
Linux
Can you please post the output error after removing boost from conda?
(simsopt) abaillod@spcpc602:~/simsopt/build> conda remove boost
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.13.0
latest version: 23.3.1
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /misc/anaconda3/envs/simsopt
removed specs:
- boost
The following packages will be REMOVED:
boost-1.80.0-py39h7c9e3ff_4
boost-cpp-1.80.0-h75c5d50_0
icu-70.1-h27087fc_0
Proceed ([y]/n)?
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(simsopt) abaillod@spcpc602:~/simsopt/build>
(simsopt) abaillod@spcpc602:~/simsopt/build>
(simsopt) abaillod@spcpc602:~/simsopt/build>
(simsopt) abaillod@spcpc602:~/simsopt/build>
(simsopt) abaillod@spcpc602:~/simsopt/build> rm -r *
(simsopt) abaillod@spcpc602:~/simsopt/build> cmake ..
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /misc/anaconda3/envs/simsopt/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: /misc/anaconda3/envs/simsopt/bin/python3.9 (found suitable version "3.9.16", minimum required is "3") found components: Interpreter Development.Module NumPy
statusPython executable is /misc/anaconda3/envs/simsopt/bin/python3.9
statusPython Development Module found value is TRUE
statusPython header dirs are /misc/anaconda3/envs/simsopt/include/python3.9
statusPython library dirs are
statusPython version is 3.9.16
-- Submodule update
-- Local build detected. Set compilation flags accordingly (march=native).
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
-- Conda prefix is /misc/anaconda3/envs/simsopt
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found Boost: /usr/include (found suitable version "1.66.0", minimum required is "1.60.0")
-- Boost version is 1.66.0
-- Boost include dirs are /usr/include
-- pybind11 v2.6.2 dev1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Version: 7.1.4
-- Build type:
-- CXX_STANDARD: 11
-- Performing Test has_std_11_flag
-- Performing Test has_std_11_flag - Success
-- Performing Test has_std_0x_flag
-- Performing Test has_std_0x_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for strtod_l
-- Looking for strtod_l - not found
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/abaillod/simsopt/build
(simsopt) abaillod@spcpc602:~/simsopt/build> make
[ 4%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[ 8%] Building CXX object thirdparty/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 12%] Linking CXX static library libfmt.a
[ 12%] Built target fmt
[ 16%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python.cpp.o
[ 20%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_surfaces.cpp.o
[ 24%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_curves.cpp.o
[ 28%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_magneticfield.cpp.o
[ 32%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_tracing.cpp.o
[ 36%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/python_distance.cpp.o
[ 40%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_py.cpp.o
[ 44%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/biot_savart_vjp_py.cpp.o
[ 48%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/regular_grid_interpolant_3d_py.cpp.o
[ 52%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curve.cpp.o
[ 56%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curverzfourier.cpp.o
[ 60%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/curvexyzfourier.cpp.o
[ 64%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surface.cpp.o
[ 68%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacerzfourier.cpp.o
[ 72%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/surfacexyzfourier.cpp.o
[ 76%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/dommaschk.cpp.o
[ 80%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/reiman.cpp.o
[ 84%] Building CXX object CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o
/home/abaillod/simsopt/src/simsoptpp/tracing.cpp:19:10: fatal error: boost/math/tools/roots.hpp: No such file or directory
19 | #include <boost/math/tools/roots.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/simsoptpp.dir/build.make:314: CMakeFiles/simsoptpp.dir/src/simsoptpp/tracing.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/simsoptpp.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
You have the system installed boost. Can you uninstall that one too?
Not easily, although applying the following patch to the CMakeLists.txt
seems to work
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb37a56f..ff7e6424 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(simsoptpp)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+set(FORCE_DOWNLOAD_BOOST ON)
set(Python_FIND_STRATEGY LOCATION)
find_package(Python 3 COMPONENTS Interpreter Development.Module NumPy)
@@ -56,7 +57,12 @@ if(DEFINED ENV{CONDA_PREFIX})
endif()
find_package(OpenMP)
-find_package(Boost 1.60.0)
+if(NOT FORCE_DOWNLOAD_BOOST)
+ find_package(Boost 1.60.0)
+else()
+ set(Boost_FOUND FALSE)
+endif()
+
if(Boost_FOUND)
message(STATUS "Boost version is ${Boost_VERSION_STRING}")
message(STATUS "Boost include dirs are ${Boost_INCLUDE_DIRS}")
Is it resolved? I found it useful to explicitly add the conda include directory in the CXX flags: i.e. modify the line
set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast)
to
set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast -I$ENV{CONDA_PREFIX}/include")
in CMakeLists.txt
.
The problem is solved if I force the download of boost (see previous comment). @mbkumar is this something that would be useful in the master branch? Maybe implemented in a better (more robust) way?
I am not sure your fix @lionjo would work for me, as I am working in a conda environment. Thanks for your help though!
We have not found any issues with Boost so far. If I encounter more issues, I'll make downloading the default option instead of searching for an installed version.
Bharat Medasani
Engineer Princeton Plasma Physics Lab (PPPL)
On Thu, Apr 6, 2023 at 10:45 AM abaillod @.***> wrote:
The problem is solved if I force the download of boost (see previous comment). @mbkumar https://github.com/mbkumar is this something that would be useful in the master branch? Maybe implemented in a better (more robust) way?
I am not sure your fix @lionjo https://github.com/lionjo would work for me, as I am working in a conda environment. Thanks for your help though!
— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/simsopt/issues/298#issuecomment-1499182398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEA54DRWFAWUVUNRDWDW73JHRANCNFSM6AAAAAAWS3USNA . You are receiving this because you were mentioned.Message ID: @.***>
Hi,
I have some difficulties compiling the latest version of simsopt on my computer within an anaconda environment. What I did:
which fails with the following error message:
It seems that my compiler does not find the
boost
library path... I don't know how to fix this issue!Any help would be appreciated. Thank you!