Hello alltogether,
currently I am trying to use the SaveScalars solver to output some temperature data on a very simple transient model that I made for a test case. Once I know the different things to watch out for, I'll enlarge it to the real task I am after
However, right now I am stuck with the funtionality, that savescalars solver shall output temperature data on two defined nodes into a data file. It works fine when ElmerSolver runs only in one instance, but when I use MPI, the data file is screwed up, no matter what I try. Sometimes it stores just the y and z coordinates of the nodes, skipping the x coordinate, but in all cases, it does not store the two temperatures. Sometimes, the parallel run crashes with segmentation fault, but runs flawlessly when started once more without changes...
I have attached the case.sif, the result data files and the result.names files for both cases, with and without MPI. Also, I attach a ZIP with the complete project directory for anyone wanting to try this small case out. Thank you for your kind attention,
Thomas.
p.s. here only the file without MPI are added, the next posts have with MPI and the project ZIP
Save Scalars: mixed up result file in parallel run - SOLVED
-
- Posts: 47
- Joined: 18 Jan 2019, 18:18
- Antispam: Yes
Save Scalars: mixed up result file in parallel run - SOLVED
- Attachments
-
- result_without_mpi.csv
- (1.73 KiB) Downloaded 99 times
-
- result.csv.names.txt
- (500 Bytes) Downloaded 102 times
-
- case_without_mpi.sif
- (2.89 KiB) Downloaded 97 times
Last edited by thomasatelmer on 29 Nov 2021, 21:52, edited 1 time in total.
-
- Posts: 47
- Joined: 18 Jan 2019, 18:18
- Antispam: Yes
Re: Save Scalars: mixed up result file in parallel run
here with MPI...
- Attachments
-
- result_with_MPI.csv
- (1.3 KiB) Downloaded 101 times
-
- result.csv.names_with_MPI.txt
- (418 Bytes) Downloaded 105 times
-
- case_with_MPI.sif
- (2.89 KiB) Downloaded 99 times
-
- Posts: 47
- Joined: 18 Jan 2019, 18:18
- Antispam: Yes
Re: Save Scalars: mixed up result file in parallel run
and lastly, the project file
- Attachments
-
- SaveScalars_mixup.zip
- (36.79 KiB) Downloaded 99 times
Re: Save Scalars: mixed up result file in parallel run
Hello,
It might be interesting if you would try using SaveLine, with a polyline from one node to the other node, and see if that solver works any better for parallel runs?
Best regards, Rich.
It might be interesting if you would try using SaveLine, with a polyline from one node to the other node, and see if that solver works any better for parallel runs?
Best regards, Rich.
Re: Save Scalars: mixed up result file in parallel run
Hello,
I loaded the elmergui project and noticed the menu for SaveScalars is crossed with StressSolve, as shown in this screen shot.
You may want to try moving the savescalars.xml file from edf-extra into the edf folder. Recreate the project and that may help fix the crossed up menu. I worked for me once, it might help you too.
When the additional xml menu files have been moved from edf-extra to edf, then all of the solver tabs will be in alphabetical order and they shouldn't be crossed.
Rich.
I loaded the elmergui project and noticed the menu for SaveScalars is crossed with StressSolve, as shown in this screen shot.
You may want to try moving the savescalars.xml file from edf-extra into the edf folder. Recreate the project and that may help fix the crossed up menu. I worked for me once, it might help you too.
When the additional xml menu files have been moved from edf-extra to edf, then all of the solver tabs will be in alphabetical order and they shouldn't be crossed.
Rich.
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Save Scalars: mixed up result file in parallel run
Hi
Try instead
The code seems to look for local indexes which does not master well parallel cases where each partition has just its local nodes. If you give coordinates then the closest one will be found in parallel.
-Peter
Try instead
Code: Select all
Save Coordinates(3,2) = x1 y1 z1 x2 y2 z2
-Peter
-
- Posts: 47
- Joined: 18 Jan 2019, 18:18
- Antispam: Yes
Re: Save Scalars: mixed up result file in parallel run
Hello, Peter, Rich,
thank you for your quick reply. For the phenomenon of the solver orders in the menu, the savescalars.xml is actually in the edf folder. I normally move the files when I need the solver the first time for some simulation, before it is just memory and speed invest... But for some reason, the graphical menu is mixed up in order. This reminds me of another effect I have noticed: the entries in the case.sif are sometimes quite shaken up; then the instruction for setting coordinate_3 is given first, then e.g. coordinate_1 and after another settings line there comes the last coordinate, or the like. Up to now, I have not noticed any issues with this, it is just weird to check such a SIF file, as you have to read back and forth .
Peter, this hint actually solved the problem. I just tried it out, and it works fine with local and distributed calculation. Honestly, I used the nodes route initially, as I understood this option better in the Elmer Models Manual. But I have the coordinates as well, so now I can use the identification by X|Y|Z.
Thank you both,
Thomas.
thank you for your quick reply. For the phenomenon of the solver orders in the menu, the savescalars.xml is actually in the edf folder. I normally move the files when I need the solver the first time for some simulation, before it is just memory and speed invest... But for some reason, the graphical menu is mixed up in order. This reminds me of another effect I have noticed: the entries in the case.sif are sometimes quite shaken up; then the instruction for setting coordinate_3 is given first, then e.g. coordinate_1 and after another settings line there comes the last coordinate, or the like. Up to now, I have not noticed any issues with this, it is just weird to check such a SIF file, as you have to read back and forth .
Peter, this hint actually solved the problem. I just tried it out, and it works fine with local and distributed calculation. Honestly, I used the nodes route initially, as I understood this option better in the Elmer Models Manual. But I have the coordinates as well, so now I can use the identification by X|Y|Z.
Thank you both,
Thomas.
Re: Save Scalars: mixed up result file in parallel run - SOLVED
Hello Thomas,
Looking at your ElmerGui project and the generated sif file, one can see a 'Run Control' section, as shown in this screen shot:
What is interesting is the clever use of the free text input field in the Header section. This trick allows storing the Run Control section in the ElmerGui project file, without having to manually edit the sif file.
Rich.
Looking at your ElmerGui project and the generated sif file, one can see a 'Run Control' section, as shown in this screen shot:
What is interesting is the clever use of the free text input field in the Header section. This trick allows storing the Run Control section in the ElmerGui project file, without having to manually edit the sif file.
Rich.
Re: Save Scalars: mixed up result file in parallel run - SOLVED
Hello,
from ElmerModelsManual:
So it should be:
(notice that 2 and 3 are swapped)
Matteo
from ElmerModelsManual:
Code: Select all
Save Coordinates(n,DIM)
Code: Select all
Save Coordinates(2,3) = x1 y1 z1 x2 y2 z2
Matteo