Can EPANET toolkit run on FORTRAN 90?


Hi! Can EPANET toolkit run on FORTRAN 90 at VIsual Studio 2015 with Parallel Studio 2016?
I tried many ways to run this toolkit, but with no sucess. Did someone tried it?

Best regards!


Hi! For the title question: yes, Epanet can run on Fortran90. I haven’t used Visual Studio, but a common error is the library path definition. Anyway, it’s hard to understand your problem without details. If you could show what you tried and the problem that happened, maybe I or other people could suggest something.


Hi Maria! Thanks for your answer and sorry for my delay to reply! (I’m getting mad with my master’s degree work) Well, I use Visual Studio 2015 IDE with Parallel Studio 2016 compiler, and I tried to couple the library even with my friends (some of then are computer science students…).
How you coupled library? Do you use Visual Studio?
Obs: I’m thinking seriously change FORTRAN to C++ due to easiness to integrate libraries… maybe a good idea?

Obs 2: Are you Portuguese? (Yes, I read an article written by you).

Best regards and thank you very much! Melhores cumprimentos!


Obs 3: Visual Studio have a quite complex way to insert/couple libraries on code. I know about this because I inserted NAG libraries (FLW6126) to run an old code for my mentor (Orientador).



Hi Alex.
The wrapper* I’ve used for call EPANET library on my FORTRAN code is from Yasemin Yilmaz, I found it here:
I haven’t used Visual Studio or Parallel Studio, but GCC/GFortran. Maybe in order to compile with VS-PS some modifications are required. And maybe at VS you need to enable C++ support installation. Or maybe the problem is between VS and PS… There are many options, some would remain if you use C++, some not. So, I think it’s important to analyze the specific error you get.

*As calling the EPANET (or any) C library on Fortran (or any other language) needs properly conversion (e.g. variables types), I’m calling ‘wrapper’ the module for doing it.