Skip to content

Commit 846ba0e

Browse files
authored
Merge pull request ERGO-Code#1826 from ERGO-Code/latest
Latest for release
2 parents aadf029 + 449e33c commit 846ba0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+883
-560
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: test-fortran-macos
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
fast_build_release:
7+
runs-on: macos-12
8+
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: fortran-lang/[email protected]
14+
id: setup-fortran
15+
with:
16+
compiler: gcc
17+
version: 11
18+
19+
# - name: Install GFortran
20+
# run: brew install gfortran gcc
21+
22+
- name: Create Build Environment
23+
run: cmake -E make_directory ${{runner.workspace}}/build
24+
25+
- name: Configure CMake
26+
shell: bash
27+
working-directory: ${{runner.workspace}}/build
28+
run: |
29+
cmake --version
30+
gfortran-11 --version
31+
cmake $GITHUB_WORKSPACE -DFORTRAN=ON
32+
33+
- name: Build
34+
shell: bash
35+
working-directory: ${{runner.workspace}}/build
36+
run: cmake --build . --parallel
37+
38+
- name: Test
39+
shell: bash
40+
working-directory: ${{runner.workspace}}/build
41+
run: |
42+
ls
43+
./bin/fortrantest

.github/workflows/test-fortran-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test-fortran
1+
name: test-fortran-ubuntu
22

33
on: [push, pull_request]
44

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ if (BUILD_CXX)
209209
"but it is not supported by the compiler. The check failed with this output:\n"
210210
"${check_ipo_support_output}")
211211
endif()
212-
elseif(NOT ipo_supported)
212+
elseif(NOT ipo_supported OR (APPLE AND FORTRAN))
213213
message(STATUS "IPO / LTO: disabled because it is not supported")
214214
elseif(NOT BUILD_SHARED_LIBS)
215215
# For a static library, we can't be sure whether the final linking will

FEATURES.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
11
## Build changes
22

3-
### HiGHS on nixpkgs
3+
The python wrapper highspy is now available for aarch64 on manylinux
4+
This allows highs to be run through Python on AWS arm64
45

5-
HiGHS now has a `flake.nix` to build the binary, allowing `nix` users to try it out
6-
7-
### Python build update
8-
9-
Highspy with setuptools from v1.7.0 only worked on Python 3.12
10-
For v1.7.0 we have dropped setuptools and switched to scikit-build-core
11-
12-
### Windows versions
13-
14-
Fixed version info of shared library
15-
Added version info to executable
6+
Bug fix for fortran on macOS
167

178
## Code changes
189

19-
Inserting `pdlp_iteration_count` into various structs (for v1.7.0) breaks the C API, so it has been moved to the end of those structs
20-
21-
`setBasis` has been added to `highspy`
22-
23-
`writePresolvedModel` has been added
24-
25-
Saved MIP solution pool is populated when presolve reduces MIP to empty
26-
27-
Compilation date has been removed improve build reproducibility. Methods to print compilation dates are deprecated
28-
29-
Logging and error return when user-supplied solution or basis is rejected on vector dimensions
30-
31-
Memory allocation errors in presolve are caught and `Highs::run()` returns `HighsStatus::kError` with `model_status_ = HighsModelStatus::kMemoryLimit`
32-
33-
QP solver logging is now neater and quieter
34-
35-
Any Hessian for the incumbent model is modified with zero entries when adding columns to the model, and rows/columns are removed when columns are deleted from the model.
10+
The accessor function Highs_getCallbackDataOutItem in the C API means
11+
that `pdlp_iteration_count` can be moved back to where it was inserted
12+
into the `HighsCallbackDataOut` struct in v1.7.0, which broke the C
13+
API. This fixes #1812
3614

37-
Minor bug fix in MIP presolve
15+
Some duplicate code has been eliminated from the MIP solver, and
16+
modifications made to eliminate compiler warnings
3817

39-
QP solver will now hot start given a basis and solution
18+
Declaration of the (deprecated) method `char* highsCompilationDate()`
19+
has been corrected
4020

21+
Fixed bug when describing integrality status during the human-readable solution write
4122

check/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,4 @@ if (NOT FAST_BUILD OR ALL_TESTS)
321321
endforeach(setting)
322322
endforeach()
323323

324-
endif()
324+
endif()

