Skip to content

Commit ae937db

Browse files
committed
20241122
asl.h in solvers2.tgz: only require pthreads.h when compiled with -DMULTIPLE_THREADS (and not with -DALLOW_OPENMP).
1 parent 97e1074 commit ae937db

14 files changed

+56
-5060
lines changed

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# BUILD_MT_LIBS to build the multithreaded libraries
1515
# BUILD_F2C to build the fortran to c converter (https://www.netlib.org/f2c/f2c.pdf)
1616
# BUILD_EXAMPLES to build the examples
17-
17+
cmake_minimum_required(VERSION 3.5)
1818
if (${CMAKE_VERSION} VERSION_GREATER "3.13.0")
1919
cmake_policy(SET CMP0077 NEW)
2020
endif()
@@ -27,7 +27,7 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0")
2727
endif()
2828
project(ASL)
2929

30-
cmake_minimum_required(VERSION 3.0)
30+
3131
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
3232
# Set the path to CMake modules.
3333
set(AMPL_CMAKE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/support/cmake)
@@ -376,7 +376,7 @@ createSingleASL(asl ${ASL_SOURCE_DIR} ASL_SOURCES)
376376
# Create ASL 2
377377
set(ADDITIONALDEFS "")
378378
if(WIN32)
379-
set(ADDITIONALDEFS NO_MBLK_LOCK NO_PTHREADS)
379+
set(ADDITIONALDEFS NO_MBLK_LOCK )
380380
endif()
381381
createSingleASL(asl2 ${ASL2_SOURCE_DIR} ASL2_SOURCES
382382
DEFINITIONS ${ADDITIONALDEFS})

src/solvers/asldate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
long ASLdate_ASL = 20241111;
1+
long ASLdate_ASL = 20241202;

src/solvers/changes

+28
Original file line numberDiff line numberDiff line change
@@ -3433,3 +3433,31 @@ Current sph_opts bits:
34333433
on a large example.
34343434

34353435
Note that parallel Hessian evaluations are not available in solvers.tgz.
3436+
3437+
20241111
3438+
fpinit.c in solvers.tgz and solvers2.tgz: insert
3439+
#define _GNU_SOURCE
3440+
before
3441+
include "fenv.h"
3442+
to make fedisableexcept() visible on some systems (as someone
3443+
requested). It is "fenv.h" rather than <fenv.h> because it was
3444+
sometimes necessary to supply a custom fenv.h, as indicated in
3445+
the comment
3446+
3447+
/* Some Intel Linux systems (e.g., S.u.S.E. 5.2) come with a suitable fenv.h, */
3448+
/* but some (e.g., S.U.S.E. 6.1) do not. This is for the latter systems. */
3449+
3450+
20241115
3451+
pfghread.c in solvers2.tgz: fix an allocation bug introduced 20240618.
3452+
xp2known.c in solvers2.tgz: fix a glitch that appeared when not
3453+
compiled with -DALLOW_OPENMP .
3454+
3455+
20241121
3456+
solvers.c in solvers2.tgz: bypass a bug seen in the preprocessor of
3457+
at least one Microsoft compiler. On most systems, the change should
3458+
be invisible, except that under a debugger, some line numbers in
3459+
sphes.c will have changed.
3460+
3461+
20241122
3462+
asl.h in solvers2.tgz: only require pthreads.h when compiled with
3463+
-DMULTIPLE_THREADS (and not with -DALLOW_OPENMP).

src/solvers/fgh_read.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ sorry_CLP(EdRead *R, const char *what)
9898
#define memadj(x) (((x) + (sizeof(long)-1)) & ~(sizeof(long)-1))
9999
#endif
100100

101-
extern char* f_OPHOL;
101+
extern char* f_OPHOL ANSI((expr* A_ASL));
102102
extern efunc f_OPPLTERM, f_OPVARVAL, f_OPFUNCALL;
103103
extern sfunc f_OPIFSYM;
104104

src/solvers/makefile.u

-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ xs0 = \
305305
amplsolv.sy \
306306
arith.ibm \
307307
arith.h0 \
308-
arith.h1 \
309308
arithchk.c \
310309
asl.h \
311310
asl_pfg.h \

src/solvers/xsum0.out

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ amplsolv.lbc e92fe2c2 1075
44
amplsolv.sy 5451119 1343
55
arith.ibm f398be2b 1391
66
arith.h0 e206209c 2309
7-
arith.h1 f053bd25 177
87
arithchk.c 63b0185 6532
98
asl.h 1fe3527a 42925
109
asl_pfg.h 6483336 1268
1110
asl_pfgh.h 49b5a53 1288
12-
asldate.c 8721c18 29
11+
asldate.c e6a239aa 29
1312
atof.c 1fabc7d3 1747
1413
auxinfo.c 1a3c8690 1488
1514
avltree.c 10aeaa58 11346
@@ -41,7 +40,7 @@ errchk.h f88aec0 1695
4140
f_read.c 12b32457 1227
4241
fg_read.c f77acdfc 36818
4342
fg_write.c 198882e0 17423
44-
fgh_read.c ed246ea7 34450
43+
fgh_read.c fb1c0aad 34470
4544
float.h0 11d95cda 1822
4645
fpecatch.c e1d8a914 1574
4746
fpinit.c 66e5c26 5685
@@ -75,7 +74,7 @@ mach.c f480fbf5 2662
7574
mainexit.c e4761b9b 1713
7675
makefile.lc e5454c81 6036
7776
makefile.sy 1e488eda 5581
78-
makefile.u 131b6278 11191
77+
makefile.u 1df62d7f 11179
7978
makefile.vc 1bb69704 7500
8079
makefile.wat c465856 5860
8180
mip_pri.c f1dd1d47 7887

src/solvers2/asl.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ Exitcall {
378378
void *v;
379379
};
380380

381+
#define NO_PTHREADS
381382
#ifdef ALLOW_OPENMP
382383
#undef MULTIPLE_THREADS
383384
#define MULTIPLE_THREADS
@@ -387,12 +388,13 @@ Exitcall {
387388
#define ACQUIRE_MBLK_LOCK(I,L) if ((I)->rd_M1z_bytes) omp_set_lock(&((I)->L))
388389
#define FREE_MBLK_LOCK(I,L) if ((I)->rd_M1z_bytes) omp_unset_lock(&((I)->L))
389390
#else
390-
#ifdef NO_MBLK_LOCK
391+
#if !defined(MULTIPLE_THREADS) || defined(NO_MBLK_LOCK)
391392
#undef MBLK_LOCK
392393
#undef MULTIPLE_THREADS
393394
#define ACQUIRE_MBLK_LOCK(I,L) /*nothing*/
394395
#define FREE_MBLK_LOCK(I,L) /*nothing*/
395396
#else
397+
#undef NO_PTHREADS
396398
#include <pthread.h>
397399
#define MBLK_LOCK pthread_mutex_t
398400
#ifndef MULTIPLE_THREADS

src/solvers2/asldate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
long ASLdate_ASL = 20241111;
1+
long ASLdate_ASL = 20241122;

0 commit comments

Comments
 (0)