| | 12 | |
| | 13 | I recommend to have a call the MPI communication routine '''mp_bcasti''' to broadcast the '''exit_flag''' in case of an internal error in the gamma function or error function computation. For example, we need to have something like this: |
| | 14 | |
| | 15 | |
| | 16 | {{{ |
| | 17 | DO j=JstrR,JendR |
| | 18 | DO i=IstrR,IendR |
| | 19 | fac=-0.5_r8*u0*guscale*GRID(ng)%f(i,j)*sqrt(pi)/g |
| | 20 | dw=(yr(i,j)-yr(i,Mm(ng)/2))/guscale |
| | 21 | df=fac*ERF(dw) |
| | 22 | zeta(i,j,1)=df |
| | 23 | END DO |
| | 24 | END DO |
| | 25 | # ifdef DISTRIBUTE |
| | 26 | CALL mp_bcasti (ng, model, exit_flag) ! in case of error in ERF |
| | 27 | # endif |
| | 28 | |
| | 29 | }}} |