OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
node_checksum.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| checksum_mod ../engine/source/mpi/output/node_checksum.F
25!||--- called by ------------------------------------------------------
26!|| spmd_collect_multi_fvm ../engine/source/mpi/output/spmd_collect_multi_fvm.F
27!|| spmd_flush_accel ../engine/source/mpi/output/spmd_flush_accel.F
28!||--- uses -----------------------------------------------------
29!||====================================================================
31 INTEGER, PARAMETER :: root = 65521
32 INTEGER, PARAMETER :: TWO_POWER_16 = 65536
33
34 interface
35 subroutine adler32(data, len, checksum) bind(C, name="cpp_adler32")
36 use iso_c_binding
37 type(c_ptr), value :: data
38 integer(c_size_t), value :: len
39 integer(c_int) :: checksum
40 end subroutine adler32
41 end interface
42 CONTAINS
43!! \brief Returns Adler32 checksum of A(1:SIZ2,1:SIZ1)
44!||====================================================================
45!|| double_array_checksum ../engine/source/mpi/output/node_checksum.F
46!||--- called by ------------------------------------------------------
47!|| spmd_collect_multi_fvm ../engine/source/mpi/output/spmd_collect_multi_fvm.F
48!|| spmd_flush_accel ../engine/source/mpi/output/spmd_flush_accel.F
49!||--- calls -----------------------------------------------------
50!||--- uses -----------------------------------------------------
51!||====================================================================
52 FUNCTION double_array_checksum(A,SIZ1,SIZ2) RESULT(CHECKSUM)
53 USE iso_c_binding
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57 IMPLICIT NONE
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER, INTENT(IN) :: siz1,siz2 !< sizes
62 DOUBLE PRECISION, TARGET, INTENT(IN) :: a(siz2,siz1) !< 2D array of real values
63 INTEGER :: checksum !< return value, Adler 32 checksum of A
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 integer(c_size_t) :: len
68C-----------------------------------------------
69 len = siz2*siz1
70 len = len * sizeof(a(1,1))
71 call adler32(c_loc(a), len, checksum)
72 END
73 END MODULE checksum_mod
74
integer function double_array_checksum(a, siz1, siz2)
integer, parameter root