TheOceanCleanupAlgorithms / ADVECT

A computationally efficient and massively parallel marine litter transport model.
MIT License
15 stars 4 forks source link

Fix exit code logging bottleneck #119

Closed dklink closed 3 years ago

dklink commented 3 years ago

@axelpey was having an issue when many many particles would be reporting a bad exit code, that the logging function would pretty much freeze the program. I figure this is because if 1 million particles had a bad exit code, it would try to write 1 million new lines to the warnings.log file. Also there was a for loop. Here I consolidated all the reporting to one line per error code. @axelpey do you think this would resolve that bottleneck? Ideally, we don't have millions of particles having a bad exit code, but ideally would want to be able to handle it just in case.

axelpey commented 3 years ago

That's a very nice idea. I approve