Calculating Memory Usage

I am trying to update old Python code to run on 2018.1. I have managed to get most of it running, the only piece that I am struggling with is calculating the amount of memory that is being used.

There used to be a function dolfin.common.memory.memory_usage(). However I can’t find a similar function in 2018.1, and didn’t see anything about it’s removal in the changelog.

We are using this to get a measure of how much memory each of the processes, and the system as a whole, are using when being run.

You can probably just copy-and-paste the code for this function from the older version, as it is short and self-contained:

1 Like