Save Scalars and Parallel Reduce

Clearly defined bug reports and their fixes
Post Reply
fgillet
Posts: 46
Joined: 30 Sep 2010, 16:58

Save Scalars and Parallel Reduce

Post by fgillet »

Hi

in the SaveScalars, for Boundary integrals there is lines like this

DO j=1,Model % NumberOfBCs
IF( BoundaryHits(j) > 0 ) THEN
IF( TRIM(Oper) == 'boundary int mean' ) THEN
BoundaryFluxes(j) = BoundaryFluxes(j) / BoundaryAreas(j)
END IF
WRITE (Name,'(A,A,A,A,I2)') TRIM(Oper),': ',TRIM(VariableName),' over bc',j
CALL AddToSaveList( TRIM(Name), BoundaryFluxes(j),.FALSE.,ParOper)
END IF
END DO

If one partition has no boundary elments correspondind to the boundary where we want to save one of the operator, BoundaryHits(j) = 0 and the value will not be saved for this partition and the Parallel Reduce operation will failed.

I suggest to repalce "IF( BoundaryHits(j) > 0 ) THEN"
by
"IF( ListGetLogical(Model % BCs(j) % Values,'Flux Integrate',gotIt ) .OR. &
ListGetLogical(Model % BCs(j) % Values,'Save Scalars',gotIt ) ) THEN"

as it is done to save the name of the operator few lines above.

Happy new year,

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

Re: Save Scalars and Parallel Reduce

Post by raback »

Hi Fabien

Thanx for the feedback. There's also another problem with the "boundary int mean" operator: it's not commutative with the parallel reduction. Therefore my advice for computing means over boundaries in parallel would be to compute "boundary int" and "area" and make the division afterwards manually. The reason for this problem is that all the reductions are done in one place and computation of means is buried within a subroutine.

-Peter
Post Reply