forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fool_the_compiler.F
77 lines (68 loc) · 2.97 KB
/
fool_the_compiler.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
C $Header: /u/gcmpack/MITgcm/eesupp/src/fool_the_compiler.F,v 1.10 2014/07/15 22:00:28 jmc Exp $
C $Name: $
#include "CPP_EEOPTIONS.h"
C-- File fool_the_compiler.F: Routines to prevent compiler to skip pieces of code
C-- Contents
C-- o FOOL_THE_COMPILER
C-- o FOOL_THE_COMPILER_R8
C-- o FOOL_THE_COMPILER_RL
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: FOOL_THE_COMPILER
C !INTERFACE:
SUBROUTINE FOOL_THE_COMPILER( foolishArg )
C !DESCRIPTION:
C *=================================================================*
C | SUBROUTINE FOOL\_THE\_COMPILER
C | o Dummy routine used to supress compiler behavior.
C *=================================================================*
C | Routine is used to stop compiler optimizations in which global
C | data is held in a register while it is updated by a separate
C | thread. Calling this routine introduces the possibility of side
C | effects on global data ensuring that memory locs. are reread.
C *=================================================================*
IMPLICIT NONE
CEOP
INTEGER foolishArg
RETURN
END
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: FOOL_THE_COMPILER_R8
C !INTERFACE:
SUBROUTINE FOOL_THE_COMPILER_R8( foolishArg )
C !DESCRIPTION:
C *=================================================================*
C | SUBROUTINE FOOL\_THE\_COMPILER\_R8
C | o Dummy routine used to supress compiler behavior.
C *=================================================================*
C | Routine is used to stop compiler optimizations in which global
C | data is held in a register while it is updated by a separate
C | thread. Calling this routine introduces the possibility of side
C | effects on global data ensuring that memory locs. are reread.
C *=================================================================*
IMPLICIT NONE
CEOP
Real*8 foolishArg
RETURN
END
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: FOOL_THE_COMPILER_RL
C !INTERFACE:
SUBROUTINE FOOL_THE_COMPILER_RL( foolishArg )
C !DESCRIPTION:
C *=================================================================*
C | SUBROUTINE FOOL\_THE\_COMPILER\_RL
C | o Dummy routine used to supress compiler behavior.
C *=================================================================*
C | Routine is used to stop compiler optimizations in which global
C | data is held in a register while it is updated by a separate
C | thread. Calling this routine introduces the possibility of side
C | effects on global data ensuring that memory locs. are reread.
C *=================================================================*
IMPLICIT NONE
CEOP
_RL foolishArg
RETURN
END