Speed ​​up simulation update times

142 views
Skip to first unread message

ji li

unread,
Oct 27, 2022, 12:01:12 PM10/27/22
to projec...@googlegroups.com
Hello,
   Recently, when I was doing a Dedan simulation, I found that the value of RTF was too large, about 50.23 . I want to know that how to speed up the time of advance.  In addition, I would like to know if this simulation step size can be modified? If the step size is 0.02 s, the system will crash.

Radu Serban

unread,
Oct 27, 2022, 12:21:38 PM10/27/22
to projec...@googlegroups.com

You will need to provide a bit more information on your hardware, operating system, compiler, etc. 

(I assume you are building the code in Release and not Debug, correct?)

 

On my Windows desktop (AMD Ryzen 7 3700X), the code built with VS 2019, demo_VEH_Sedan runs at an RTF of about 0.35, so something must be wrong on your side.  Also, the step size in that demo is set at 0.02 s and I don’t notice any issues.  What do you exactly mean by “the system will crash”?

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/CAGrNw3cdf8siD8b8nf0m%2BEAdhfzwGfWXRfuAytaoV0m8-W813Q%40mail.gmail.com.

Dan Negrut

unread,
Oct 27, 2022, 7:52:39 PM10/27/22
to ji li, ProjectChrono

Do you mean “Sedan”?

Also, for that RTF, can you share the value of the integration time step, who built the solver, what hardware it was run on.

If you mean Sedan, Chrono can run that relatively easily in real time, see for instance here: https://uwmadison.box.com/s/39107d2577slfg2c54j6xeu5z5va0zes.

Dan

-------------------------------------------------

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

Department of Mechanical Engineering

Department of Computer Science

University of Wisconsin - Madison

4150ME, 1513 University Avenue

Madison, WI 53706-1572

608 772 0914

http://sbel.wisc.edu/

http://projectchrono.org/

-------------------------------------------------

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of ji li
Sent: Thursday, October 27, 2022 11:01 AM
To: projec...@googlegroups.com
Subject: [chrono] Speed ​​up simulation update times

 

Hello

   Recently, when I was doing a Dedan simulation, I found that the value of RTF was too large, about 50.23 . I want to know that how to speed up the time of advance.  In addition, I would like to know if this simulation step size can be modified If the step size is 0.02 s, the system will crash.

--

ji li

unread,
Oct 28, 2022, 1:20:49 AM10/28/22
to ProjectChrono
Hello Radu and  Dan:
       Thank you for your reply。

  The information for these questions is as follows:
my configuration: ubuntu 16.04, CPU i7-9700k, gcc --version: 5.5.0 , vscode 2022, use default solver, I both run the code On Release and Debug.

The problems I run the demo_VEH_Sedan.cpp( removed visualization code) are follows:
  1. the step size I set 2ms, while The my_sedan advance spend 100.29ms on Release and Debug.
  2. When I changed the step size to 20ms, the speed increased to nan rapidly and the system crashed in a short time.
飞书20221028-131817.png
The modified demo_VEH_Sendan.cpp is shown in the attached file. 
my_sedan.cpp

Radu Serban

unread,
Oct 28, 2022, 4:15:35 AM10/28/22
to ProjectChrono

Ji Li,

 

A step size of 20 ms is too large for stable vehicle dynamics simulation.

 

I just tried your code with my setup, and I get an RTF of around 0.7.  It looks like you are using a relative recent version of the code in the main development branch, so I can only assume this has something to do with your platform. You are using quite old versions of Ubuntu and GCC.  Can you upgrade and see if that helps?

 

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of ji li
Sent: Friday, 28 October 2022 07:21
To: ProjectChrono <projec...@googlegroups.com>
Subject: Re: [chrono] Speed ​​up simulation update times

 

Hello Radu and  Dan:

       Thank you for your reply

 

  The information for these questions is as follows:

my configuration ubuntu 16.04, CPU i7-9700k, gcc --version: 5.5.0 , vscode 2022 use default solver, I both run the code On Release and Debug.

 

The problems I run the demo_VEH_Sedan.cpp( removed visualization code) are follows:

  1. the step size I set 2ms, while The my_sedan advance spend 100.29ms on Release and Debug.

  2. When I changed the step size to 20ms, the speed increased to nan rapidly and the system crashed in a short time.

Dan Negrut

unread,
Oct 28, 2022, 6:24:17 PM10/28/22
to ji li, ProjectChrono

One thing that is suspicious is that you are getting the same amount of time in debug & release. That can’t be. Can you make sure that you actually build in release mode?

Thank you,

Dan

-------------------------------------------------

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

Department of Mechanical Engineering

Department of Computer Science

University of Wisconsin - Madison

4150ME, 1513 University Avenue

Madison, WI 53706-1572

608 772 0914

http://sbel.wisc.edu/

http://projectchrono.org/

-------------------------------------------------

 

Sent: Friday, October 28, 2022 12:21 AM
To: ProjectChrono <projec...@googlegroups.com>

Subject: Re: [chrono] Speed ​​up simulation update times

 

Hello Radu and  Dan:

       Thank you for your reply

 

  The information for these questions is as follows:

my configuration ubuntu 16.04, CPU i7-9700k, gcc --version: 5.5.0 , vscode 2022 use default solver, I both run the code On Release and Debug.

 

The problems I run the demo_VEH_Sedan.cpp( removed visualization code) are follows:

  1. the step size I set 2ms, while The my_sedan advance spend 100.29ms on Release and Debug.

  2. When I changed the step size to 20ms, the speed increased to nan rapidly and the system crashed in a short time.

ji li

unread,
Nov 8, 2022, 2:03:26 AM11/8/22
to ProjectChrono
Thank you for your reply.
     yeah, I tested two sets of code, the main development branch  and release in 7.0.3.  the values ​​for the two versions of RTF are very similar  on GCC 5.4.0 and GCC 9.4.0.
I will test different ubuntu versions later.
     Thank you very much.

ji li

unread,
Nov 8, 2022, 2:10:48 AM11/8/22
to ProjectChrono
Hello Dan 
     Thank you for your reply.
Yes, I didn't make it clear, the debug version and the release version have different values of RTF, but they are very close, around 100. I git clone version 7.0.3 and main development branch. the defalut is release. I will try diff platform later.
     Thanks a lot
Reply all
Reply to author
Forward
0 new messages