Skip to content

Commit

Permalink
20241122
Browse files Browse the repository at this point in the history
  asl.h in solvers2.tgz:  only require pthreads.h when compiled with
-DMULTIPLE_THREADS (and not with -DALLOW_OPENMP).
  • Loading branch information
mapgccv committed Dec 12, 2024
1 parent 97e1074 commit ae937db
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 5,060 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# BUILD_MT_LIBS to build the multithreaded libraries
# BUILD_F2C to build the fortran to c converter (https://www.netlib.org/f2c/f2c.pdf)
# BUILD_EXAMPLES to build the examples

cmake_minimum_required(VERSION 3.5)
if (${CMAKE_VERSION} VERSION_GREATER "3.13.0")
cmake_policy(SET CMP0077 NEW)
endif()
Expand All @@ -27,7 +27,7 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0")
endif()
project(ASL)

cmake_minimum_required(VERSION 3.0)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Set the path to CMake modules.
set(AMPL_CMAKE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/support/cmake)
Expand Down Expand Up @@ -376,7 +376,7 @@ createSingleASL(asl ${ASL_SOURCE_DIR} ASL_SOURCES)
# Create ASL 2
set(ADDITIONALDEFS "")
if(WIN32)
set(ADDITIONALDEFS NO_MBLK_LOCK NO_PTHREADS)
set(ADDITIONALDEFS NO_MBLK_LOCK )
endif()
createSingleASL(asl2 ${ASL2_SOURCE_DIR} ASL2_SOURCES
DEFINITIONS ${ADDITIONALDEFS})
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/asldate.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
long ASLdate_ASL = 20241111;
long ASLdate_ASL = 20241202;
28 changes: 28 additions & 0 deletions src/solvers/changes
Original file line number Diff line number Diff line change
Expand Up @@ -3433,3 +3433,31 @@ Current sph_opts bits:
on a large example.

Note that parallel Hessian evaluations are not available in solvers.tgz.

20241111
fpinit.c in solvers.tgz and solvers2.tgz: insert
#define _GNU_SOURCE
before
include "fenv.h"
to make fedisableexcept() visible on some systems (as someone
requested). It is "fenv.h" rather than <fenv.h> because it was
sometimes necessary to supply a custom fenv.h, as indicated in
the comment

/* Some Intel Linux systems (e.g., S.u.S.E. 5.2) come with a suitable fenv.h, */
/* but some (e.g., S.U.S.E. 6.1) do not. This is for the latter systems. */

20241115
pfghread.c in solvers2.tgz: fix an allocation bug introduced 20240618.
xp2known.c in solvers2.tgz: fix a glitch that appeared when not
compiled with -DALLOW_OPENMP .

20241121
solvers.c in solvers2.tgz: bypass a bug seen in the preprocessor of
at least one Microsoft compiler. On most systems, the change should
be invisible, except that under a debugger, some line numbers in
sphes.c will have changed.

20241122
asl.h in solvers2.tgz: only require pthreads.h when compiled with
-DMULTIPLE_THREADS (and not with -DALLOW_OPENMP).
2 changes: 1 addition & 1 deletion src/solvers/fgh_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ sorry_CLP(EdRead *R, const char *what)
#define memadj(x) (((x) + (sizeof(long)-1)) & ~(sizeof(long)-1))
#endif

extern char* f_OPHOL;
extern char* f_OPHOL ANSI((expr* A_ASL));
extern efunc f_OPPLTERM, f_OPVARVAL, f_OPFUNCALL;
extern sfunc f_OPIFSYM;

Expand Down
1 change: 0 additions & 1 deletion src/solvers/makefile.u
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ xs0 = \
amplsolv.sy \
arith.ibm \
arith.h0 \
arith.h1 \
arithchk.c \
asl.h \
asl_pfg.h \
Expand Down
7 changes: 3 additions & 4 deletions src/solvers/xsum0.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ amplsolv.lbc e92fe2c2 1075
amplsolv.sy 5451119 1343
arith.ibm f398be2b 1391
arith.h0 e206209c 2309
arith.h1 f053bd25 177
arithchk.c 63b0185 6532
asl.h 1fe3527a 42925
asl_pfg.h 6483336 1268
asl_pfgh.h 49b5a53 1288
asldate.c 8721c18 29
asldate.c e6a239aa 29
atof.c 1fabc7d3 1747
auxinfo.c 1a3c8690 1488
avltree.c 10aeaa58 11346
Expand Down Expand Up @@ -41,7 +40,7 @@ errchk.h f88aec0 1695
f_read.c 12b32457 1227
fg_read.c f77acdfc 36818
fg_write.c 198882e0 17423
fgh_read.c ed246ea7 34450
fgh_read.c fb1c0aad 34470
float.h0 11d95cda 1822
fpecatch.c e1d8a914 1574
fpinit.c 66e5c26 5685
Expand Down Expand Up @@ -75,7 +74,7 @@ mach.c f480fbf5 2662
mainexit.c e4761b9b 1713
makefile.lc e5454c81 6036
makefile.sy 1e488eda 5581
makefile.u 131b6278 11191
makefile.u 1df62d7f 11179
makefile.vc 1bb69704 7500
makefile.wat c465856 5860
mip_pri.c f1dd1d47 7887
Expand Down
4 changes: 3 additions & 1 deletion src/solvers2/asl.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ Exitcall {
void *v;
};

#define NO_PTHREADS
#ifdef ALLOW_OPENMP
#undef MULTIPLE_THREADS
#define MULTIPLE_THREADS
Expand All @@ -387,12 +388,13 @@ Exitcall {
#define ACQUIRE_MBLK_LOCK(I,L) if ((I)->rd_M1z_bytes) omp_set_lock(&((I)->L))
#define FREE_MBLK_LOCK(I,L) if ((I)->rd_M1z_bytes) omp_unset_lock(&((I)->L))
#else
#ifdef NO_MBLK_LOCK
#if !defined(MULTIPLE_THREADS) || defined(NO_MBLK_LOCK)
#undef MBLK_LOCK
#undef MULTIPLE_THREADS
#define ACQUIRE_MBLK_LOCK(I,L) /*nothing*/
#define FREE_MBLK_LOCK(I,L) /*nothing*/
#else
#undef NO_PTHREADS
#include <pthread.h>
#define MBLK_LOCK pthread_mutex_t
#ifndef MULTIPLE_THREADS
Expand Down
2 changes: 1 addition & 1 deletion src/solvers2/asldate.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
long ASLdate_ASL = 20241111;
long ASLdate_ASL = 20241122;
Loading

0 comments on commit ae937db

Please sign in to comment.