Hello,
A solution is to define a variable QOUT, the processor which has the real QOUT gives its value, the others set it to 0, they all processors do :
IF(NCSIZE.GT.1) QOUT=P_DMAX(QOUT)
You possibly will have to declare:
DOUBLE PRECISION P_DMAX
EXTERNAL P_DMAX
If QOUT may be >0 or <0
the formula QOUT=P_DMAX(QOUT)+P_DMIN(QOUT) will do the job.
However I do not know how you compute QOUT, if it is a summ of contributions of points, you may simply have to sum all the QOUT of different processors (those with no contributing points giving 0.D0), the sum is QOUT=P_DSUM(QOUT).
With best regards,
Jean-Michel Hervouet