Increase Maximum Number of Open Files

Discussion about new features and development support

Moderator: thorsten

Post Reply
tl2001
Posts: 3
Joined: Sat 05 May 2018, 03:44

Increase Maximum Number of Open Files

Post by tl2001 » Sat 05 May 2018, 03:53

First, off, this is an outstanding piece of software. But I seem to have run into a limitation—the maximum number of files that can be simultaneously opened for dumping probe data. I am running a simulation with a large number of probes (> 2000) and in the windows version, the max number of file opens seems to be capped at 512, and in Linux, it’s 1023.

It may be unusual to run that many probes, but for my application, I’m trying to correlate OpenEMS with physical probe points and would like to get all possible probe data reported from a single run. The limitation seems to just be a default in the cpp library, but I confess I am not skilled enough to submit my own patch. My research turned up what is hopefully a simple change: https://msdn.microsoft.com/en-us/library/6e3b887c.aspx

If it could be increased to 2048 or ideally 4096, it would greatly speed up my simulations as I currently iterate through 512 probes at a time.

Thanks,

TL

thorsten
Posts: 1425
Joined: Mon 27 Jun 2011, 12:26

Re: Increase Maximum Number of Open Files

Post by thorsten » Mon 14 May 2018, 22:34

Hm, I missed this topic for some reason.

I was not aware of this limit. Just another idea, why do you not use an electric field dump? You can lateron calculate whatever voltage from that you need?

regards
Thorsten

tl2001
Posts: 3
Joined: Sat 05 May 2018, 03:44

Re: Increase Maximum Number of Open Files

Post by tl2001 » Tue 15 May 2018, 04:09

Thanks,

That's a good idea--using a field dump instead of all those probes simplifies my model quite a bit. I'll just need to work out the right placements...

tl2001
Posts: 3
Joined: Sat 05 May 2018, 03:44

Re: Increase Maximum Number of Open Files

Post by tl2001 » Mon 21 May 2018, 03:12

In case anyone else runs into this, it turns out there isn't a limit on Linux.

In windows it seems to be set by the compiler, and can be overridden with "_setmaxstdio(2048);"

But on at least Ubuntu, the limit is set by the operating system. "ulimit -a" will tell you what it is, and simply running "ulimit -n <desired no. of opens>" will bump it up.

Post Reply