Civil Engineering Reference
In-Depth Information
involved. Margetts (2002) (see also Smith and Margetts, 2003) has shown that there is cer-
tainly no simple solution to this problem for complicated domains. Four different domain
compositions, shown in Figure 12.7 for the case of a buttress dam, led to broadly similar
analysis times on a supercomputer. Some compositions lead to fewer large messages being
exchanged between processors and others to more short messages.
For the cuboidal meshes used in this Chapter a “naive” composition by slices on
x
-
z
planes is used.
12.2.11 Load balancing
In our “naive” domain compositions the “load” on processors (the amount of computation
they do) is almost perfectly distributed or “balanced” by assigning almost equal numbers
of elements, nels_pp and equations, neq_pp to each processor. Note that if the mesh is
too small for the number of processors requested, the analysis will not continue.
We are now in a position to describe the parallel programs in detail.
Program 12.1 Three dimensional analysis of an elastic solid. Compare Program 5.5.
PROGRAM p121
!-------------------------------------------------------------------------
! Program 5.5 three dimensional analysis of an elastic solid
! using 20-node brick elements, preconditioned conjugate gradient
! solver; only integrate one element, diagonal preconditioner
! diag_precon; parallel version ; loaded freedoms only ; cube_bc
!-------------------------------------------------------------------------
USE new_library; USE geometry_lib; USE precision; USE utility
USE mp_module ; USE timing ; USE global_variables1
USE gather_scatter6; IMPLICIT NONE
! ndof, nels, neq , ntot are now global variables - not declared
INTEGER::nxe,nye,nze,nn,nr,nip,nodof=3,nod=20,nst=6,loaded_freedoms, &
i,j,k,ndim=3,iters,limit,iel,num_no,no_index_start,neq_temp,nn_temp,nle
REAL(iwp)::aa,bb,cc,e,v,det,tol,up,alpha,beta,q
CHARACTER(LEN=15)::element= 'hexahedron'; LOGICAL :: converged
!-------------------------- dynamic arrays--------------------------------
REAL(iwp),ALLOCATABLE :: points(:,:),dee(:,:),coord(:,:), weights(:), &
val(:),p_g_co_pp(:,:,:), jac(:,:), der(:,:), deriv(:,:),bee(:,:), &
km(:,:),eld(:),eps(:),sigma(:),eld_pp(:,:),diag_precon_pp(:),p_pp(:),&
r_pp(:),x_pp(:), xnew_pp(:),u_pp(:),pmul_pp(:,:),utemp_pp(:,:),
&
d_pp(:),diag_precon_tmp(:,:)
INTEGER, ALLOCATABLE :: rest(:,:), g(:), num(:), g_num_pp(:,:)
,
&
g_g_pp(:,:),no(:),no_local_temp(:),no_local(:)
!-------------------------input and initialisation------------------------
timest(1) = elap_time( )
;
CALL find_pe_procs(numpe,npes)
IF (numpe==npes) THEN
OPEN (10,FILE='p121.dat',STATUS= 'OLD',ACTION='READ')
READ (10,*) nels,nxe,nze,nip,aa,bb,cc,e,v, tol,limit
END IF
Search WWH ::




Custom Search