Using DGSUM in POSDAT.
Does someone has an example on how to use the function DGSUM in a parallel run?
I'm try to compute the average temperature from several fluid regions defined among a channel. Each region is build with up to 10 cells. I save the IP number (Pro-STAR cell number) and region number saved in two arrays in a common block in the form: myRegion IP 100 1034 100 1054 100 1029 200 3020 200 3063 ... In POSDAT I create a DO loop to read the cell temperature "T(IP)" and volume "VOL(IP)". For each sensor the Temperature average will be computed. In a single Processor It works very fine. But with two processors the results doesn't make sense. To understand I create an array to save the total volume on each sensor and for a parallel run I add in my code the DGSUM function. DO i=1,NoOfRegions IF(NHPC.GT.1)THEN ! for parallel run TotalVol(i)=DGSUM(TotalVol(i)) ENDIF ENDDO But the results from the last regions (computed in the second Host) are added to the first regions(computed in the first Host). I guess problem by the cell number. But I realy don't know. I can send the Model with user functions if someone want to take a look. Thank you in advance. |
All times are GMT -4. The time now is 02:46. |