Savematerials in parallel

Clearly defined bug reports and their fixes
Post Reply
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Savematerials in parallel

Post by Franz Pichler »

Hi there,

i think the savematerials procedure from the savedata.src is not working correct if a certain parameter value doesnt exist in every partition.

So when you have a paramter A and there is a partition that doesnt find this in any of its elements it believes that this doesnt exist at all.
ANd this causes a segfault.
i cheked the source code and i think the passage where j is checked could be the problem.

Code: Select all

         IF( j == 0 ) THEN
           CALL Warn('SaveMaterials',&
               'Parameter '//TRIM(ParamName(ParamNo))//' not present in any material')
         ELSE
           WRITE( Message,'(A,I0,A)') 'Parameter > '//TRIM(ParamName(ParamNo))&
               //' < defined with ',j,' dofs'
           CALL Info('SaveMaterials',Message)
           ALLOCATE(Field(j),STAT=istat)
           IF( istat /= 0 ) CALL Fatal('SaveMaterials','Memory allocation error 3') 
           Field = 0.0_dp
           
           CALL VariableAdd( Mesh % Variables, Mesh, PointerToSolver, &
               TRIM(ParamName(ParamNo)), 1, Field, FieldPerm )         
           ParamsExist = .TRUE.
           
           NULLIFY( Field )
         END IF
Here only the processes that have elements with the parameter are calling the Variableadd function.

Could tthat cause a problem?

i am really not so sure about all this,
very curios though,

best regards
Fanz
mark smith
Posts: 215
Joined: 26 Aug 2009, 18:20
Location: Peterborough, England

Re: Savematerials in parallel

Post by mark smith »

Elmer 8.0-f0c1adb on windows 7 professional

Hi Franz & Elmer team,
I too am having problems with the savematerial solver in parallel.
I'm doing a coupled thermal-fluid flow problem, If I partition the mesh such that there is no fluid present in a partition when I call savematerials and request viscosity to be saved I get a warning that viscosity is not present in any material followed by a segmentation fault. The more partitions I split the mesh into the more likely this seems to happen as any individual partition is more likely to not include any of my fluid.
The serial solver never shows this fault in my experience.

Is there any work around as this is causing some frustration on my part ;-(

Best Regards
Mark
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Savematerials in parallel

Post by raback »

Hi

How about adding

Code: Select all

j = NINT( ParallelReduction( 1.0_dp * j ) )
Would it solve your problem?

-Peter
mark smith
Posts: 215
Joined: 26 Aug 2009, 18:20
Location: Peterborough, England

Re: Savematerials in parallel

Post by mark smith »

Hi Peter,
Unfortunately I use your recompiled windows executable and don't compile it myself, when might this be included in one of your windows nightly builds?
Regards
Mark
Post Reply