diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml new file mode 100644 index 0000000000..074e8ac4d5 --- /dev/null +++ b/.github/workflows/test-fortran-macos.yml @@ -0,0 +1,36 @@ +name: test-fortran-macos + +on: [push, pull_request] + +jobs: + fast_build_release: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Install GFortran + run: brew install gfortran + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON + + - name: Build + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + ls + ./bin/fortrantest diff --git a/.github/workflows/test-fortran-ubuntu.yml b/.github/workflows/test-fortran-ubuntu.yml index 937f51b12c..7030087313 100644 --- a/.github/workflows/test-fortran-ubuntu.yml +++ b/.github/workflows/test-fortran-ubuntu.yml @@ -1,4 +1,4 @@ -name: test-fortran +name: test-fortran-ubuntu on: [push, pull_request] diff --git a/CMakeLists.txt b/CMakeLists.txt index 68e24246eb..a861f4088f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,7 +209,7 @@ if (BUILD_CXX) "but it is not supported by the compiler. The check failed with this output:\n" "${check_ipo_support_output}") endif() - elseif(NOT ipo_supported) + elseif(NOT ipo_supported OR (APPLE AND FORTRAN)) message(STATUS "IPO / LTO: disabled because it is not supported") elseif(NOT BUILD_SHARED_LIBS) # For a static library, we can't be sure whether the final linking will diff --git a/cmake/README.md b/cmake/README.md index 4cb04ac682..5a24107a5a 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -3,7 +3,7 @@ | OS | C++ | Fortran | Python | CSharp Example | .NET | |:-------- | :---: | :------: | :----: | :----: | :----: | | 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] | -| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] | +| 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] | | 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] | [linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg diff --git a/docs/src/guide/basic.md b/docs/src/guide/basic.md index 30a4b9dcba..1b674a84a6 100644 --- a/docs/src/guide/basic.md +++ b/docs/src/guide/basic.md @@ -22,8 +22,9 @@ and [classes](@ref classes-overview), and are referred to below. Enums are scalar identifier types that can take only a limited range of values. -#### [Classes](@id guide-basic-classes) The advantage of using the -native `C++` classes in HiGHS is that many fewer parameters are needed +#### [Classes](@id guide-basic-classes) + +The advantage of using the native `C++` classes in HiGHS is that many fewer parameters are needed when passing data to and from HiGHS. The binding of the data members of these classes to `highspy` structures allows them to be used when calling HiGHS from Python, although they are not necessary for the diff --git a/src/io/HMPSIO.cpp b/src/io/HMPSIO.cpp index 69e906b66e..b6037d3624 100644 --- a/src/io/HMPSIO.cpp +++ b/src/io/HMPSIO.cpp @@ -564,7 +564,7 @@ HighsStatus writeModelAsMps(const HighsOptions& options, HighsStatus row_name_status = normaliseNames(options.log_options, "row", lp.num_row_, local_row_names, max_row_name_length); - if (row_name_status == HighsStatus::kError) return col_name_status; + if (row_name_status == HighsStatus::kError) return row_name_status; warning_found = row_name_status == HighsStatus::kWarning || warning_found; HighsInt max_name_length = std::max(max_col_name_length, max_row_name_length);