There are a lot of these types of switches in the solver implementations. The Comm API should be reworked to avoid these switches. ``` if comm.use_mpi: cost = comm.Allreduce_reduce(cost, 'cpu') else: cost = comm.reduce(cost, 'cpu') ```