version 1.12.2 issue with fenics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

version 1.12.2 issue with fenics

tkdiff
A 1D time dependent problem that ran OK under 1.12.1 no longer runs properly under 1.12.2.  I load a x.fea saved under 1.12.1 into the featool app, and it loads the grid into the gui.  When I try to switch from grid to equation or constants, there is a significant delay between mouse press and the screen change, sometimes requiring 2 mouse presses.  When I solve, the terminal windows shows fenics execution, then exits, and the command log shows STOP, but the gui does not switch to post processing like before.  The fenics solve window stays up, and after a few seconds returns the error "array indices must be positive integers or logical values".  If I close that window, I can then go to pp and the plot is there.

Again, this file used to run under 1.12.1 without error.  What has changed that causes the delays after mouse clicks and execution error?

Quick additional note:  When I exit the app, I notice that each time I executed the solver using fenics, the matlab command window shows the following, which is new:

ind_clean =

   0        1
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
Could you include your model file, as without being able to reproduce the issue it is very hard to diagnose and try to fix it.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
Sorry, here it is:  tkdiff4_fenics.fea
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
In reply to this post by tkdiff
tkdiff wrote
I load a x.fea saved under 1.12.1 into the featool app, and it loads the grid into the gui.  When I try to switch from grid to equation or constants, there is a significant delay between mouse press and the screen change, sometimes requiring 2 mouse presses.
I have unfortunately not been able to reproduce the delay issue (and can therefore not address it). However, FEniCS should work in the latest build 1.12.2 Build 20.04.120 available here:

https://github.com/precise-simulation/featool-multiphysics/raw/master/FEATool%20Multiphysics.mlappinstall

If you still have issue with the delay, consider staying with the older version unless there is a specific new feature or fix that you require.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
I updated to the new version you included in your post, and it is better, but there is still a delay between completion of the solution and display of the plot.  After the solution is imported, the command window displays "Deleting Fenics data and log files" a first time, then pauses for about 20 sec (for the file I posted for you), then displays the same "deleting fenics data and log files" again, and then switches to post processing.  I tried multiple time steps, and the delay mentioned depends on how many time steps are run, less delay for fewer time steps.  Is that normal?  
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
I've noticed something else with the latest build you shared, that might have also been in the original release of 1.12.2.  After running a fenics solution with the delays as mentioned, loading a new file and running it with the internal solver (mumps/crank-nicholson), it runs significantly more slowly than normal.  If I exit the app and try that file again, it runs at normal speed.  Running the fenics solver must have leave some residual issues that slow down the app - maybe you can identify what that might be?
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
This post was updated on .
I have unfortunately not been able to reproduce or identify the cause of the significant delays you describe, even on a modest laptop. I'm guessing it might be due to your particular system configuration. I have nevertheless made an update that may (or may not) help clearing FEniCS solution files somewhat (build 20.05.122). The following points might also be a good idea to consider:

- If you have a system with traditional hard disks instead of solid state drives (SSD) it might be a good idea to upgrade to an SSD which would improve disk/IO performance significantly.

- Anti-virus software (including Windows defender) can also degrade performance significantly. It is recommended to exclude WSL folders which for example FEniCS uses from Windows defender checking (as Linux is anyway not prone to viruses).

- As I have suggested before; for best GUI responsiveness and performance it is recommended to run FEATool with Matlab R2011b.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
That's too bad you cannot reproduce this issue.  I have a high end desktop machine, with a Xeon 8 core processor, 16G memory, all SSD drives, and a Quadro P2000 graphics card.  I do use Bitdefender firewall and antivirus, but I will point out that 1.12.1 did not see this problem with 1.12.1, but saw it on 1.12.2, using the exact same file in both cases.  Something was different in 1.12.2 that caused this to happen, on the same machine.  I'll try the new build and see if there is a difference.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
I tried build 122, and the fenics is back to running correctly again, exiting pretty quickly after clearing files.  However, the issue I reported about running the std solver on a different problem is still there.  If I load a fenics problem, run it, then load a different problem that uses the std solver, it runs very slowly.  If I exit the app, reload it, and start the second std solver problem again, it runs normally.  Evidently, after the fenics problem runs, some memory somewhere is not getting cleared, or something.  Hopefully you can find this issue.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
tkdiff wrote
I have a high end desktop machine, with a Xeon 8 core processor, 16G memory, all SSD drives, and a Quadro P2000 graphics card.
Ok, clearly it is not your system capabilities that would be the issue. It is indeed strange you observe this severe level of slowdowns with your system, it seems something is really not running optimal (with Matlab?).

