  We present the Multiscale Coupling Library and Environment: MUSCLE 2. This
multiscale component-based execution environment has a simple to use Java, C++,
C, Python and Fortran API, compatible with MPI, OpenMP and threading codes. We
demonstrate its local and distributed computing capabilities and compare its
performance to MUSCLE 1, file copy, MPI, MPWide, and GridFTP. The local
throughput of MPI is about two times higher, so very tightly coupled code
should use MPI as a single submodel of MUSCLE 2; the distributed performance of
GridFTP is lower, especially for small messages. We test the performance of a
canal system model with MUSCLE 2, where it introduces an overhead as small as
5% compared to MPI.
