If a large number of simulations are run in parallel (say 5000), Ubuntu 18.04 throws a "too many file open" error. This can be fixed using the solution posted in https://askubuntu.com/questions/181215/too-many-open-files-how-to-find-the-culprit
ulimit -n 10000