OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
debug_mod Module Reference

Functions/Subroutines

pure integer function sp_checksum (a, siz1, siz2)
pure integer function dp_checksum (a, siz1, siz2)
pure integer function int_checksum (a, siz1, siz2)

Variables

integer, dimension(:), allocatable itab_debug
 User Node Identifiers.
integer ncycle_debug
 Engine Cycle number.
integer ispmd_debug
 processor id

Function/Subroutine Documentation

◆ dp_checksum()

pure integer function debug_mod::dp_checksum ( double precision, dimension(siz2,siz1), intent(in) a,
integer, intent(in) siz1,
integer, intent(in) siz2 )

Definition at line 113 of file debug_mod.F.

114C Prints Adler 32 checksum of A(1:SIZ2,1:SIZ1) in *1.out file
115C-----------------------------------------------
116C I m p l i c i t T y p e s
117C-----------------------------------------------
118#include "implicit_f.inc"
119C-----------------------------------------------
120C C o m m o n B l o c k s
121C-----------------------------------------------
122#include "com01_c.inc"
123#include "com04_c.inc"
124#include "task_c.inc"
125#include "spmd_c.inc"
126#include "chara_c.inc"
127#include "units_c.inc"
128C-----------------------------------------------
129C-----------------------------------------------
130C D u m m y A r g u m e n t s
131C-----------------------------------------------
132 INTEGER, INTENT(IN) :: SIZ1,SIZ2
133 DOUBLE PRECISION, INTENT(IN) :: A(SIZ2,SIZ1)
134C-----------------------------------------------
135C L o c a l V a r i a b l e s
136C-----------------------------------------------
137 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP
138 INTEGER :: I,CHECKSUM,ROOT,S1,S2,TWO_POWER_16
139 INTEGER :: PREC ! simple or double precision
140 INTEGER :: SIZ
141C-----------------------------------------------
142 root = 65521
143 two_power_16 = 65536
144 s1 = 1
145 s2 = 0
146 prec = 2
147C If A is in simple precision
148 IF(sizeof(a(1,1)) == 4) prec = 1
149 siz = siz1*siz2 * prec
150 ALLOCATE(tmp(siz))
151 tmp(1:siz) = 0
152c Convert A in integer
153 tmp = transfer(a(1:siz2,1:siz1),s1,siz)
154 DO i = 1,siz
155 s1 = mod(s1 + tmp(i),root)
156 s2 = mod(s1 + s2 ,root)
157 ENDDO
158C (s2 << 16) | s1
159 checksum = ior(s2 * two_power_16,s1)
160 DEALLOCATE(tmp)

◆ int_checksum()

pure integer function debug_mod::int_checksum ( integer, dimension(siz2,siz1), intent(in) a,
integer, intent(in) siz1,
integer, intent(in) siz2 )

Definition at line 169 of file debug_mod.F.

170C Prints Adler 32 checksum of A(1:SIZ2,1:SIZ1) in *1.out file
171C-----------------------------------------------
172C I m p l i c i t T y p e s
173C-----------------------------------------------
174#include "implicit_f.inc"
175C-----------------------------------------------
176C C o m m o n B l o c k s
177C-----------------------------------------------
178#include "com01_c.inc"
179#include "com04_c.inc"
180#include "task_c.inc"
181#include "spmd_c.inc"
182#include "chara_c.inc"
183#include "units_c.inc"
184C-----------------------------------------------
185C-----------------------------------------------
186C D u m m y A r g u m e n t s
187C-----------------------------------------------
188 INTEGER, INTENT(IN) :: SIZ1,SIZ2
189 INTEGER, INTENT(IN) :: A(SIZ2,SIZ1)
190C-----------------------------------------------
191C L o c a l V a r i a b l e s
192C-----------------------------------------------
193 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP
194 INTEGER :: I,CHECKSUM,ROOT,S1,S2,TWO_POWER_16
195 INTEGER :: PREC ! simple or double precision
196 INTEGER :: SIZ
197C-----------------------------------------------
198 root = 65521
199 two_power_16 = 65536
200 s1 = 1
201 s2 = 0
202 prec = 2
203C If A is in simple precision
204 IF(sizeof(a(1,1)) == 4) prec = 1
205 siz = siz1*siz2 * prec
206 ALLOCATE(tmp(siz))
207 tmp(1:siz) = 0
208c Convert A in integer
209 tmp = transfer(a(1:siz2,1:siz1),s1,siz)
210 DO i = 1,siz
211 s1 = mod(s1 + tmp(i),root)
212 s2 = mod(s1 + s2 ,root)
213 ENDDO
214C (s2 << 16) | s1
215 checksum = ior(s2 * two_power_16,s1)
216 DEALLOCATE(tmp)

◆ sp_checksum()

pure integer function debug_mod::sp_checksum ( real*4, dimension(siz2,siz1), intent(in) a,
integer, intent(in) siz1,
integer, intent(in) siz2 )

Definition at line 60 of file debug_mod.F.

61C Prints Adler 32 checksum of A(1:SIZ2,1:SIZ1) in *1.out file
62C-----------------------------------------------
63C I m p l i c i t T y p e s
64C-----------------------------------------------
65#include "implicit_f.inc"
66#include "r4r8_p.inc"
67C-----------------------------------------------
68C C o m m o n B l o c k s
69C-----------------------------------------------
70#include "com01_c.inc"
71#include "com04_c.inc"
72#include "task_c.inc"
73#include "spmd_c.inc"
74#include "chara_c.inc"
75#include "units_c.inc"
76C-----------------------------------------------
77C-----------------------------------------------
78C D u m m y A r g u m e n t s
79C-----------------------------------------------
80 INTEGER, INTENT(IN) :: SIZ1,SIZ2
81 real*4, INTENT(IN) :: a(siz2,siz1)
82C-----------------------------------------------
83C L o c a l V a r i a b l e s
84C-----------------------------------------------
85 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP
86 INTEGER :: I,CHECKSUM,ROOT,S1,S2,TWO_POWER_16
87 INTEGER :: PREC ! simple or double precision
88 INTEGER :: SIZ
89C-----------------------------------------------
90 root = 65521
91 two_power_16 = 65536
92 s1 = 1
93 s2 = 0
94 prec = 2
95C If A is in simple precision
96 IF(sizeof(a(1,1)) == 4) prec = 1
97 siz = siz1*siz2 * prec
98 ALLOCATE(tmp(siz))
99 tmp(1:siz) = 0
100c Convert A in integer
101 tmp = transfer(a(1:siz2,1:siz1),s1,siz)
102 DO i = 1,siz
103 s1 = mod(s1 + tmp(i),root)
104 s2 = mod(s1 + s2 ,root)
105 ENDDO
106C (s2 << 16) | s1
107 checksum = ior(s2 * two_power_16,s1)
108 DEALLOCATE(tmp)

Variable Documentation

◆ ispmd_debug

integer debug_mod::ispmd_debug

processor id

Definition at line 52 of file debug_mod.F.

52 integer :: ispmd_debug !< processor id

◆ itab_debug

integer, dimension(:), allocatable debug_mod::itab_debug

User Node Identifiers.

Definition at line 50 of file debug_mod.F.

50 INTEGER, DIMENSION(:),ALLOCATABLE :: ITAB_DEBUG !< User Node Identifiers

◆ ncycle_debug

integer debug_mod::ncycle_debug

Engine Cycle number.

Definition at line 51 of file debug_mod.F.

51 INTEGER :: NCYCLE_DEBUG !< Engine Cycle number