File: copy_example_datafiles_a9727ca.patch

package info (click to toggle)
superlu-dist 9.2.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,440 kB
  • sloc: ansic: 173,245; cpp: 7,264; sh: 5,677; f90: 854; python: 566; makefile: 455; fortran: 51; csh: 9
file content (213 lines) | stat: -rw-r--r-- 7,179 bytes parent folder | download
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
From a9727ca9bc99e91ffc053a1c22422ad5110850ee Mon Sep 17 00:00:00 2001
From: Sherry Li <xsli@lbl.gov>
Date: Sat, 15 Nov 2025 12:57:42 -0800
Subject: [PATCH] copy the small example matrices g20 and cg20 to the build
 directory; add diagostic printing in FORTRAN code showing whether 64-bit is
 used.

---
 CMakeLists.txt          | 4 ++++
 EXAMPLE/CMakeLists.txt  | 1 +
 FORTRAN/f_5x5.F90       | 2 ++
 FORTRAN/f_pddrive.F90   | 7 ++++++-
 FORTRAN/f_pddrive3d.F90 | 9 +++++++--
 FORTRAN/f_psdrive.F90   | 9 +++++++--
 FORTRAN/f_pzdrive.F90   | 7 ++++++-
 FORTRAN/f_pzdrive3d.F90 | 9 +++++++--
 README.md               | 5 +++++
 9 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cc0a997..ca2912be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -675,4 +675,8 @@ configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU
 # Following is to configure a file for FORTRAN code
 configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/FORTRAN/superlu_dist_config.h)
 
+# Copy example matrix files to the build directory
+file(COPY ${SuperLU_DIST_SOURCE_DIR}/EXAMPLE/g20.rua DESTINATION ${CMAKE_BINARY_DIR}/EXAMPLE)
+file(COPY ${SuperLU_DIST_SOURCE_DIR}/EXAMPLE/cg20.cua DESTINATION ${CMAKE_BINARY_DIR}/EXAMPLE)
+
 #message("MPI_Fortran_LINK_FLAGS '${MPI_Fortran_LINK_FLAGS}'")
diff --git a/EXAMPLE/CMakeLists.txt b/EXAMPLE/CMakeLists.txt
index c81f61da..2ef0d7c7 100644
--- a/EXAMPLE/CMakeLists.txt
+++ b/EXAMPLE/CMakeLists.txt
@@ -38,6 +38,7 @@ if(enable_double)
   set(DEXM pddrive.c dcreate_matrix.c)
   add_executable(pddrive ${DEXM})
   target_link_libraries(pddrive ${all_link_libs})
+  add_superlu_dist_example(pddrive big.rua 2 2)
   install(TARGETS pddrive RUNTIME DESTINATION "${INSTALL_LIB_DIR}/EXAMPLE")  
   
   set(DEXM1 pddrive1.c dcreate_matrix.c)
diff --git a/FORTRAN/f_5x5.F90 b/FORTRAN/f_5x5.F90
index 7585da3a..473c5b02 100644
--- a/FORTRAN/f_5x5.F90
+++ b/FORTRAN/f_5x5.F90
@@ -87,6 +87,8 @@ program f_5x5
          write(*,*) ' default integer size ', kind(0) 
 #if (XSDK_INDEX_SIZE==64)
          write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
 #endif 
       endif
 !
diff --git a/FORTRAN/f_pddrive.F90 b/FORTRAN/f_pddrive.F90
index c69792af..74e91ced 100644
--- a/FORTRAN/f_pddrive.F90
+++ b/FORTRAN/f_pddrive.F90
@@ -4,7 +4,7 @@
 !! \brief The driver program to solve a linear system with default options.
 !!
 !! <pre>
-!! -- Distributed SuperLU routine (version 3.2) --
+!! -- Distributed SuperLU routine (version 9.0) --
 !! Lawrence Berkeley National Lab, Univ. of California Berkeley.
 !! October, 2012
 !! </pre>
@@ -79,6 +79,11 @@ program f_pddrive
       endif
       if ( iam == 0 ) then 
          write(*,*) ' Process grid ', nprow, ' X ', npcol
+#if (XSDK_INDEX_SIZE==64)
+         write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
+#endif 
       endif
 
 ! Read and distribute the matrix to the process gird
diff --git a/FORTRAN/f_pddrive3d.F90 b/FORTRAN/f_pddrive3d.F90
index b29eeb7d..3ea04a36 100644
--- a/FORTRAN/f_pddrive3d.F90
+++ b/FORTRAN/f_pddrive3d.F90
@@ -14,9 +14,9 @@
 !! \brief The driver program to solve a linear system with default options.
 !!
 !! <pre>
