Closed plancherb1 closed 3 years ago
Have you checked the complete make log. With make -j4
, the error message may be buried a bit. Try with make -j1
to see if you have something more comprehensive.
Hi @plancherb1,
Compiling with -j4
can lead to bury the actual error message far above the last log line. Could just try with -j1
again ?
It seems you are using gcc which leads to a certain burden of memory when compiling templated libraries. I would suggest relying on clang instead. Could you output the complete compilation log?
For instance, on the CI due to some memory limits, we are often reaching the CPU/memory limits and use single-thread compilation.
@jmirabel Ah yes of course -- the first error I hit is:
fatal error: pinocchio/bindings/python/multibody/pool/geometry.hpp: No such file or directory
7 | #include "pinocchio/bindings/python/multibody/pool/geometry.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am currently re-running it again with OpenMP turned off on pinnochio3-preview (also realizing that code_gen funcs are not set up for OpenMP parallelism anyway as far as I can tell -- so not an option I need then right now). And things seem to be working fine (at about 80%). So FYI there is something up with the OpenMP parallelism compilation but/and I am fine for now! Thank you!
@jcarpent I'm a CMAKE novice -- how do I tell it to switch to Clang (and maybe that's the error)? I also found in general previously (when just using the apt version) that compiling programs using Pinocchio with Clang results in much faster code than gcc -- of course ironically all the code I write seems to be much faster when compiled with gcc.
I am currently re-running it again with OpenMP turned off on pinnochio3-preview
You might need to erase the CMakeCache.txt
how do I tell it to switch to Clang (and maybe that's the error)?
As simple as cmake .. -DCMAKE_CXX_COMPILER=$(which clang++)
@jcarpent thanks! btw it finished just fine with that gcc run (I had rm -r -f the build folder before trying again) -- I'll try again with OpenMP turned on and using clang and let you know what happens.
Thanks for the quick feedback. Just to let you know that OpenMP is only used when running parallel computations (batch computations of RNEA, ABA, collisions algo). Depending on your application, you might not need it.
I close the issue as it seems solved. Feel free to reopen it @plancherb1 if you feel so.
Yup sounds good! Btw in case helpful for you down the road got that same error with the OpenMP stuff:
[ 19%] Building CXX object bindings/python/CMakeFiles/pinocchio_pywrap_default.dir/multibody/pool/expose-pool.cpp.o
cd /home/plancher/Desktop/pinocchio/build/bindings/python && /usr/bin/clang++-12 -DBOOST_MPL_LIMIT_LIST_SIZE=30 -DBOOST_MPL_LIMIT_VECTOR_SIZE=30 -DPINOCCHIO_PYTHON_INTERFACE_WITH_OPENMP -DPINOCCHIO_WITH_URDFDOM -Dpinocchio_pywrap_default_EXPORTS -I/home/plancher/Desktop/pinocchio/build -I/home/plancher/Desktop/pinocchio/build/include -I/home/plancher/Desktop/pinocchio/include -isystem /usr/include/python3.8 -isystem /usr/local/include/eigen3 -isystem /usr/include/eigen3 -isystem /usr/lib/python3/dist-packages/numpy/core/include -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -fPIC -fopenmp=libomp -Wno-conversion -Wno-comment -DPINOCCHIO_PYTHON_CONTEXT_FILE=\"pinocchio/bindings/python/context/default.hpp\" -DPINOCCHIO_PYTHON_MODULE_NAME=pinocchio_pywrap_default -std=gnu++11 -o CMakeFiles/pinocchio_pywrap_default.dir/multibody/pool/expose-pool.cpp.o -c /home/plancher/Desktop/pinocchio/bindings/python/multibody/pool/expose-pool.cpp
/home/plancher/Desktop/pinocchio/bindings/python/multibody/pool/expose-pool.cpp:7:10: fatal error: 'pinocchio/bindings/python/multibody/pool/geometry.hpp' file not found
#include "pinocchio/bindings/python/multibody/pool/geometry.hpp"
I have a similar issue on my side. I will fix it quickly.
@plancherb1 I've provided a fix in #1485. Thanks for the report.
No problem! :) Thanks for the awesome library!
I'm compiling with codegen enable by running:
However, when I run
make -j4
I've found that both on master and on pinocchio3-preview that the compilation fails with a very non-descriptive errorIf I compile without the Autodiff/Codegen/OpenMP things work just fine. Anyone have any suggestions?
Cmake output below: