Error: Cannot add a floating body without CHRONO

Hi,

I am new to GPUSPH and installed GPUSPH and Chrono correctly.
The damBreak case runs well, but when I run the case “Objects” it says:

 * No devices specified, falling back to default (0)...
GPUSPH version v5.0
Release version without fastmath for compute capability 3.0
Chrono : disabled
HDF5   : enabled
MPI    : disabled
Catalyst : disabled
Compiled for problem "Objects"
[Network] rank 0 (1/1), host 
 tot devs = 1 (1 * 1)
WARNING: setting number of layers for dynamic boundaries but not using DYN_BOUNDARY!
WARNING: number of layers for dynamic boundaries is low (3), suggested number is 4
WARNING: setting mass of a non-floating body
Setting wall inter-particle spacing from deltap: 0.02
Info stream: GPUSPH-22976
Initializing...
Water level not set, autocomputed: 0.5
Max particle speed not set, autocomputed from max fall: 3.13209
Expected maximum shear rate: 769.231 1/s
setting dt = 0.00039 from CFL conditions (soundspeed: 0.00039, gravity: 0.0154445, viscosity: 845)
Using problem-set neib list size 320 (safe computed value was 128)
Using problem-set neib bound pos 255 (safe computed value was 127)
Ferrari diffusion coefficient: 0.000000e+00 (default value, disabled)
WARNING: Ferrari density diffusion enabled, but no coefficient or length scale given!
Artificial viscosity epsilon is not set, using default value: 6.759999e-06
Problem calling set grid params
Influence radius / neighbor search radius / expected cell side	: 0.052 / 0.052 / 0.052
 - World origin: 0 , 0 , 0
 - World size:   1.6 x 0.8 x 0.8
 - Cell size:    0.0533333 x 0.0533333 x 0.0533333
 - Grid size:    30 x 15 x 15 (6,750 cells)
 - Cell linearization: y,z,x
 - Dp:   0.02
 - R0:   0.02
Generating problem particles...
FATAL: ProblemCore::add_moving_body Cannot add a floating body without CHRONO

Can anyone help me?

Hi,
I see that chrono is disabled with the compilation.
Can you please try to compile as
make chrono=1 Objects -j $(nproc) && ./GPUSPH

Regards
Elie

Thanks,

When I try that it gives me the following output. It seems something with Chrono is not right

[CC] GPUWorker.oIn file included from /usr/local/include/chrono/core/ChQuaternion.h:22:0,
                 from src/geometries/EulerParameters.h:38,
                 from src/geometries/Object.h:34,
                 from src/Writer.h:53,
                 from src/ProblemCore.h:55,
                 from src/Problem.h:58,
                 from src/problems/Objects.h:32,
                 from options/Objects.gen.cc:34:
/usr/local/include/chrono/core/ChMatrix.h:30:10: fatal error: Eigen/Dense: No such file or directory
 #include "Eigen/Dense"
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:987: recipe for target 'build/Objects.gen.o' failed
make: *** [build/Objects.gen.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/local/include/chrono/core/ChQuaternion.h:22:0,
                 from src/geometries/EulerParameters.h:38,
                 from src/geometries/Object.h:34,
                 from src/Writer.h:53,
                 from src/GlobalData.h:69,
                 from src/GPUWorker.h:42,
                 from src/GPUWorker.cc:40:
/usr/local/include/chrono/core/ChMatrix.h:30:10: fatal error: Eigen/Dense: No such file or directory
 #include "Eigen/Dense"
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:983: recipe for target 'build/GPUWorker.o' failed
make: *** [build/GPUWorker.o] Error 1
In file included from /usr/local/include/chrono/core/ChQuaternion.h:22:0,
                 from /usr/local/include/chrono/core/ChCoordsys.h:16,
                 from /usr/local/include/chrono/core/ChFrame.h:18,
                 from /usr/local/include/chrono/core/ChFrameMoving.h:18,
                 from /usr/local/include/chrono/physics/ChBodyFrame.h:18,
                 from /usr/local/include/chrono/physics/ChLink.h:18,
                 from /usr/local/include/chrono/physics/ChLinkDistance.h:18,
                 from src/problems/Objects.cu:32:
/usr/local/include/chrono/core/ChMatrix.h:30:23: fatal error: Eigen/Dense: No such file or directory
 #include "Eigen/Dense"
                       ^
compilation terminated.
Makefile:999: recipe for target 'build/problems/Objects.o' failed
make: *** [build/problems/Objects.o] Error 1

Hello @Alda30, it seems like your chrono installation isn’t complete. Specificially, it’s not finding the Eigen library it depends on. I think your first step should be checking that the chrono examples themselves build and run correctly. If they do, then the issue is in the way GPUSPH looks for chrono and its dependencies, otherwise the issue is with the chrono installation itself.

Thanks.

Actually, I am following the instructions of GPUSPH for installing chrono.
Below is a screenshot of ccmake settings of chrono.

not sure if I need to change something. I even tried installing Eigen libraries manually by " sudo apt install libeigen3-dev
"

Sorry for my reoccurring issue and I hope you can help me correct this issue.

This is my new output from “make chrono=1 Objects”

[CU] Objects.oIn file included from /usr/include/common_functions.h:50:0,
                 from /usr/include/cuda_runtime.h:115,
                 from <command-line>:0:
/usr/include/Eigen/src/Core/util/Macros.h:402:85: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
  ( !defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000) )
                                                                                 ^
