A Thread-Safe Version of EPANET Toolkit for Parallel Applications


Multiple CPUs are increasingly used to parallelise tasks that require a high computation time. In fact, parallel optimisation algorithms are widely present in the literature. On the other hand, hydraulic simulators that support parallel computation are scarce. The most popular research simulator, EPANET, was not designed with concurrency in mind. We are currently developing a new thread-safe variant of the EPANET Toolkit based on our own modified version of the EPANET Toolkit, which can be used in parallel algorithm.

More information about the development of this thread-safe version of EPANET and its potential applications is available in the following paper:


This version of EPANET is Copyright © 2008 Manuel López-Ibáñez.

This version of EPANET is free software (software libre); you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.

This version of EPANET is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You are not allowed to use or modify this version of EPANET or its source code if you do not agree with the terms of the GNU General Public License. In that case you may prefer to use the original EPANET, which is available as public domain software.

IMPORTANT NOTE: Please be aware that the fact that this program is released as Free Software does not excuse you from scientific propriety, which obligates you to give appropriate credit! If you write a scientific paper describing research that made substantive use of this program, it is your obligation as a scientist to (a) mention the fashion in which this software was used, including the version number, in the Methods section, to allow replication; (b) cite as a reference the paper:

Moreover, as a personal note, I would appreciate it if you would email manuel.lopez-ibanez@manchester.ac.uk with citations of papers referencing this work so I can mention them to my funding agent and tenure committee.


Please, be aware that this is EXPERIMENTAL software. Not all functionality of the original EPANET Toolkit is available. See the README file for more information.

1 Sep 2008 Revision 177 [ EPANET-threaded.r177svn-src.tar.gz ]

Frequently Asked Questions

When will this software be out of the experimental phase?

Probably never. Unfortunately, I have almost no time to continue development by myself.

Is it stable?

It is relatively stable. If you are interested mainly on hydraulic simulation, then the current code is fairly complete. On the other hand, the code related to water quality would require more development. Apart from missing functionality, I don't know of any bugs, but that doesn't mean there aren't. You should compare your results with those obtained by the original EPANET. Please report to me any bugs you may find.

Would you like to collaborate on continuing development?

It depends if your project is interesting for me and if you provide good patches. I can answer questions and comment on patches. However, I won't be able to write any code myself unless there is a strong incentive.

The code does not compile!

The code is ANSI C, so it should compile with any C compiler that respects the C standard. I have tested it with various versions of GCC on Ubuntu GNU/Linux. Unfortunately, I don't own any computer with Windows or Mac OS, or any other compiler, so I won't be able to help you solve issues there. Nonetheless, if you find any modification that is required to make the code work on those systems/compilers, please let me know.

Do you allow use, distribution, and/or modification of your software?

Yes, subject to the conditions of the General Public License (GPL), as described in the license above, which more or less means that you are allowed to copy, distribute, modify and even sell my code as long as the modified source code is made available. Please, check the text of GPL for the exact conditions.