View | Details | Raw Unified | Return to bug 268134
Collapse All | Expand All

(-)b/science/silo/Makefile (-36 / +23 lines)
Lines 1-9 Link Here
1
PORTNAME=	silo
1
PORTNAME=	silo
2
PORTVERSION=	4.10.2
2
DISTVERSION=	4.11-68
3
DISTVERSIONSUFFIX=	-bsd
3
DISTVERSIONSUFFIX=	-g819658e
4
PORTREVISION=	15
5
CATEGORIES=	science
4
CATEGORIES=	science
6
MASTER_SITES=	http://wci.llnl.gov/content/assets/docs/simulation/computer-codes/${PORTNAME}/silo-${PORTVERSION}/
7
5
8
MAINTAINER=	dbaio@FreeBSD.org
6
MAINTAINER=	dbaio@FreeBSD.org
9
COMMENT=	Mesh and field I/O library and scientific database
7
COMMENT=	Mesh and field I/O library and scientific database
Lines 12-63 WWW= https://wci.llnl.gov/simulation/computer-codes/silo Link Here
12
LICENSE=	BSD3CLAUSE
10
LICENSE=	BSD3CLAUSE
13
LICENSE_FILE=	${WRKSRC}/COPYRIGHT
11
LICENSE_FILE=	${WRKSRC}/COPYRIGHT
14
12
15
USES=		gmake libtool readline
13
USES=		cmake:testing perl5 readline
14
USE_PERL5=	build
16
USE_LDCONFIG=	yes
15
USE_LDCONFIG=	yes
17
16
18
GNU_CONFIGURE=	yes
17
USE_GITHUB=	yes
19
CONFIGURE_ARGS=	--enable-shared --disable-static
18
GH_ACCOUNT=	LLNL
20
INSTALL_TARGET=	install-strip
19
GH_PROJECT=	Silo
20
21
CMAKE_TESTING_ON=		SILO_ENABLE_TESTS # 3 tests fail, see https://github.com/LLNL/Silo/issues/289
22
CMAKE_TESTING_TARGET=		check
23
24
FFLAGS+=			-fallow-argument-mismatch # needed only for tests
21
25
22
CONFLICTS_INSTALL=		deforaos-browser # bin/browser
26
CONFLICTS_INSTALL=		deforaos-browser # bin/browser
23
27
24
OPTIONS_DEFINE=			FORTRAN HDF5 PYTHON
28
OPTIONS_DEFINE=			BROWSER FORTRAN HDF5 PYTHON SILOCK
25
OPTIONS_DEFAULT=		HDF5
29
OPTIONS_DEFAULT=		BROWSER FORTRAN HDF5 PYTHON SILOCK
26
OPTIONS_SUB=			yes
30
OPTIONS_SUB=			yes
27
31
28
FORTRAN_CONFIGURE_ENABLE=	fortran
32
BROWSER_DESC=			Enable building of browser
33
BROWSER_CMAKE_BOOL=		SILO_ENABLE_BROWSER
34
35
FORTRAN_CMAKE_BOOL=		SILO_ENABLE_FORTRAN
29
FORTRAN_USES=			fortran
36
FORTRAN_USES=			fortran
30
37
31
HDF5_LIB_DEPENDS=		libhdf5.so:science/hdf5
38
HDF5_CMAKE_BOOL=		SILO_ENABLE_HDF5
32
HDF5_CFLAGS=			-DH5_USE_110_API=1
39
HDF5_CFLAGS=			-DH5_USE_110_API=1
33
HDF5_CONFIGURE_ON=		--with-hdf5=${LOCALBASE}/include,${LOCALBASE}/lib
40
HDF5_LIB_DEPENDS=		libhdf5.so:science/hdf5
34
HDF5_PLIST_SUB=			SUFX_HDF5="h5"
41
HDF5_PLIST_SUB=			SUFX_HDF5="h5"
35
HDF5_PLIST_SUB_OFF=		SUFX_HDF5=""
42
HDF5_PLIST_SUB_OFF=		SUFX_HDF5=""
36
43
37
PYTHON_CONFIGURE_ENABLE=	pythonmodule
44
PYTHON_CMAKE_BOOL=		SILO_ENABLE_PYTHON_MODULE
38
PYTHON_USES=			python
45
PYTHON_USES=			python
39
46
40
post-patch:
47
SILOCK_DESC=			Enable building of silock
41
	@${REINPLACE_CMD} -e \
48
SILOCK_CMAKE_BOOL=		SILO_ENABLE_SILOCK
42
		's|\(_Qt_dir/include\)"|\1/qt4"| ; \
43
		 s|\(_Qt_dir/lib\)"|\1/qt4"| ; \
44
		 s|\(/uic\)"|\1-qt4"| ; \
45
		 s|\(/moc\)"|\1-qt4"| ; \
46
		 s|\(/lrelease\)"|\1-qt4"| ; \
47
		 s|\(/lupdate\)"|\1-qt4"|' ${WRKSRC}/configure
48
	@${REINPLACE_CMD} -e \
49
		'/-avoid-version/s|^|#| ; \
50
		 /^install-data-am/s|:.*|:|' ${WRKSRC}/src/Makefile.in
51
	@${REINPLACE_CMD} -e \
52
		'/-ldl/s|^|#|' ${WRKSRC}/tests/Makefile.in
53
	@${REINPLACE_CMD} -e \
54
		's|@libdir@|@pythondir@|' ${WRKSRC}/tools/python/Makefile.in
55
	@${REINPLACE_CMD} -e \
56
		's|\(INBUILD\));|\1, me);|' ${WRKSRC}/src/hdf5_drv/silo_hdf5.c
57
58
.if defined(MAINTAINER_MODE)
59
regression-test: build
60
	@cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
