emer / axon

Axon is a spiking, biologically-based neural model driven by predictive error-driven learning, for systems-level models of the brain
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Make axon Threading heuristics MPI aware #197

Open siboehm opened 1 year ago

siboehm commented 1 year ago

It's better to do the threading settings in Axon, instead of setting GOMAXPROCS on infra. Allows us to change it more easily, and adapt to different model sizes.

This will get slightly more complex for cross machine (we'll have to do OMPI_COMM_TYPE_HOST comm splitting).

siboehm commented 1 year ago

@rcoreilly @etuleu let's discuss here instead.

I'd prefer having the code have more knowledge about it's environment, that way it's much easier to update the heuristics and we don't need to touch infra code. We want to be able to do things like overallocate Goroutines, so adjusting down GOMAXPROCS may not even always be a bad idea.

Once https://github.com/emer/empi/issues/11 is implemented, the code would also become aware of SLURM environments and LVIS would continue working as is.

rcoreilly commented 1 year ago

I think it would be much cleaner and simpler to have one clear way of parameterizing and understanding what axon does (n mpi procs x t threads per proc), and let the infra send in the appropriate params explicitly, rather than having axon try to figure things out on its own. If we need an alternative to GOMAXPROCS then we can add that as a startup arg.