davidsd / sdpb

A semidefinite program solver for the conformal bootstrap.
MIT License
53 stars 42 forks source link

Missing mpfr.h file in compiling sdpb. #226

Closed cpherzog closed 5 months ago

cpherzog commented 5 months ago

I am having some trouble installing sdpb on a cluster (COSMA8 at Durham). At the last step, the ./waf command, everything seems to be working fine until this error message:

[198/213] Compiling test/src/unit_tests/cases/json.test.cxx In file included from ../src/sdpb_util/Boost_Float.hxx:5, from ../src/sdpb_util/Environment.cxx:3: ../../boost/include/boost/multiprecision/mpfr.hpp:22:10: fatal error: mpfr.h: No such file or directory 22 | #include | ^~~~ compilation terminated.

./waf then struggles on for several minutes, producing a lot of garbage on the screen until finally giving up with the statement

Waf: Leaving directory `/cosma8/data/dp328/dc-herz2/library/sdpb/build' Build failed -> task in 'sdpb_util' failed with exit status 1 (run with -v to display more information)

Earlier on,

./waf configure --boost-dir=$MYLIB/boost --mpfr-dir=$MYLIB/mpfr --mpfr-incdir=$MYLIB/mpfr/include --gmpxx-dir=$MYLIB/gmp --elemental-dir=$MYLIB/elemental/install --rapidjson-dir=$MYLIB/rapidjson --libarchive-dir=$MYLIB/libarchive --libxml2-incdir=$MYLIB/libxml2/include/libxml2/libxml --libxml2-libdir=$MYLIB/libxml2/lib --flint-dir=$MYLIB/flint

produced

Setting top to : /cosma8/data/dp328/dc-herz2/library/sdpb Setting out to : /cosma8/data/dp328/dc-herz2/library/sdpb/build Checking for 'g++' (C++ compiler) : mpicxx Checking for C++17 features : yes Checking for Boost : yes Checking for boost_stacktrace_backtrace : no Checking for boost_stacktrace_addr2line : yes Checking for GMPXX : yes Checking for MPFR : yes Checking for Elemental : yes Checking for libxml2 : yes Checking for rapidjson : yes Checking for libarchive : yes Checking for flint : yes Checking for CBLAS : yes 'configure' finished successfully (10.074s)

I'm not sure whether to be worried about the missing boost_stacktrace_backtrace, or whether the later failure of ./waf is a different issue. Having installed mpfr in a different directory, I'm puzzled why ./waf is looking for mpfr in the boost directories.

cpherzog commented 5 months ago

Okay, by hand I modified the CPATH using

export CPATH=path/to/mpfr/include:$CPATH

and then sdpb compiled apparently correctly although with pages of various warnings like the following

../src/sdpb_util/assert.hxx:46:14: warning: comparison of integer expressions of different signedness: ‘std::vector::size_type’ {aka ‘long unsigned int’} and ‘El::Int’ {aka ‘int’} [-Wsign-compare]