JuPedSim / jpsreport

Analysis tool
https://www.jupedsim.org/jpsreport_introduction.html
Other
3 stars 9 forks source link

Profile Output is extremly slow #199

Open mirakuepper opened 5 years ago

mirakuepper commented 5 years ago

JuPedSim - JPSreport

In order to get Profile data out of Jpsreport, I use the option <profiles enabled="true" grid_size_x="0.20" grid_size_y="0.20"/>. Doing this causes jpsreport to extremly increase running time. For example if I use the data attached here, running jpsreport with <profiles enabled="false", it needs about one minute to finish. If I switch <profiles enabled="true" the runtime increases to almost four and a half hours.

Is there any way to make this faster?

Issue.zip

chraibi commented 5 years ago

Is it the analysis part of jpsreport or the script that is slow?

Probably related to JuPedSim/jpsreport#47.

gjaeger commented 5 years ago

It's the analysis part of jpsreport. This issue is not related to JuPedSim/jpsreport#47.

gjaeger commented 5 years ago

An addition to my last comment: The longer runtime depends on the function call GetProfiles in Method_D.cpp. Starting at line 384 there are two for-loops which probably slow down the execution.

chraibi commented 5 years ago

What actually happens here is kinda normal. You have a big geometry that you discretize into 20x20 cm^2 cells. For every cell, you calculate Voronoi density and velocity.

Choosing a bigger cell size might help for sure, although run time could be optimized e.g. by a openMP pragma.

gjaeger commented 5 years ago

The use of larger cells could cause problems with complex geometries. OpenMP would be an option. So far we don't use OpenMP. Should we implement this in the next release? I'll put it on the list for Monday.

gjaeger commented 4 years ago

Using the example of the demo "bottleneck", I made an analysis with the profile files and the IFD_I file. The results can be found in the notebook (ipynb) on gists.

Creating the profile data with jpsreport takes about 4 hours. With the IFD_I data and my python script about 2 minutes.

I ask myself the question, what do we want to see based on profiles?

@chraibi Has this question already been discussed?