Constrain memory consumption durning compilation in brian2cuda

My code compile and runs well in cpp_standalone mode. When running in brian2cuda, it somehow consumed all the memory (25GB) during cuda compilation. The job was run in jupyter notebook and the
the kernel restarted because of the memory exhaustion. Is it possible to manually constraint the number of process used for cuda compilation? Attached please find a screenshot showing this issue.

Uh, this looks indeed bad. Is it a model with a very large number of objects and/or runs?
Either way, the make command uses -j for maximal parallelization by default. You can reduce the number by specifying a number of processes in the devices.cpp_standalaone.extra_make_args_unix preference:

prefs['devices.cpp_standalone.extra_make_args_unix'] = ['-j8']
1 Like

Thanks Marcel. This is indeed the case. add the suggested command solved the problem.

1 Like