PSIM Script running out of memory
I'm trying to run this simple script, the problem is that every simulation, the RAM usage increases until PSIM runs out of memory.
My computer has more than enough RAM to complete each simulation.
Is there a way to make the script flush the RAM once it's not needed? I don't need the simulation results on RAM, since it's saved to a file for processing in MATLAB.
Side question, when using ASimulate(), is there a way to limit concurrent simulations? I tried using a regular Simulate() every 11 ASimulate(), but after some time the program just closes itself without a given error.
Edit: It looks like the first problem is related to a memory leak fixed with PSIM 2023.0 . Unfortunately I don't have access to the 2023 versions (Student License)
Thank you in advance.
Answers
-
Please send your PSIM schematic and this script file to us.
Sincerely,
Rhonda
0 -
Rhonda_20369 said:
Please send your PSIM schematic and this script file to us.
Sincerely,
Rhonda
Of course, files are attached. PSIM version is 2022.3 (Sudent version)
Symptom is: after every simulation run, PSIM memory usage increases until it runs out of memory.
Also found out that when trying to run the simulations with PsimCmd, the PsimCmd process does not return/close itself. This has been reported before and fixed in 2023.0, that don't have access as a student. Maybe the problems are related?0 -
Hi, Gustavo,
Using your script and PSIM schematic, I have tried to run only 5 iterations of Freq values and saw the amount of memory in use increased at each round.
Due to the large number of iterations in your script, the memory occupied by PSIM would exceed your computer's capacity.
This is an issue I have reported to our development team. The memory occupied by each iteration should be released when PSIM simulation is finished. But it seems not.
For sure the development team will investigate further and find a fix before our next release. At this moment, the schedule for next version release is not finalized.
I will keep you posted.
Sincerely,
Rhonda
0 -
Hello, Gustavo.
Additionally, you could check this blog where we describe a workflow for design exploration and optimization.
Best,
Juan
0 -
Gustavo Salgado_20678 said:
Of course, files are attached. PSIM version is 2022.3 (Sudent version)
Symptom is: after every simulation run, PSIM memory usage increases until it runs out of memory.
Also found out that when trying to run the simulations with PsimCmd, the PsimCmd process does not return/close itself. This has been reported before and fixed in 2023.0, that don't have access as a student. Maybe the problems are related?Dear Gustavo,
Wait() function will wait for all ASimulate functions to finish. You can limit the number of threads this way. Following code runs 20 simulations at a time.
freq = {2 4 6 ...};m = SizeOf(freq);n = 0;while(n<m){injfreq = freq[n];res = "E:\Desktop\PFCA\" + n + ".mat";ASimulate("E:\Desktop\MainV2.psimsch", res);n++;if(n % 20 == 0){Wait();}}0