CityScope / VehicleClustering

1 stars 1 forks source link

Multithreading on server #43

Closed NaroaCS closed 1 year ago

NaroaCS commented 1 year ago

Hi @agrignard ! I am trying to run the experiments on a server and want to take advantage of the multithreading. I see that the execution parameters can be adjusted in the Preferences tab on the graphical interface and that the default is 8. I have seen that this can also be set when defining the experiment in the .gaml script by adding parallel: nun_threads. This is what I have done.

The server has 40 threads:

image

So I have defined my experiment as: experiment batch_experiments_pheromone type: batch parallel: 40 repeat: 15 until: (cycle >= numberOfDays numberOfHours 3600 / step) { parameter var: evaporation among: [0.05, 0.1, 0.15, 0.2,0.25,0.3]; parameter var: exploitationRate among: [0.6,0.65,0.7, 0.75, 0.8]; parameter var: numBikes among: [150, 250, 350]; parameter var: WanderingSpeed among: [1/3.6#m/#s,3/3.6#m/#s,5/3.6#m/#s]; }

But when I launch the experiment, it still only launches 4 threads in parallel:

image

Any ideas on how to make it run on more than 4 threads?

Thank you!

agrignard commented 1 year ago

@NaroaCS I am not a big specialist in multi threading in GAMA. I think it would make sense to post this issue directly on the GAMA issues https://github.com/gama-platform/gama/issues as it's seem related to to GAMA itself (maybe it's also related to the server that is limited to 4 threads (in any case GAMA should throw a warning if it's the case)

NaroaCS commented 1 year ago

Ok, I will do that! I have 40 threads in theory, so it should be using as many as possible. But I will post it in the GAMA issues. Thanks ! :)