1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "COST_CPPOPTIONS.h" |
5 |
|
6 |
|
7 |
subroutine cost_final_store ( mythid, lastdiva ) |
8 |
|
9 |
c ================================================================== |
10 |
c SUBROUTINE cost_final_store |
11 |
c ================================================================== |
12 |
c |
13 |
c Store cost function value |
14 |
c This is required in conjunction with DIVA |
15 |
c heimbach@mit.edu 5-Mar-2003 |
16 |
c |
17 |
c ================================================================== |
18 |
c SUBROUTINE cost_final_store |
19 |
c ================================================================== |
20 |
|
21 |
implicit none |
22 |
|
23 |
c == global variables == |
24 |
|
25 |
#include "EEPARAMS.h" |
26 |
#include "SIZE.h" |
27 |
|
28 |
#include "cost.h" |
29 |
|
30 |
c == routine arguments == |
31 |
|
32 |
integer mythid |
33 |
logical lastdiva |
34 |
|
35 |
# ifdef ALLOW_DIVIDED_ADJOINT |
36 |
|
37 |
c == local variables == |
38 |
|
39 |
c == end of interface == |
40 |
|
41 |
c-- Each process has calculated the global part for itself. |
42 |
lastdiva = .FALSE. |
43 |
|
44 |
IF (myProcId .eq. 0) THEN |
45 |
_BEGIN_MASTER( mythid ) |
46 |
open(unit=76,file='costfinal') |
47 |
write(76,*) fc |
48 |
close(76) |
49 |
_END_MASTER( mythid ) |
50 |
ENDIF |
51 |
_BARRIER |
52 |
|
53 |
#endif |
54 |
|
55 |
end |