61
.endif
62
49
63
.include <bsd.port.mk>
50
.include <bsd.port.mk>
(-)b/science/silo/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1472243085
1
TIMESTAMP = 1670041617
2
SHA256 (silo-4.10.2-bsd.tar.gz) = 4b901dfc1eb4656e83419a6fde15a2f6c6a31df84edfad7f1dc296e01b20140e
2
SHA256 (LLNL-Silo-4.11-68-g819658e_GH0.tar.gz) = 3a7a75e196c9e39922998054378efa02b2d24dc57ab126ab15a631e2645bd0ce
3
SIZE (silo-4.10.2-bsd.tar.gz) = 13067837
3
SIZE (LLNL-Silo-4.11-68-g819658e_GH0.tar.gz) = 14028123
(-)b/science/silo/pkg-plist (-10 / +15 lines)
Lines 1-15 Link Here
1
bin/browser
1
%%BROWSER%%bin/browser
2
bin/silock
2
%%PYTHON%%bin/s2ex.py
3
bin/silodiff
3
%%SILOCK%%bin/silock
4
bin/silofile
4
%%BROWSER%%bin/silodiff
5
include/ioperf.h
5
%%BROWSER%%bin/silofile
6
cmake/SiloConfig.cmake
7
cmake/SiloConfigVersion.cmake
8
cmake/SiloTargets-%%CMAKE_BUILD_TYPE%%.cmake
9
cmake/SiloTargets.cmake
10
include/lite_pdb.h
11
include/lite_score.h
12
include/pdform.h
6
include/pmpio.h
13
include/pmpio.h
7
include/silo.h
14
include/silo.h
15
include/silo.inc
16
%%FORTRAN%%include/silo_FC.h
8
include/silo_exports.h
17
include/silo_exports.h
9
include/silo_f77.inc
10
include/silo_f9x.inc
18
include/silo_f9x.inc
11
include/silo.inc
19
%%PYTHON%%lib/Silo.so
12
%%PYTHON%%%%PYTHON_SITELIBDIR%%/Silo.so
13
lib/libsilo%%SUFX_HDF5%%.so
20
lib/libsilo%%SUFX_HDF5%%.so
14
lib/libsilo%%SUFX_HDF5%%.so.0
15
lib/libsilo%%SUFX_HDF5%%.so.0.0.0
(-)a/science/silo/files/patch-configure (-11 lines)
Removed Link Here
1
--- configure.orig	2020-09-25 00:15:00 UTC
2
+++ configure
3
@@ -30346,7 +30346,7 @@ $as_echo "$am_cv_python_pyexecdir" >&6; }
4
 $as_echo_n "checking for Python include path... " >&6; }
5
    if test -z "$PYTHON_CPPFLAGS"; then
6
       python_path=`$PYTHON -c "import distutils.sysconfig; \
7
-         print distutils.sysconfig.get_python_inc();"`
8
+			print(distutils.sysconfig.get_python_inc());"`
9
       if test -n "${python_path}"; then
10
          python_path="-I$python_path"
11
       fi
(-)a/science/silo/files/patch-python3 (-768 lines)
Removed Link Here
1
Author: Alastair McKinstry <mckinstry@debian.org>
2
Description: Changes needed for Python3 support.
3
 TODO: Changes to the C interface still needed.
4
Last-Upated: 2014-05-02
5
Forwarded: no
6
7
Index: tests/test_error.py
8
===================================================================
9
--- tests/test_error.py
10
+++ tests/test_error.py
11
@@ -47,6 +47,7 @@
12
 # reflect those  of the United  States Government or  Lawrence Livermore
13
 # National  Security, LLC,  and shall  not  be used  for advertising  or
14
 # product endorsement purposes.
15
+from __future__ import print_function
16
 import os
17
 import Silo
18
 
19
@@ -56,33 +57,33 @@ elif os.access("multi_ucd3d.h5",os.R_OK)
20
     file = "multi_ucd3d.h5"
21
 
22
 db = Silo.Open(file)
23
-print "db = ",db
24
+print( "db = ",db)
25
 
26
 try:
27
-    print "Trying to set a bad directory"
28
+    print ("Trying to set a bad directory")
29
     db.SetDir("Magrathea")
30
 except:
31
-    print "    -- Caught error"
32
+    print ("    -- Caught error")
33
 
34
 try:
35
-    print "Trying to read a bad variable"
36
+    print ("Trying to read a bad variable")
37
     db.GetVar("Arkleseizure")
38
 except:
39
-    print "    -- Caught error"
40
+    print ("    -- Caught error")
41
 
42
-print "Closing...."
43
+print ("Closing....")
44
 db.Close()
45
 
46
-print "db = ",db
47
+print ("db = ",db)
48
 
49
 try:
50
-    print "Trying to set a directory on a closed file"
51
+    print ("Trying to set a directory on a closed file")
52
     db.SetDir("domain0")
53
 except:
54
-    print "    -- Caught error"
55
+    print ("    -- Caught error")
56
 
57
 try:
58
-    print "Trying to read a variable on a closed file"
59
+    print ("Trying to read a variable on a closed file")
60
     db.SetDir("dtime")
61
 except:
62
-    print "    -- Caught error"
63
+    print ("    -- Caught error")
64
Index: tests/test_read.py
65
===================================================================
66
--- tests/test_read.py
67
+++ tests/test_read.py
68
@@ -47,6 +47,7 @@
69
 # reflect those  of the United  States Government or  Lawrence Livermore
70
 # National  Security, LLC,  and shall  not  be used  for advertising  or
71
 # product endorsement purposes.
72
+from __future__ import print_function
73
 import os
74
 import Silo
75
 
76
@@ -57,31 +58,31 @@ elif os.access("multi_ucd3d.h5",os.R_OK)
77
     file = "multi_ucd3d.h5"
78
 
79
 db = Silo.Open(file)
80
-print "db = ",db
81
-print "db.filename = '%s'"%db.filename
82
+print ("db = ",db)
83
+print ("db.filename = '%s'"%db.filename)
84
 
85
 toc = db.GetToc()
86
-print "\n-- TOC --\n",toc
87
+print ("\n-- TOC --\n",toc)
88
 
89
-print "cycle='%d'"%db.GetVar("cycle")
90
-print "dtime='%f'"%db.GetVar("dtime")
91
-print "_fileinfo='%s'"%db.GetVar("_fileinfo")
92
-print "d_vartypes=",db.GetVar("d_vartypes")
93
-print "d_varnames=",db.GetVar("d_varnames")
94
+print ("cycle='%d'"%db.GetVar("cycle"))
95
+print ("dtime='%f'"%db.GetVar("dtime"))
96
+print ("_fileinfo='%s'"%db.GetVar("_fileinfo"))
97
+print ("d_vartypes=",db.GetVar("d_vartypes"))
98
+print ("d_varnames=",db.GetVar("d_varnames"))
99
 
