Page 1 of 1

Savematerials in parallel

Posted: 19 Apr 2013, 14:19
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

Re: Savematerials in parallel

Posted: 11 Aug 2015, 15:44
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

Re: Savematerials in parallel

Posted: 12 Aug 2015, 09:46
by raback
Hi

How about adding

Code: Select all

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

-Peter

Re: Savematerials in parallel

Posted: 12 Aug 2015, 11:25
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