-!! -- Distributed SuperLU routine (version 7.0) --
+!! -- Distributed SuperLU routine (version 9.0) --
 !! Lawrence Berkeley National Lab, Univ. of California Berkeley.
-!! May 12, 2021
+!! September 10, 2021
 !! </pre>
 !
       program f_pddrive3d
@@ -93,6 +93,11 @@ program f_pddrive3d
       endif
       if ( iam == 0 ) then 
          write(*,*) ' Process grid: ', nprow, ' X', npcol, ' X', npdep
+#if (XSDK_INDEX_SIZE==64)
+         write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
+#endif 
       endif
 
 ! Read and distribute the matrix to the process gird
diff --git a/FORTRAN/f_psdrive.F90 b/FORTRAN/f_psdrive.F90
index e7014834..f135be7d 100644
--- a/FORTRAN/f_psdrive.F90
+++ b/FORTRAN/f_psdrive.F90
@@ -4,7 +4,7 @@
 !! \brief The driver program to solve a linear system with default options.
 !!
 !! <pre>
-!! -- Distributed SuperLU routine (version 3.2) --
+!! -- Distributed SuperLU routine (version 9.0) --
 !! Lawrence Berkeley National Lab, Univ. of California Berkeley.
 !! October, 2012
 !! </pre>
@@ -29,7 +29,7 @@ program f_psdrive
 !   7. Release all structures
 !
 !
-      #include "superlu_dist_config.fh"
+#include "superlu_dist_config.fh"
       use superlu_mod
       include 'mpif.h'
       integer maxn, maxnz, maxnrhs
@@ -78,6 +78,11 @@ program f_psdrive
       endif
       if ( iam == 0 ) then 
          write(*,*) ' Process grid ', nprow, ' X ', npcol
+#if (XSDK_INDEX_SIZE==64)
+         write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
+#endif 
       endif
 
 ! Read and distribute the matrix to the process gird
diff --git a/FORTRAN/f_pzdrive.F90 b/FORTRAN/f_pzdrive.F90
index f493f1d5..0013c7ad 100644
--- a/FORTRAN/f_pzdrive.F90
+++ b/FORTRAN/f_pzdrive.F90
@@ -3,7 +3,7 @@
 !! \brief The driver program to solve a linear system with default options.
 !!
 !! <pre>
-!! -- Distributed SuperLU routine (version 3.2) --
+!! -- Distributed SuperLU routine (version 9.0) --
 !! Lawrence Berkeley National Lab, Univ. of California Berkeley.
 !! October, 2012
 !! </pre>
@@ -79,6 +79,11 @@ program f_pzdrive
       endif
       if ( iam == 0 ) then 
          write(*,*) ' Process grid ', nprow, ' X ', npcol
+#if (XSDK_INDEX_SIZE==64)
+         write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
+#endif 
       endif
 
 ! Read and distribute the matrix to the process gird
diff --git a/FORTRAN/f_pzdrive3d.F90 b/FORTRAN/f_pzdrive3d.F90
index a299d7b3..b9506972 100644
--- a/FORTRAN/f_pzdrive3d.F90
+++ b/FORTRAN/f_pzdrive3d.F90
@@ -13,9 +13,9 @@
 !! \brief The driver program to solve a linear system with default options.
 !!
 !! <pre>
-!! -- Distributed SuperLU routine (version 7.0) --
+!! -- Distributed SuperLU routine (version 9.0) --
 !! Lawrence Berkeley National Lab, Univ. of California Berkeley.
-!! May 12, 2021
+!! September 10, 2021
 !! </pre>
 !
       program f_pzdrive3d
@@ -93,6 +93,11 @@ program f_pzdrive3d
       endif
       if ( iam == 0 ) then 
          write(*,*) ' Process grid: ', nprow, ' X', npcol, ' X', npdep
+#if (XSDK_INDEX_SIZE==64)
+         write(*,*) ' use 64-bit integer for A matrix'
+#else         
+         write(*,*) ' use 32-bit integer for A matrix'
+#endif 
       endif
 
 ! Read and distribute the matrix to the process gird
diff --git a/README.md b/README.md
index 67ca0dce..df366429 100644
--- a/README.md
+++ b/README.md
@@ -224,6 +224,11 @@ or,
 or,
 `ctest -D Nightly`
 
+In build/EXAMPLE/ directory, you can also type:
+'ctest'
+to run the examples.
+
+
 **NOTE:**
 The parallel execution in ctest is invoked by "mpiexec" command which is
 from MPICH environment. If your MPI is not MPICH/mpiexec based, the test