Other Experiences with Computational Performance Improvements [chapter]

Kai Nagel
2016 The Multi-Agent Transport Simulation MATSim  
MATSim has always had the simulation of large regions as its goal, and as such was always interested in high computational performance. The team had, when it started with the Java-based MATSim (cf. 46.Cetin et al., 2003) as well as with more general message-based approaches (Gloor and Nagel, 2005) that resemble today's Protocol Bu ers (Google Developers, 2015). However, the move to Java (see Section 46.2.1.4), a decision for faster conceptual progress and reduced maintenance e ort, also had the
more » ... consequence that the MPI (Message Passing Interface) approach to parallel computing could no longer be used and was thus given up. See Section 46.2.1.4 for details. The behavioral modules of MATSim, such as route (Section 4.5.1.2) or destination (Chapter 27) innovation, are conceptually straightforward to parallelize by multi-threading, and that was implemented in MATSim from early on (Balmer et al., 2009b, see Section 4.2.3 how to use this). The remaining challenge then is to parallelize the mobsim, in which the parallel threads need to interact closely. For example, assume that we compute 24 hours of tra c in 120 seconds of computing time (cf . Table 40 .1). With the 1 second time steps used in the QSim this means 720 update rounds per second, and thus 720 inter-thread interactions per second. An attempt to use the CUDA (Compute Uni ed Device Architecture, a parallel computing platform and API by NVIDIA) for the C language (Strippgen and Nagel, 2009b,a; Strippgen, 2009) ran into the same problems as the earlier parallel DEQSim also written in C/C++ (Charypar et al., 2007a): The time necessary to transmit the necessary information back and forth between the Javabased MATSim and the C/C++-based external package used up all the performance gains. In consequence, the DEQSim was re-implemented as the so-called JDEQSim in Java (Waraich et al., 2015,
doi:10.5334/baw.40 fatcat:w7kv6wvsqfgzhiy5nq4c6nt2vq