/usr/include/Eigen/src/Core/util/Macros.h:416:104: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 14 && (__cplusplus > 199711L && defined(__CUDACC_VER__) && (EIGEN_COMP_CLANG || __CUDACC_VER__ >= 70500))
                                                                                 ^
/usr/include/Eigen/Core:232:33: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
   #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500
                                 ^
In file included from /usr/include/common_functions.h:50:0,
                 from /usr/include/cuda_runtime.h:115,
                 from <command-line>:0:
/usr/include/Eigen/src/Core/arch/CUDA/Half.h:392:63: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #if defined(EIGEN_HAS_CUDA_FP16) && defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000 && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 530
                                                               ^
/usr/include/Eigen/src/Core/arch/CUDA/Half.h:560:31: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000 && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 530
                               ^
Makefile:999: recipe for target 'build/problems/Objects.o' failed
make: *** [build/problems/Objects.o] Error 1

Hi,

Can you please verify the version
http://api.projectchrono.org/tutorial_install_chrono.html

section 2) in particular.

Thanks
Elie

Hi Elie,

My eigne library was 3.3.4. But I downloaded the 3.3.7 and compiled and installed it manually (before that I removed the previous version). But I still get the following error:

[CU] Objects.oIn file included from /usr/include/common_functions.h:50:0,
                 from /usr/include/cuda_runtime.h:115,
                 from <command-line>:0:
/usr/include/Eigen/src/Core/util/Macros.h:402:85: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
  ( !defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000) )
                                                                                 ^
/usr/include/Eigen/src/Core/util/Macros.h:416:104: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 14 && (__cplusplus > 199711L && defined(__CUDACC_VER__) && (EIGEN_COMP_CLANG || __CUDACC_VER__ >= 70500))
                                                                                 ^
/usr/include/Eigen/Core:232:33: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
   #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 70500
                                 ^
In file included from /usr/include/common_functions.h:50:0,
                 from /usr/include/cuda_runtime.h:115,
                 from <command-line>:0:
/usr/include/Eigen/src/Core/arch/CUDA/Half.h:392:63: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #if defined(EIGEN_HAS_CUDA_FP16) && defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000 && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 530
                                                               ^
/usr/include/Eigen/src/Core/arch/CUDA/Half.h:560:31: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #if defined __CUDACC_VER__ && __CUDACC_VER__ >= 80000 && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 530
                               ^
Makefile:999: recipe for target 'build/problems/Objects.o' failed
make: *** [build/problems/Objects.o] Error 1

Hello @Alda30, it looks like you still have remnants from the older version of Eigen around, as version 3.3.7 does not use the symbol __CUDACC_VER__ (it was replaced with an EIGEN_CUDACC_VER which is built in a manner compatible with the more recent CUDA versions).

(BTW since Eigen is a headers-only library you may be able to just install a more recent version from distribution packages of a later release of the same distribution; we have done this for example with the libeigen3-dev from Ubuntu 19.04 (Disco Dingo), installing it manually on a 18.04 installation. This avoids the issue of distro package + hand-built new release.)

Hi,

Thank you all for your kind support.
Actually, I gave up and re-installed ubuntu 18.04, I installed Cuda 10.2, chrono (works well and tested with demos) and gpu sph again from scratch.
I also installed libeigen3-dev version 3.3.7 mannually.

