Comments (4)
Hi,
I can see what the problem is.
Simulations may generate a lot of data. The approach we take is that we
write the data to disk, and read it when the user accesses. If no output
file is specified, then a temporary one is created to hold the data. Many
OS's delete the temporary files when they are closed, so it's never closed,
and that indeed is a bug.
As a work-around, you may specify an output file. After the simulation is
run and you have processed your results, you may run a new one with the
same output file, (which will get overwritten).
Hope that helps for the time being. I will look into fixing the too many
open files issue soon.
How many files did you have open and what OS do you use? I'd have imagine
that number to be pretty high.
Cheers,
On Mon, May 18, 2015 at 6:34 PM, Ryan Kinnear [email protected]
wrote:
I am using Ahkab to model circuits for to test some optimization
strategies. So, I am running an Ahkab simulation hundreds or thousands of
times very quickly. This quickly leads to my program crashing due to having
too many open files. It turns out that every time I run an analysis, Ahkab
creates a file in /tmp/.I've looked through the source and it seems that if you set "outfile" to
None in new_ac it will create a temp file for the output.from ahkab.py, in each new_ function.
if guess is None: guess = options.dc_use_guess if outfile is None or outfile == 'stdout': if options.cli: outfile = 'stdout' else: ofi, outfile = tempfile.mkstemp(suffix='.op') _of.append(ofi) # keep the file open until quitting
The fd is stored in the _of list, but I haven't found anywhere they get
closed.I also am unsure about why it's necessary to write to this temp file in
the first place?As far as I can tell, there is no obvious way to disable writing to these
temp files.—
Reply to this email directly or view it on GitHub
#30.
from ahkab.
I'm running Linux Mint 17 and it has about 1500 open files when it crashes.
from ahkab.
The latest master fixes the temporary files being left open. We still rely on the OS to clear /tmp from time to time, ie we still write files there.
I think this partially addresses your issue. Please let me know if it prevents the crashes you reported.
from ahkab.
It doesn't crash any more. It does still flood the /tmp/ directory, but that isn't really a bug. I think the best thing to do is for the user to just specify a hidden file for it to write to.
from ahkab.
Related Issues (20)
- Issue with ankab HOT 5
- Tran example : 'op_solution' object has no attribute 'asmatrix' HOT 5
- voltage pulse source for a MOS inverter + questions HOT 4
- Zener Diode HOT 2
- Subcircuit call problem HOT 1
- RL circuit vs. LR circuit: different output HOT 5
- Plot circuit HOT 1
- Voltage-Controlled Switch Issue HOT 1
- Issue with a switch
- Compute on GPU using TensorFlow
- Verification RC cutoff frequency HOT 1
- error in AC and TRAN tutorial
- AttributeError: module 'pylab' has no attribute 'hold' HOT 3
- ImportError: No module named matplotlib.pyplot HOT 1
- Help : Finding current through a resistor
- Cant define diode HOT 1
- Help : Modeling a circuit with parallel components HOT 2
- Locale appears not set HOT 2
- How to use User definement device with non-linear property
- print_symbolic_results / print_symbolic_transfer_functions: sort key bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ahkab.