MadSpace requires C++20, which is available in, e.g., GCC 14.
In a host where /usr/bin/gcc defaults to a version that does not support C++20, e.g, GCC 11.3, and where GCC 14 is still the path-preferred (can be checked with which gcc) but it's not in /usr/bin/gcc, the installation of MadSpace through the MadGraph prompt fails if some environment variables are not set.
Those environment variables are, for example:
CC, to be pointed to correct gcc executable
CXX, to be pointed to correct g++ executable
CUDAHOSTCXX to be pointed to correct g++ executable (relevant only if building CUDA backend)
NVCC_CCBIN to be pointed to correct g++ executable (relevant only if building CUDA backend)
- I assume in case one wants to build HIP backend, there would be other variables.
The weird thing is that if MadSpace is installed externally using pip (which is what the install command is wrapping around) from the command line, the installation goes through, so the compiler is picked up without issues.
I wonder if MadGraph is automatically setting the env variables to point to /usr/bin/gcc, /usr/bin/g++
MadSpace requires C++20, which is available in, e.g., GCC 14.
In a host where
/usr/bin/gccdefaults to a version that does not support C++20, e.g, GCC 11.3, and where GCC 14 is still the path-preferred (can be checked withwhich gcc) but it's not in/usr/bin/gcc, the installation of MadSpace through the MadGraph prompt fails if some environment variables are not set.Those environment variables are, for example:
CC, to be pointed to correctgccexecutableCXX, to be pointed to correctg++executableCUDAHOSTCXXto be pointed to correctg++executable (relevant only if building CUDA backend)NVCC_CCBINto be pointed to correctg++executable (relevant only if building CUDA backend)The weird thing is that if MadSpace is installed externally using
pip(which is what theinstallcommand is wrapping around) from the command line, the installation goes through, so the compiler is picked up without issues.I wonder if MadGraph is automatically setting the env variables to point to
/usr/bin/gcc,/usr/bin/g++