check/TestHighsVersion.cpp

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ TEST_CASE("HighsVersion", "[highs_version]") {
1313
const HighsInt major = highsVersionMajor();
1414
const HighsInt minor = highsVersionMinor();
1515
const HighsInt patch = highsVersionPatch();
16+
const std::string compilation = highsCompilationDate();
17+
const std::string githash = std::string(highsGithash());
1618
std::stringstream ss;
1719
ss << major << "." << minor << "." << patch;
1820
std::string local_version = ss.str();
@@ -21,15 +23,31 @@ TEST_CASE("HighsVersion", "[highs_version]") {
2123
printf("HiGHS major version %d\n", int(major));
2224
printf("HiGHS minor version %d\n", int(minor));
2325
printf("HiGHS patch version %d\n", int(patch));
24-
printf("HiGHS githash: %s\n", highsGithash());
25-
// Compilation date is deprecated.
26-
// printf("HiGHS compilation date: %s\n", highsCompilationDate());
26+
printf("HiGHS githash: %s\n", githash.c_str());
27+
// Compilation date is deprecated, but make sure that the
28+
// deprecated method is still tested.
29+
printf("HiGHS compilation date: %s\n", compilation.c_str());
2730
printf("HiGHS local version: %s\n", local_version.c_str());
2831
}
2932
REQUIRE(major == HIGHS_VERSION_MAJOR);
3033
REQUIRE(minor == HIGHS_VERSION_MINOR);
3134
REQUIRE(patch == HIGHS_VERSION_PATCH);
32-
REQUIRE(local_version == version);
35+
REQUIRE(githash == std::string(HIGHS_GITHASH));
36+
REQUIRE(version == local_version);
37+
// Check that the corresponding methods
38+
Highs highs;
39+
const std::string version0 = highs.version();
40+
REQUIRE(version0 == version);
41+
const HighsInt major0 = highs.versionMajor();
42+
REQUIRE(major0 == major);
43+
const HighsInt minor0 = highs.versionMinor();
44+
REQUIRE(minor0 == minor);
45+
const HighsInt patch0 = highs.versionPatch();
46+
REQUIRE(patch0 == patch);
47+
const std::string githash0 = highs.githash();
48+
REQUIRE(githash0 == githash);
49+
const std::string compilation0 = highs.compilationDate();
50+
REQUIRE(compilation == compilation);
3351
}
3452

3553
TEST_CASE("sizeof-highs-int", "[highs_version]") {

cmake/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| OS | C++ | Fortran | Python | CSharp Example | .NET |
44
|:-------- | :---: | :------: | :----: | :----: | :----: |
55
| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_fortran_svg]][linux_fortran_link] | [![Status][linux_python_svg]][linux_python_link] | *(1)* | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
6-
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
6+
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_fortran_svg]][macos_fortran_link] | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
77
| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | *(2)* | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_csharp_svg]][windows_csharp_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |
88

99
[linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg

docs/src/guide/basic.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ and [classes](@ref classes-overview), and are referred to below.
2020

2121
#### [Enums](@id guide-basic-enums)
2222

23-
Enums are scalar identifier types that can take only a limited range of values.????
24-
25-
#### The
26-
advantage using these classes is that many fewer parameters are
27-
needed when passing data to and from HiGHS. However, the use of
28-
classes is not necessary for the basic use of `highspy`. As with the
29-
`C` and `Fortran` interfaces, there are equivalent methods that use
30-
simple scalars and vectors of data.
23+
Enums are scalar identifier types that can take only a limited range of values.
24+
25+
#### [Classes](@id guide-basic-classes)
26+
27+
The advantage of using the native `C++` classes in HiGHS is that many fewer parameters are needed
28+
when passing data to and from HiGHS. The binding of the data members
29+
of these classes to `highspy` structures allows them to be used when
30+
calling HiGHS from Python, although they are not necessary for the
31+
basic use of `highspy`. As with the `C` and `Fortran` interfaces,
32+
there are equivalent methods that use simple scalars and vectors of
33+
data.
3134

3235
## Defining a model
3336

docs/src/interfaces/python/example-py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ print('Basis validity = ', h.basisValidityToString(info.basis_validity))
210210
* `changeColCost`
211211
* `changeColBounds`
212212
* `changeRowBounds`
213-
* `changeColsCosts`
213+
* `changeColsCost`
214214
* `changeColsBounds`
215215
* `changeRowsBounds`
216216
* `changeCoeff`

docs/src/options/definitions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,3 +341,15 @@
341341
- Range: [1e-12, inf]
342342
- Default: 0.0001
343343

344+
## qp\_iteration\_limit
345+
- Iteration limit for QP solver
346+
- Type: integer
347+
- Range: {0, 2147483647}
348+
- Default: 2147483647
349+
350+
## qp\_nullspace\_limit
351+
- Nullspace limit for QP solver
352+
- Type: integer
353+
- Range: {0, 2147483647}
354+
- Default: 4000
355+

0 commit comments

Comments
 (0)