tkdiff wrote
The issue I reported about running the std solver on a different problem is still there.  If I load a fenics problem, run it, then load a different problem that uses the std solver, it runs very slowly.  If I exit the app, reload it, and start the second std solver problem again, it runs normally.  Evidently, after the fenics problem runs, some memory somewhere is not getting cleared, or something.
Could also you clarify

1) whether this was not also an issue with version 1.12.1 (or earlier)?

2) whether you can observe the same slowdown after running the built-in solver twice (built-in > built-in instead of fenics > built-in)?
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
The only thing slow with running fenics was the time it took to clear out the fenics files.  The more time steps run the more time it took.  That seems to be fixed with the 122 build.

1.  The long time for fenics to clear files out was NOT present in 1.12.1.  I do not recall if I tested running a fenics file first then a built in solver file.  I first noticed the issue of the built in solver slowing down in 1.12.2, initial build.

2.  No slowdown after running the built in solver multiple times (>2 at least).  The slowdown of the built in solver after running the fenics solver is still present in the 122 build.

I sincerely do not believe this to be a fault of my system, unless it is Matlab itself.  I am running R2019B, which is the first version I bought.  Files that I port from featool to matlab and run them there run like greased lightning.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
Anything further on this issue?  See my answers to your questions above.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
tkdiff wrote
Anything further on this issue?  See my answers to your questions above.
I will look in to it further as soon as I get a chance, but I guess as you say your FEATool models run vert fast in the command line interface, the issue is the Matlab GUI which as I've said before I can't really influence much (and as I've also said before, Matlab R2011b is the fastest version for better GUI performance).
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

randress
Precise Simulation wrote
tkdiff wrote
Anything further on this issue?  See my answers to your questions above.
I will look in to it further as soon as I get a chance, but I guess as you say your FEATool models run vert fast in the command line interface, the issue is the Matlab GUI which as I've said before I can't really influence much (and as I've also said before, Matlab R2011b is the fastest version for better GUI performance).
Yes, I do recall your saying that ... How would we go about using the Matlab R2011b GUI?  Rollback our entire Matlab install to that version?

Regards,
-Randal
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
randress wrote
How would we go about using the Matlab R2011b GUI?  Rollback our entire Matlab install to that version?
Matlab 2011b does not support installation of toolboxes, so you basically just download/unzip the FEATool distribution in a folder, change directory to the folder "cd folder", and start/launch FEATool by typg "featool" in the Matlab CLI. See the section "For MATLAB 2009b-2012a" in:

    https://www.featool.com/doc/quickstart.html#install
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

tkdiff
In reply to this post by Precise Simulation
I was referring to the questions I answered for you....if that gave you any further insight into the issue.  When I say it goes very fast in Matlab, that is referring to exporting a .m file into Matlab and running it in the matlab command window as a basic executable.

I guess the thing that keeps me asking about this is that the issue was not present in 1.12.1, then was present in 1/12/2 (original release), then improved but not completely in the last release of 1.12.2.  So the code has changed, not my computer setup causing the problem, as you suggested.  Hope you can find the problem.
Reply | Threaded
Open this post in threaded view
|

Re: version 1.12.2 issue with fenics

Precise Simulation
Administrator
tkdiff wrote
When I say it goes very fast in Matlab, that is referring to exporting a .m file into Matlab and running it in the matlab command window as a basic executable.
Well, the issues you are experiencing are then due to the Matlab GUI implementation as, wether you are running a model in the GUI or on the command line it is using exactly the same code, but in the GUI it is also displaying/printing to the GUI windows which is slow in Matlab. Whenever I find free time I'm working on rewriting FEATool in another framework which should significantly improved performance, but that is not likely to be ready for quite some time.

tkdiff wrote
I guess the thing that keeps me asking about this is that the issue was not present in 1.12.1
Unfortunately, I have not been able to detect any further regressions from older versions. If you don't specifically need or use any of the introduced features from the 1.12.2 builds I would then suggest you roll back to version 1.12.1 and if possible (re-)confirm that your issues are indeed not present.