110 likes | 198 Views
Paralleling the Integrate Method for Pulse Laser Transport Code. MTH 6240 By Xiaodong Lu. Mathematical formulation: G (z, t) =. Assign LOCAL_NR, VR. NR = NT-NZ+10 NNPP = MOD(NR,P) IF(NNPP .EQ. 0)THEN LOCAL_NR = INT(NR/P) ELSE IF(my_rank .LE. NNPP-1)THEN
E N D
Paralleling the Integrate Method for Pulse Laser Transport Code MTH 6240 By Xiaodong Lu
Mathematical formulation: G (z, t) =
Assign LOCAL_NR, VR NR = NT-NZ+10 NNPP = MOD(NR,P) IF(NNPP .EQ. 0)THEN LOCAL_NR = INT(NR/P) ELSE IF(my_rank .LE. NNPP-1)THEN LOCAL_NR = INT(NR/P) + 1 ELSE LOCAL_NR = INT(NR/P) END IF END IF
IF(NNPP .EQ. 0)THEN RV =my_rank*LOCAL_NR*DRV ELSE IF (my_rank .LE. NNPP-1)THEN RV = my_rank*LOCAL_NR*DRV ELSE RV = NNPP*(LOCAL_NR+1)* $ DRV+(my_rank -NNPP) $ *LOCAL_NR*DRV END IF END IF
MPI CALL CALL MPI_ALLREDUCE(LOCAL_SUMGV,SUMGV, $ 1, MPI_DOUBLE_PRECISION, $ MPI_SUM,MPI_COMM_WORLD, IERR)
Sp= • Cp= • Ep= Sp/p