100
 db.SetDir("block0")
101
 toc = db.GetToc()
102
-print "mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10]
103
-print "v_data=",db.GetVar("v_data")[1:10]
104
+print ("mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10])
105
+print ("v_data=",db.GetVar("v_data")[1:10])
106
 
107
 db.SetDir("../block7")
108
 toc = db.GetToc()
109
-print "mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10]
110
-print "v_data=",db.GetVar("v_data")[1:10]
111
+print ("mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10])
112
+print ("v_data=",db.GetVar("v_data")[1:10])
113
 
114
 db.Close()
115
 
116
-print "\n"
117
+print ("\n")
118
 
119
 # ---- file 2 ----
120
 if os.access("multi_rect3d.pdb",os.R_OK):
121
@@ -90,23 +91,23 @@ elif os.access("multi_rect3d.h5",os.R_OK
122
     file = "multi_rect3d.h5"
123
 
124
 db = Silo.Open(file)
125
-print "db = ",db
126
+print ("db = ",db)
127
 
128
 toc = db.GetToc()
129
-print "\n-- TOC --\n",toc
130
+print ("i\n-- TOC --\n",toc)
131
 
132
-print "cycle='%d'"%db.GetVar("cycle")
133
-print "time='%f'"%db.GetVar("time")
134
-print "_fileinfo='%s'"%db.GetVar("_fileinfo")
135
-print "defvars_defns='%s'"%db.GetVar("defvars_defns")
136
+print ("cycle='%d'"%db.GetVar("cycle"))
137
+print ("time='%f'"%db.GetVar("time"))
138
+print ("_fileinfo='%s'"%db.GetVar("_fileinfo"))
139
+print ("defvars_defns='%s'"%db.GetVar("defvars_defns"))
140
 
141
 db.SetDir("block0")
142
 toc = db.GetToc()
143
-print "mesh1_coord0=",db.GetVar("mesh1_coord0")
144
+print ("mesh1_coord0=",db.GetVar("mesh1_coord0"))
145
 
146
 db.SetDir("/block7")
147
 toc = db.GetToc()
148
-print "mesh1_coord0=",db.GetVar("mesh1_coord0")
149
+print ("mesh1_coord0=",db.GetVar("mesh1_coord0"))
150
 
151
 db.SetDir("/")
152
 toc = db.GetToc()
153
Index: tests/test_write.py
154
===================================================================
155
--- tests/test_write.py
156
+++ tests/test_write.py
157
@@ -47,6 +47,7 @@
158
 # reflect those  of the United  States Government or  Lawrence Livermore
159
 # National  Security, LLC,  and shall  not  be used  for advertising  or
160
 # product endorsement purposes.
161
+from __future__ import silo
162
 import Silo
163
 
164
 db = Silo.Create("foo.silo", "test file")
165
Index: tools/python/pydbtoc.cpp
166
===================================================================
167
--- tools/python/pydbtoc.cpp
168
+++ tools/python/pydbtoc.cpp
169
@@ -48,6 +48,10 @@
170
 // National  Security, LLC,  and shall  not  be used  for advertising  or
171
 // product endorsement purposes.
172
 
173
+// #if PY_MAJOR_VERSION >= 3
174
+#define PyString_FromString(x) PyUnicode_FromString(x)
175
+// #endif
176
+
177
 #include "pydbtoc.h"
178
 
179
 // ****************************************************************************
180
@@ -200,7 +204,7 @@ static int DBtoc_print(PyObject *self, F
181
 static PyObject *DBtoc_GetN ## nm(PyObject *self, PyObject *args)          \
182
 {                                                                          \
183
     DBtoc *toc = ((DBtocObject*)self)->toc;                                \
184
-    PyObject *retval = PyInt_FromLong(toc->n ## nm);                       \
185
+    PyObject *retval = PyLong_FromLong(toc->n ## nm);                       \
186
     return retval;                                                         \
187
 }                                                                          \
188
 static PyObject *DBtoc_Get ## nm ## names(PyObject *self, PyObject *args)  \
189
@@ -341,46 +345,60 @@ PyTypeObject DBtocType =
190
     // Type header
191
     //
192
     PyObject_HEAD_INIT(&PyType_Type)
193
-    0,                                   // ob_size
194
-    "DBtoc",                    // tp_name
195
-    sizeof(DBtocObject),        // tp_basicsize
196
-    0,                                   // tp_itemsize
197
+#if PY_MAJOR_VERSION < 3
198
+    ob_size           : 0,
199
+#endif
200
+    tp_name           : "DBtoc",
201
+    tp_basicsize      : sizeof(DBtocObject),
202
+    tp_itemsize       : 0,
203
     //
204
     // Standard methods
205
     //
206
-    (destructor)DBtoc_dealloc,  // tp_dealloc
207
-    (printfunc)DBtoc_print,     // tp_print
208
-    (getattrfunc)DBtoc_getattr, // tp_getattr
209
-    0,//(setattrfunc)DBtoc_setattr, // tp_setattr -- this object is read-only
210
-    (cmpfunc)DBtoc_compare,     // tp_compare
211
-    (reprfunc)0,                         // tp_repr
212
+    tp_dealloc        : (destructor)DBtoc_dealloc,
213
+    tp_print          : (printfunc)DBtoc_print,
214
+#if PY_MAJOR_VERSION >= 3
215
+    tp_getattr        : 0,
216
+#else
217
+    tp_getattr        : (getattrfunc)DBtoc_getattr,
218
+#endif    
219
+    tp_setattr        : 0, // object is read-only
220
+#if PY_MAJOR_VERSION >= 3
221
+    tp_as_async       : (PyAsyncMethods*) NULL,
222
+#else    
223
+    tp_compare        : (cmpfunc)DBtoc_compare,
224
+#endif
225
+    tp_repr           : (reprfunc)0,                 
226
     //
227
     // Type categories
228
     //
229
-    0,                                   // tp_as_number
230
-    0,                                   // tp_as_sequence
231
-    0,                                   // tp_as_mapping
232
+    tp_as_number      : 0,
233
+    tp_as_sequence    : 0,
234
+    tp_as_mapping     : 0,
235
     //
236
     // More methods
237
     //
238
-    0,                                   // tp_hash
239
-    0,                                   // tp_call
240
-    (reprfunc)DBtoc_str,        // tp_str
241
-    0,                                   // tp_getattro
242
-    0,                                   // tp_setattro
243
-    0,                                   // tp_as_buffer
244
-    Py_TPFLAGS_CHECKTYPES,               // tp_flags
245
-    "This class wraps a Silo DBtoc object.", // tp_doc
246
-    0,                                   // tp_traverse
247
-    0,                                   // tp_clear
248
-    0,                                   // tp_richcompare
249
-    0                                    // tp_weaklistoffset
250
+
251
+    tp_hash           : 0, 
252
+    tp_call           :  0,
253
+    tp_str            : (reprfunc)DBtoc_str,
254
+    tp_getattro       : 0,
255
+    tp_setattro       : 0,
256
+    tp_as_buffer      : 0,
257
+#if PY_MAJOR_VERSION < 3    
258
+    tp_flags          : Py_TPFLAGS_CHECKTYPES,
259
+#else
260
+    tp_flags          : Py_TPFLAGS_DEFAULT, 
261
+#endif
262
+    tp_doc            : "This class wraps a Silo DBtoc object.",
263
+    tp_traverse       : 0, 
264
+    tp_clear          : 0,
265
+    tp_richcompare    : 0,
266
+    tp_weaklistoffset : 0,                 
267
     // PYTHON 2.2 FROM HERE
268
-    ,
269
     0,
270
     0,
271
     0,
272
-
273
+    0,
274
 };
275
 
276
 // ****************************************************************************
277
Index: tools/python/pydbfile.cpp
278
===================================================================
279
--- tools/python/pydbfile.cpp
280
+++ tools/python/pydbfile.cpp
281
@@ -56,6 +56,19 @@
282
 
283
 using std::string;
284
 
285
+#if PY_MAJOR_VERSION >= 3
286
+#define PyInt_FromLong(x) (PyLong_FromLong(x))
287
+#define PyInt_Check(x) (PyLong_Check(x))
288
+#define PyString_Check(x) PyUnicode_Check(x)
289
+#define PyInt_AS_LONG(x) PyLong_AsLong(x)
290
+#define PyString_FromStringAndSize(x,y) PyUnicode_FromStringAndSize(x,y)
291
+#define PyString_FromString(x) PyUnicode_FromString(x)
292
+#define PyString_AsString(x) PyUnicode_AsUTF8(x)
293
+
294
+#else
295
+#define Py_RETURN_NOTIMPLEMENTED return NULL
296
+#endif
297
+
298
 // ****************************************************************************
299
 //  Method:  DBfile_DBGetToc
300
 //
301
@@ -75,8 +88,8 @@ static PyObject *DBfile_DBGetToc(PyObjec
302
 
303
     if (!obj->db)
304
     {
305
-        SiloErrorFunc("This file has been closed.");
306
-        return NULL;
307
+      SiloErrorFunc(self, "This file has been closed.");
308
+      return NULL;
309
     }
310
 
311
     DBtoc *toc = DBGetToc(obj->db);
312
@@ -122,7 +135,7 @@ static PyObject *DBfile_DBGetVar(PyObjec
313
 
314
     if (!db)
315
     {
316
-        SiloErrorFunc("This file has been closed.");
317
+      SiloErrorFunc(self, "This file has been closed.");
318
         return NULL;
319
     }
320
 
321
@@ -162,7 +175,7 @@ static PyObject *DBfile_DBGetVar(PyObjec
322
                 return PyString_FromStringAndSize((char*)var, len);
323
             }
324
           default:
325
-            SiloErrorFunc("Unknown variable type.");
326
+            SiloErrorFunc(self, "Unknown variable type.");
327
             return NULL;
328
         }
329
     }
330
@@ -193,7 +206,7 @@ static PyObject *DBfile_DBGetVar(PyObjec
331
                 tmp = PyInt_FromLong(((char*)var)[i]);
332
                 break;
333
               default:
334
-                SiloErrorFunc("Unknown variable type.");
335
+                SiloErrorFunc(self, "Unknown variable type.");
336
                 return NULL;
337
             }
338
             PyTuple_SET_ITEM(retval, i, tmp);
339
@@ -220,7 +233,7 @@ static PyObject *DBfile_DBGetVarInfo(PyO
340
 
341
     if (!db)
342
     {
343
-        SiloErrorFunc("This file has been closed.");
344
+      SiloErrorFunc(self, "This file has been closed.");
345
         return NULL;
346
     }
347
 
348
@@ -247,7 +260,7 @@ static PyObject *DBfile_DBGetVarInfo(PyO
349
     {
350
         char msg[256];
351
         snprintf(msg, sizeof(msg), "Unable to get object \"%s\"", str);
352
-        SiloErrorFunc(msg);
353
+        SiloErrorFunc(self, msg);
354
         return NULL;
355
     }
356
 
357
@@ -263,7 +276,7 @@ static PyObject *DBfile_DBGetVarInfo(PyO
358
         {
359
             char msg[256];
360
             snprintf(msg, sizeof(msg), "Unable to get component \"%s\" for object \%s\"", compname.c_str(), str);
361
-            SiloErrorFunc(msg);
362
+            SiloErrorFunc(self, msg);
363
             continue;
364
         }
365
         int type = DBGetComponentType(db, str, compname.c_str());
366
@@ -371,7 +384,7 @@ static PyObject *DBfile_DBWrite(PyObject
367
 
368
     if (!db)
369
     {
370
-        SiloErrorFunc("This file has been closed.");
371
+      SiloErrorFunc(self, "This file has been closed.");
372
         return NULL;
373
     }
374
 
375
@@ -495,8 +508,8 @@ static PyObject *DBfile_DBWriteObject(Py
376
 
377
     if (!db)
378
     {
379
-        SiloErrorFunc("This file has been closed.");
380
-        return NULL;
381
+      SiloErrorFunc(self, "This file has been closed.");
382
+      return NULL;
383
     }
384
 
385
     char *objname;
386
@@ -591,7 +604,7 @@ static PyObject *DBfile_DBMkDir(PyObject
387
 
388
     if (!db)
389
     {
390
-        SiloErrorFunc("This file has been closed.");
391
+        SiloErrorFunc(self, "This file has been closed.");
392
         return NULL;
393
     }
394
 
395
@@ -601,7 +614,7 @@ static PyObject *DBfile_DBMkDir(PyObject
396
 
397
     if (DBMkDir(db, str))
398
     {
399
-        SiloErrorFunc("Could not make the directory.");
400
+        SiloErrorFunc(self, "Could not make the directory.");
401
         return NULL;
402
     }
403
     else
404
@@ -630,7 +643,7 @@ static PyObject *DBfile_DBSetDir(PyObjec
405
 
406
     if (!db)
407
     {
408
-        SiloErrorFunc("This file has been closed.");
409
+        SiloErrorFunc(self, "This file has been closed.");
410
         return NULL;
411
     }
412
 
413
@@ -640,7 +653,7 @@ static PyObject *DBfile_DBSetDir(PyObjec
414
 
415
     if (DBSetDir(db, str))
416
     {
417
-        SiloErrorFunc("Could not change directories.");
418
+        SiloErrorFunc(self, "Could not change directories.");
419
         return NULL;
420
     }
421
     else
422
@@ -669,7 +682,7 @@ static PyObject *DBfile_DBClose(PyObject
423
 
424
     if (!db)
425
     {
426
-        SiloErrorFunc("This file has been closed.");
427
+      SiloErrorFunc(self, "This file has been closed.");
428
         return NULL;
429
     }
430
 
431
@@ -678,7 +691,7 @@ static PyObject *DBfile_DBClose(PyObject
432
 
433
     if (DBClose(db))
434
     {
435
-        SiloErrorFunc("Could not close the file.");
436
+      SiloErrorFunc(self, "Could not close the file.");
437
         return NULL;
438
     }
439
     else
440
@@ -804,13 +817,15 @@ static int DBfile_print(PyObject *self,
441
 //  Creation:    July 12, 2005
442
 //
443
 // ****************************************************************************
444
+
445
+#if PY_MAJOR_VERSION < 3
446
 static PyObject *DBfile_getattr(PyObject *self, char *name)
447
 {
448
     DBfileObject *obj = (DBfileObject*)self;
449
 
450
     if (!obj->db)
451
     {
452
-        SiloErrorFunc("This file has been closed.");
453
+      SiloErrorFunc(self, "This file has been closed.");
454
         return NULL;
455
     }
456
 
457
@@ -828,6 +843,7 @@ static PyObject *DBfile_getattr(PyObject
458
 
459
     return Py_FindMethod(DBfile_methods, self, name);
460
 }
461
+#endif
462
 
463
 // ****************************************************************************
464
 //  Method:  DBfile_compare
465
@@ -849,6 +865,17 @@ static int DBfile_compare(PyObject *v, P
466
     return (a<b) ? -1 : ((a==b) ? 0 : +1);
467
 }
468
 
469
+// TODO Check this
470
+static PyObject* DBfile_richcompare(PyObject *v, PyObject *w, int op)
471
+{
472
+  switch(op){
473
+  case Py_EQ:{
474
+    if(v == w) Py_RETURN_TRUE;
475
+    Py_RETURN_FALSE;
476
+  }
477
+  default: Py_RETURN_NOTIMPLEMENTED;
478
+  }
479
+}
480
 
481
 // ****************************************************************************
482
 //  DBfile Python Type Object
483
@@ -859,44 +886,58 @@ static int DBfile_compare(PyObject *v, P
484
 // ****************************************************************************
485
 PyTypeObject DBfileType =
486
 {
487
-    //
488
-    // Type header
489
-    //
490
-    PyObject_HEAD_INIT(&PyType_Type)
491
-    0,                                   // ob_size
492
-    "DBfile",                    // tp_name
493
-    sizeof(DBfileObject),        // tp_basicsize
494
-    0,                                   // tp_itemsize
495
-    //
496
-    // Standard methods
497
-    //
498
-    (destructor)DBfile_dealloc,  // tp_dealloc
499
-    (printfunc)DBfile_print,     // tp_print
500
-    (getattrfunc)DBfile_getattr, // tp_getattr
501
-    0,//(setattrfunc)DBfile_setattr, // tp_setattr -- this object is read-only
502
-    (cmpfunc)DBfile_compare,     // tp_compare
503
-    (reprfunc)0,                         // tp_repr
504
-    //
505
-    // Type categories
506
-    //
507
-    0,                                   // tp_as_number
508
-    0,                                   // tp_as_sequence
509
-    0,                                   // tp_as_mapping
510
+  //
511
+  // Type header
512
+  //
513
+  PyObject_HEAD_INIT(&PyType_Type)
514
+#if PY_MAJOR_VERSION < 3  
515
+  ob_size        : 0,
516
+#endif  
517
+  tp_name        : "DBfil",                  
518
+  tp_basicsize   : sizeof(DBfileObject), 
519
+  tp_itemsize    : 0, 
520
+  //
521
+  // Standard methods
522
+  //
523
+  tp_dealloc     : (destructor)DBfile_dealloc,
524
+  tp_print       : (printfunc)DBfile_print,
525
+#if PY_MAJOR_VERSION >= 3
526
+  tp_getattr     : 0,                   
527
+#else
528
+  tp_getattr     : (getattrfunc)DBfile_getattr, 
529
+#endif
530
+  tp_setattr     : 0, // object is read-only
531
+#if PY_MAJOR_VERSION >= 3
532
+  tp_as_async    : (PyAsyncMethods*) NULL,
533
+#else    
534
+  tp_compare     : (cmpfunc)DBfile_compare,
535
+#endif    
536
+  tp_repr        : (reprfunc)0,
537
+  //
538
+  // Type categories
539
+  //
540
+  tp_as_number   : 0,
541
+  tp_as_sequence : 0,
542
+  tp_as_mapping  : 0,
543
     //
544
     // More methods
545
     //
546
-    0,                                   // tp_hash
547
-    0,                                   // tp_call
548
-    (reprfunc)DBfile_str,        // tp_str
549
-    0,                                   // tp_getattro
550
-    0,                                   // tp_setattro
551
-    0,                                   // tp_as_buffer
552
-    Py_TPFLAGS_CHECKTYPES,               // tp_flags
553
-    "This class wraps a Silo DBfile object.", // tp_doc
554
-    0,                                   // tp_traverse
555
-    0,                                   // tp_clear
556
-    0,                                   // tp_richcompare
557
-    0                                    // tp_weaklistoffset
558
+  tp_hash        : 0,
559
+  tp_call        : 0,
560
+  tp_str         : (reprfunc)DBfile_str,
561
+  tp_getattro    : 0,
562
+  tp_setattro    : 0,
563
+  tp_as_buffer   : 0,
564
+#if PY_MAJOR_VERSION >= 3
565
+  tp_flags       : Py_TPFLAGS_DEFAULT,
566
+#else    
567
+  tp_flags       : Py_TPFLAGS_CHECKTYPES,
568
+#endif    
569
+  tp_doc         : "This class wraps a Silo DBfile object.",
570
+  tp_traverse    : 0,
571
+  tp_clear       : 0,
572
+  tp_richcompare : (richcmpfunc)DBfile_richcompare,
573
+  tp_weaklistoffset : 0,
574
 };
575
 
576
 // ****************************************************************************
577
Index: tools/python/pysilo.h
578
===================================================================
579
--- tools/python/pysilo.h
580
+++ tools/python/pysilo.h
581
@@ -65,6 +65,6 @@
582
          ((PY_MAJOR_VERSION==Maj) && (PY_MINOR_VERSION>Min)) || \
583
          (PY_MAJOR_VERSION>Maj))
584
 
585
-void SiloErrorFunc(const char *errString);
586
+void SiloErrorFunc(PyObject *self, const char *errString);
587
 
588
 #endif
589
Index: tools/python/pysilo.cpp
590
===================================================================
591
--- tools/python/pysilo.cpp
592
+++ tools/python/pysilo.cpp
593
@@ -57,14 +57,16 @@
594
 #include <iostream>
595
 using namespace std;
596
 
597
-static PyObject             *SiloError;
598
-static PyObject             *siloModule = 0;
599
-
600
-//
601
-// Method table
602
-//
603
-
604
-std::vector<PyMethodDef> SiloMethods;
605
+struct silo_state {
606
+  PyObject *error;
607
+};
608
+
609
+#if PY_MAJOR_VERSION >= 3
610
+#define GETSTATE(m) ((struct silo_state*)PyModule_GetState(m))
611
+#else
612
+#define GETSTATE(m) (&_state)
613
+static struct silo_state _state;
614
+#endif
615
 
616
 
617
 // ****************************************************************************
618
@@ -85,38 +87,10 @@ std::vector<PyMethodDef> SiloMethods;
619
 // ****************************************************************************
620
 
621
 void
622
-SiloErrorFunc(const char *errString)
623
-{
624
-    PyErr_SetString(SiloError, errString);
625
-}
626
-
627
-// ****************************************************************************
628
-// Function: AddMethod
629
-//
630
-// Purpose:
631
-//   This function adds a method to the Silo module's Python method table.
632
-//
633
-// Arguments:
634
-//   methodName : The name of the method.
635
-//   cb         : The Python callback function.
636
-//   doc        : The documentation string for the method.
637
-//
638
-// Programmer: Brad Whitlock
639
-// Creation:   Tue Sep 4 15:36:47 PST 2001
640
-//
641
-// Modifications:
642
-//   
643
-// ****************************************************************************
644
-static void
645
-AddMethod(const char *methodName, PyObject *(cb)(PyObject *, PyObject *),
646
-          const char *doc = NULL)
647
+SiloErrorFunc(PyObject *self, const char *errString)
648
 {
649
-    PyMethodDef newMethod;
650
-    newMethod.ml_name = (char *)methodName;
651
-    newMethod.ml_meth = cb;
652
-    newMethod.ml_flags = METH_VARARGS;
653
-    newMethod.ml_doc = (char *)doc;
654
-    SiloMethods.push_back(newMethod);
655
+  struct silo_state *st = GETSTATE(self);
656
+    PyErr_SetString(st->error, errString);
657
 }
658
 
659
 
660
@@ -208,6 +182,47 @@ PyObject *silo_Create(PyObject *self, Py
661
     return DBfile_NEW(db);
662
 }
663
 
664
+static PyMethodDef silo_methods[] = {
665
+  {"Open", silo_Open, METH_VARARGS, NULL},
666
+  {"Create", silo_Create, METH_VARARGS, NULL },
667
+  {NULL, NULL}
668
+};
669
+
670
+
671
+#if PY_MAJOR_VERSION >= 3
672
+
673
+static int silo_Traverse(PyObject *m, visitproc visit, void *arg) {
674
+  Py_VISIT(GETSTATE(m)->error);
675
+  return 0;
676
+}
677
+
678
+static int silo_Clear(PyObject *m) {
679
+  Py_CLEAR(GETSTATE(m)->error);
680
+  return 0;
681
+}
682
+
683
+static struct PyModuleDef moduledef = {
684
+ m_base     : PyModuleDef_HEAD_INIT,
685
+ m_name     : "Silo",
686
+ m_doc      : NULL,
687
+ m_size     : sizeof(struct silo_state),
688
+ m_methods  : silo_methods,
689
+ m_slots    : NULL,
690
+ m_traverse : silo_Traverse,
691
+ m_clear    : silo_Clear,
692
+ m_free     : NULL
693
+};
694
+
695
+#define ADD_CONSTANT(C)  PyDict_SetItemString(d, #C, PyLong_FromLong(C))
696
+#define INITERROR        return NULL
697
+
698
+#else // Python2.*
699
+
700
+#define ADD_CONSTANT(C)  PyDict_SetItemString(d, #C, PyInt_FromLong(C))
701
+#define INITERROR        return
702
+
703
+#endif
704
+
705
 // ****************************************************************************
706
 //  Method:  initSilo
707
 //
708
@@ -226,23 +241,39 @@ PyObject *silo_Create(PyObject *self, Py
709
 //    contents returned by GetVarInfo method.
710
 //
711
 // ****************************************************************************
712
-#define ADD_CONSTANT(C)  PyDict_SetItemString(d, #C, PyInt_FromLong(C))
713
+
714
+
715
+
716
+#if PY_MAJOR_VERSION >= 3
717
+PyMODINIT_FUNC PyInit_Silo(void)
718
+#else
719
 extern "C" void initSilo()
720
+#endif
721
 {
722
-    AddMethod("Open", silo_Open,
723
-              "Usage: Open(filename [, DB_READ|DB_APPEND]])");
724
-    AddMethod("Create", silo_Create,
725
-              "Usage: Create(filename , info [, DB_PDB|DB_HDF5 [, DB_CLOBBER|DB_NOCLOBBER]])");
726
-    AddMethod(NULL, NULL);
727
 
728
 
729
-    siloModule = Py_InitModule("Silo", &SiloMethods[0]);
730
-
731
-    PyObject *d;
732
-    d = PyModule_GetDict(siloModule);
733
-    SiloError = PyErr_NewException("Silo.SiloException", NULL, NULL);
734
-    PyDict_SetItemString(d, "SiloException", SiloError);
735
 
736
+  struct silo_state *st;
737
+  PyObject *d;
738
+  
739
+#if PY_MAJOR_VERSION >= 3
740
+  PyObject *module = PyModule_Create(&moduledef);
741
+#else
742
+  PyObject *module = Py_InitModule("Silo", silo_methods);
743
+#endif
744
+	
745
+    if (module == NULL)
746
+      INITERROR;
747
+    
748
+    st = GETSTATE(module);
749
+    st->error = PyErr_NewException("Silo.SiloException", NULL, NULL);
750
+    // PyDict_SetItemString(d, "SiloException", SiloError);
751
+    if (st->error == NULL) {
752
+      Py_DECREF(module);
753
+      INITERROR;
754
+    }
755
+    d = PyModule_GetDict(module);
756
+    
757
     // File Drivers
758
     ADD_CONSTANT(DB_PDB);
759
     ADD_CONSTANT(DB_HDF5);
760
@@ -322,4 +353,8 @@ extern "C" void initSilo()
761
     ADD_CONSTANT(DB_VARTYPE_MATERIAL);
762
     ADD_CONSTANT(DB_VARTYPE_SPECIES);
763
     ADD_CONSTANT(DB_VARTYPE_LABEL);
764
+
765
+#if PY_MAJOR_VERSION >=3
766
+    return module;
767
+#endif    
768
 }
(-)a/science/silo/files/patch-python3.8 (-45 lines)
Removed Link Here
1
Description: Fix for API change with python3.8
2
Author: Alastair McKinstry <mckinstry@debian.org>
3
Last-Updated: 2019-10-25
4
Forwarded: no
5
6
Index: tools/python/pydbfile.cpp
7
===================================================================
8
--- tools/python/pydbfile.cpp
9
+++ tools/python/pydbfile.cpp
10
@@ -69,6 +69,7 @@ using std::string;
11
 #define Py_RETURN_NOTIMPLEMENTED return NULL
12
 #endif
13
 
14
+
15
 // ****************************************************************************
16
 //  Method:  DBfile_DBGetToc
17
 //
18
@@ -900,7 +901,11 @@ PyTypeObject DBfileType =
19
   // Standard methods
20
   //
21
   tp_dealloc     : (destructor)DBfile_dealloc,
22
+#if (PY_MAJOR_VERSION <= 3)  && (PY_MINOR_VERSION <= 7)
23
   tp_print       : (printfunc)DBfile_print,
24
+#else
25
+  tp_vectorcall_offset : (printfunc)DBfile_print,
26
+#endif
27
 #if PY_MAJOR_VERSION >= 3
28
   tp_getattr     : 0,                   
29
 #else
30
Index: tools/python/pydbtoc.cpp
31
===================================================================
32
--- tools/python/pydbtoc.cpp
33
+++ tools/python/pydbtoc.cpp
34
@@ -355,7 +355,11 @@ PyTypeObject DBtocType =
35
     // Standard methods
36
     //
37
     tp_dealloc        : (destructor)DBtoc_dealloc,
38
+#if (PY_MAJOR_VERSION <= 3)  && (PY_MINOR_VERSION <= 7)
39
     tp_print          : (printfunc)DBtoc_print,
40
+#else
41
+  tp_vectorcall_offset : (printfunc)DBtoc_print,
42
+#endif
43
 #if PY_MAJOR_VERSION >= 3
44
     tp_getattr        : 0,
45
 #else
(-)a/science/silo/files/patch-src_hdf5__drv_H5FDsilo.c (-81 lines)
Removed Link Here
1
--- src/hdf5_drv/H5FDsilo.c.orig	2014-10-14 00:22:32 UTC
2
+++ src/hdf5_drv/H5FDsilo.c
3
@@ -160,27 +160,15 @@ product endorsement purposes.
4
  * xxx64 versions if available.
5
  */
6
 #if !defined(HDfstat) || !defined(HDstat)
7
-    #if H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64)
8
-        #ifndef HDfstat
9
-            #define HDfstat(F,B)        fstat64(F,B)
10
-        #endif /* HDfstat */
11
-        #ifndef HDstat
12
-            #define HDstat(S,B)         stat64(S,B)
13
-        #endif /* HDstat */
14
-        typedef struct stat64       h5_stat_t;
15
-        typedef off64_t             h5_stat_size_t;
16
-        #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF64_T
17
-    #else /* H5_SIZEOF_OFF_T!=8 && ... */
18
-        #ifndef HDfstat
19
-            #define HDfstat(F,B)        fstat(F,B)
20
-        #endif /* HDfstat */
21
-        #ifndef HDstat
22
-            #define HDstat(S,B)         stat(S,B)
23
-        #endif /* HDstat */
24
-        typedef struct stat         h5_stat_t;
25
-        typedef off_t               h5_stat_size_t;
26
-        #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T
27
-    #endif /* H5_SIZEOF_OFF_T!=8 && ... */
28
+    #ifndef HDfstat
29
+        #define HDfstat(F,B)        fstat(F,B)
30
+    #endif /* HDfstat */
31
+    #ifndef HDstat
32
+        #define HDstat(S,B)         stat(S,B)
33
+    #endif /* HDstat */
34
+    typedef struct stat         h5_stat_t;
35
+    typedef off_t               h5_stat_size_t;
36
+    #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T
37
 #endif /* !defined(HDfstat) || !defined(HDstat) */
38
 #ifndef HDlseek
39
     #ifdef H5_HAVE_LSEEK64
40
@@ -255,13 +243,13 @@ static const char *flavors(H5F_mem_t m)
41
         snprintf(msg, sizeof(msg), Msg "(errno=%d, \"%s\")",	\
42
             Errno, strerror(Errno));					\
43
     ret_value = Ret;							\
44
-    H5Epush_ret(Func, Cls, Maj, Min, msg, Ret)				\
45
+    H5Epush_ret(Func, Cls, Maj, Min, msg, Ret);				\
46
 }
47
 #else
48
 #define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno)			\
49
 {									\
50
     ret_value = Ret;							\
51
-    H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret)				\
52
+    H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret);				\
53
 }
54
 #endif
55
 
56
@@ -1308,7 +1296,7 @@ H5FD_silo_sb_encode(H5FD_t *_file, char *name/*out*/,
57
     assert(sizeof(hsize_t)<=8);
58
     memcpy(p, &file->block_size, sizeof(hsize_t));
59
     if (H5Tconvert(H5T_NATIVE_HSIZE, H5T_STD_U64LE, 1, buf+8, NULL, H5P_DEFAULT)<0)
60
-        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
61
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1);
62
 
63
     return 0;
64
 }
65
@@ -1336,14 +1324,14 @@ H5FD_silo_sb_decode(H5FD_t *_file, const char *name, c
66
 
67
     /* Make sure the name/version number is correct */
68
     if (strcmp(name, "LLNLsilo"))
69
-        H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1)
70
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1);
71
 
72
     buf += 8;
73
     /* Decode block size */
74
     assert(sizeof(hsize_t)<=8);
75
     memcpy(x, buf, 8);
76
     if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HSIZE, 1, x, NULL, H5P_DEFAULT)<0)
77
-        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
78
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1);
79
     ap = (hsize_t*)x;
80
     /*file->block_size = *ap; ignore stored value for now */
81
 
(-)b/science/silo/files/patch-src_silo_silo.c (-4 / +4 lines)
Lines 1-6 Link Here
1
--- src/silo/silo.c.orig	2014-10-14 00:22:33 UTC
1
--- src/silo/silo.c.orig	2022-12-03 02:30:10 UTC
2
+++ src/silo/silo.c
2
+++ src/silo/silo.c
3
@@ -226,12 +226,8 @@ typedef struct db_silo_stat_t {
3
@@ -238,12 +238,8 @@ typedef struct db_silo_stat_t {
4
 #ifndef SIZEOF_OFF64_T
4
 #ifndef SIZEOF_OFF64_T
5
 #error missing definition for SIZEOF_OFF64_T in silo_private.h
5
 #error missing definition for SIZEOF_OFF64_T in silo_private.h
6
 #else
6
 #else
Lines 13-19 Link Here
13
 #ifdef _WIN32
13
 #ifdef _WIN32
14
     DWORD fileindexlo;
14
     DWORD fileindexlo;
15
     DWORD fileindexhi;
15
     DWORD fileindexhi;
16
@@ -2283,11 +2279,7 @@ db_silo_stat_one_file(const char *name, 
16
@@ -2121,11 +2117,7 @@ db_silo_stat_one_file(const char *name, db_silo_stat_t
17
     errno = 0;
17
     errno = 0;
18
     memset(&(statbuf->s), 0, sizeof(statbuf->s));
18
     memset(&(statbuf->s), 0, sizeof(statbuf->s));
19
 
19
 
Lines 25-31 Link Here
25
 
25
 
26
 #ifdef _WIN32
26
 #ifdef _WIN32
27
     if (retval == 0)
27
     if (retval == 0)
28
@@ -4225,11 +4217,7 @@ DBOpenReal(const char *name, int type, i
28
@@ -4136,11 +4128,7 @@ DBOpenReal(const char *name, int type, int mode)
29
                 /********************************/
29
                 /********************************/
30
                 /* System level error occured.  */
30
                 /* System level error occured.  */
31
                 /********************************/
31
                 /********************************/
(-)b/science/silo/files/patch-src_silo_silo__json.c (-4 / +3 lines)
Lines 1-6 Link Here
1
--- src/silo/silo_json.c.orig	2014-10-14 00:22:33 UTC
1
--- src/silo/silo_json.c.orig	2022-12-03 02:30:10 UTC
2
+++ src/silo/silo_json.c
2
+++ src/silo/silo_json.c
3
@@ -441,12 +441,8 @@ json_object_from_binary_file(char const 
3
@@ -441,11 +441,7 @@ json_object_from_binary_file(char const *filename)
4
 #ifndef SIZEOF_OFF64_T
4
 #ifndef SIZEOF_OFF64_T
5
 #error missing definition for SIZEOF_OFF64_T in silo_private.h
5
 #error missing definition for SIZEOF_OFF64_T in silo_private.h
6
 #else
6
 #else
Lines 8-15 Link Here
8
-    struct stat64 s;
8
-    struct stat64 s;
9
-#else
9
-#else
10
     struct stat s;
10
     struct stat s;
11
 #endif
12
-#endif
11
-#endif
12
 #endif
13
 
13
 
14
     errno = 0;
14
     errno = 0;
15
     memset(&s, 0, sizeof(s));
(-)b/science/silo/files/patch-tests_CMake_SiloMakeCheckRunner.cmake (+13 lines)
Added Link Here
1
- workaround for https://github.com/LLNL/Silo/issues/288
2
3
--- tests/CMake/SiloMakeCheckRunner.cmake.orig	2022-12-03 06:53:38 UTC
4
+++ tests/CMake/SiloMakeCheckRunner.cmake
5
@@ -72,7 +72,7 @@ function(silo_add_make_check_runner)
6
         message(WARNING "silo_add_make_check_runner: NAME argument is required.")
7
         return()
8
     endif()
9
-    set(test_cmd ${samcr_NAME})
10
+    set(test_cmd "./${samcr_NAME}")
11
     if("ARGS" IN_LIST samcr_KEYWORDS_MISSING_VALUES)
12
         message(WARNING "silo_add_make_check_runner: ARGS argument provided without a value.")
13
         return()

Return to bug 268134