When I type ‘make chrono=1 Objects -j 6’
I get
[CC] Cone.osrc/ProblemCore.cc: In member function ‘void ProblemCore::InitializeChrono()’:
src/ProblemCore.cc:192:28: error: ‘class chrono::ChSystem’ has no member named ‘SetMaxItersSolverSpeed’
m_bodies_physical_system->SetMaxItersSolverSpeed(100);
^~~~~~~~~~~~~~~~~~~~~~
src/ProblemCore.cc:193:68: error: ‘SOR’ is not a member of ‘chrono::ChSolver::Type’
m_bodies_physical_system->SetSolverType(::chrono::ChSolver::Type::SOR);
^~~
[CC] Rect.oMakefile:983: recipe for target ‘build/ProblemCore.o’ failed
make: *** [build/ProblemCore.o] Error 1
make: *** Waiting for unfinished jobs…

And when I run by “./GPUSPH”, I get

 > * No devices specified, falling back to default (0)...
GPUSPH version v5.0
Release version without fastmath for compute capability 3.0
Chrono : disabled
HDF5   : disabled
MPI    : enabled
Catalyst : disabled
Compiled for problem "Objects"
[Network] rank 0 (1/1), host ehsan-pc
 tot devs = 1 (1 * 1)
WARNING: setting number of layers for dynamic boundaries but not using DYN_BOUNDARY!
WARNING: number of layers for dynamic boundaries is low (3), suggested number is 4
WARNING: setting mass of a non-floating body
Setting wall inter-particle spacing from deltap: 0.02
Info stream: GPUSPH-629
Initializing...
Water level not set, autocomputed: 0.5
Max particle speed not set, autocomputed from max fall: 3.13209
Expected maximum shear rate: 769.231 1/s
setting dt = 0.00039 from CFL conditions (soundspeed: 0.00039, gravity: 0.0154445, viscosity: 845)
Using problem-set neib list size 320 (safe computed value was 128)
Using problem-set neib bound pos 255 (safe computed value was 127)
Ferrari diffusion coefficient: 0.000000e+00 (default value, disabled)
WARNING: Ferrari density diffusion enabled, but no coefficient or length scale given!
Artificial viscosity epsilon is not set, using default value: 6.759999e-06
Problem calling set grid params
Influence radius / neighbor search radius / expected cell side	: 0.052 / 0.052 / 0.052
 - World origin: 0 , 0 , 0
 - World size:   1.6 x 0.8 x 0.8
 - Cell size:    0.0533333 x 0.0533333 x 0.0533333
 - Grid size:    30 x 15 x 15 (6,750 cells)
 - Cell linearization: y,z,x
 - Dp:   0.02
 - R0:   0.02
Generating problem particles...
FATAL: ProblemCore::add_moving_body Cannot add a floating body without CHRONO

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Hope I get closer to a solution…
Any help appreciated.

Hello @Alda30,

if you just cloned the Project Chrono repository you are probably on a newer version than v4.0.0, which is the last official Chrono release. On GPUSPH we tested up to v4.0.0, so you can try to reinstall Project Chrono after checking out version 4.0.0.
For the problem you are running, even version 3.0.0 should be fine.

Hi,

Many thanks for your kind support. This issue is resolved.

While running cases in which integration of chrono is used (e.g. objects, buoyancytest), I always get the following error:

[CU] Objects.o/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(1761): error: identifier "__builtin_ia32_sqrtsd_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(1770): error: identifier "__builtin_ia32_sqrtss_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(2728): error: identifier "__builtin_ia32_scalefsd_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(2737): error: identifier "__builtin_ia32_scalefss_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(11265): error: identifier "__builtin_ia32_scalefsd_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512fintrin.h(11274): error: identifier "__builtin_ia32_scalefss_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1163): error: identifier "__builtin_ia32_reducesd" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1171): error: identifier "__builtin_ia32_reducess" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1179): error: identifier "__builtin_ia32_rangesd128_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1189): error: identifier "__builtin_ia32_rangess128_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1198): error: identifier "__builtin_ia32_rangesd128_round" is undefined

/usr/lib/gcc/x86_64-linux-gnu/7/include/avx512dqintrin.h(1207): error: identifier "__builtin_ia32_rangess128_round" is undefined

12 errors detected in the compilation of "/tmp/tmpxft_00004a26_00000000-6_Objects.cpp1.ii".
Makefile:999: recipe for target 'build/problems/Objects.o' failed
make: *** [build/problems/Objects.o] Error 1

I am sorry if my question is getting annoying :frowning:

Regards,
Al

Hello @Alda30

I believe this is due to issues with incompatibilities between the host compiler and the device compiler. Which version of gcc are you using? When using a recent CUDA version (such as 10.x) we’ve had better experience with version 8 of gc, so you might want to install the g++-8 package, and add the following line to your Makefile.local:

CXX=g++-8