Commit ccdb3334 authored by Dominik Bongartz's avatar Dominik Bongartz
Browse files

Release version v0.5.0

parent 13bbd7a7
Pipeline #486983 skipped
......@@ -3,3 +3,4 @@ Build/
_skbuild/
*.egg-info/
dist/
MANIFEST
stages:
- build
- test
- deploy
build_windows:
stage: build
tags:
- windows
- maingo
variables:
GIT_STRATEGY: clone
before_script:
- git submodule init
- git submodule update
script:
- mkdir build
- '$env:path += ";C:\Program Files\cmake\bin"'
- cmake -B build -G "Visual Studio 15 2017" -A x64 -D MAiNGO_build_test=TRUE -D MAiNGO_build_python_interface=TRUE -D MAiNGO_build_parser=false
- cd build
- cmake --build . --config Release -j4
- cd ..
artifacts:
paths:
- build/Release/
exclude:
- build/Release/*.lib
- build/Release/**/*.exp
- build/Release/**/*.lib
test_windows:
stage: test
needs: [build_windows]
tags:
- windows
- maingo
script:
- cd build\Release
- .\test-maingo.exe
- py testMaingopy.py
build_linux:
stage: build
tags:
- linux
variables:
GIT_STRATEGY: clone
before_script:
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git submodule init
- ./switchToSsh
- git submodule update -j 1
script:
- mkdir build
- cd build
- cmake -S .. -D MAiNGO_build_test=TRUE -D MAiNGO_build_python_interface=TRUE -D MAiNGO_build_parser=false
- make -j4
- cd ..
artifacts:
paths:
- build/test-maingo
- build/maingopy/
- build/testMaingopy.py
- build/individualPythonTests/
test_linux:
stage: test
needs: [build_linux]
tags:
- linux
script:
- cd build
- ./test-maingo
- python3 testMaingopy.py
pages:
stage: deploy
needs:
- job: test_windows
artifacts: false
- job: test_linux
artifacts: false
tags:
- linux
script:
- cd doc
- doxygen Doxyfile
- mv html ../public
- cd ..
artifacts:
paths:
- public
only:
- master
\ No newline at end of file
[submodule "dep/filib"]
path = dep/filib
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/filib.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/filib.git
[submodule "dep/nlopt"]
path = dep/nlopt
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/nlopt.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/nlopt.git
[submodule "dep/fadbad"]
path = dep/fadbad
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/fadbad.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/fadbad.git
[submodule "dep/cpplapack"]
path = dep/cpplapack
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/cpplapack.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/cpplapack.git
[submodule "dep/ipopt"]
path = dep/ipopt
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/ipopt.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/ipopt.git
[submodule "dep/mumps"]
path = dep/mumps
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/mumps.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/mumps.git
[submodule "dep/blas"]
path = dep/blas
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/blas.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/blas.git
[submodule "dep/lapack"]
path = dep/lapack
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/lapack.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/lapack.git
[submodule "dep/knitro"]
path = dep/knitro
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/knitro.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/knitro.git
[submodule "dep/cplex"]
path = dep/cplex
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/cplex.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/cplex.git
[submodule "dep/clp"]
path = dep/clp
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/clp.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/clp.git
[submodule "dep/json"]
path = dep/json
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/json.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/json.git
[submodule "dep/pybind11"]
path = dep/pybind11
url = https://github.com/pybind/pybind11
[submodule "dep/babbase"]
path = dep/babbase
url = https://git.rwth-aachen.de/avt.svt/public/babbase.git
[submodule "dep/melon"]
path = dep/melon
url = https://git.rwth-aachen.de/avt.svt/public/melon.git
[submodule "dep/libale"]
path = dep/libale
url = https://git.rwth-aachen.de/avt.svt/public/libale.git
url = https://git.rwth-aachen.de/avt-svt/public/libale.git
[submodule "dep/melon"]
path = dep/melon
url = https://git.rwth-aachen.de/avt-svt/public/melon.git
[submodule "dep/babbase"]
path = dep/babbase
url = https://git.rwth-aachen.de/avt-svt/public/babbase.git
[submodule "dep/mcpp"]
path = dep/mcpp
url = https://git.rwth-aachen.de/avt.svt/public/thirdparty/mcpp.git
url = https://git.rwth-aachen.de/avt-svt/public/thirdparty/mcpp.git
cmake_minimum_required(VERSION 3.15)
project(MAiNGO CXX)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/MAiNGOversion.cmake)
project(MAiNGO
VERSION ${MAiNGO_VERSION}
LANGUAGES CXX)
#--------------------------- Options --------------------------------
set(MAiNGO_build_standalone FALSE CACHE BOOL "Build MAiNGO as standalone solver with problem.h.")
set(MAiNGO_build_parser TRUE CACHE BOOL "Build MAiNGO executable with parser (not compatible with Intel compiler due to missing C++17 features).")
set(MAiNGO_build_python_interface FALSE CACHE BOOL "Build a Python extension module for calling MAiNGO from Python.")
set(MAiNGO_build_test FALSE CACHE BOOL "Build MAiNGO test cases.")
set(MAiNGO_use_melon TRUE CACHE BOOL "Build MAiNGO executable with the MeLOn toolbox (not compatible with Intel compiler due to missing C++17 features).")
#--------------------------- Settings --------------------------------
set(MAiNGO_use_melon TRUE CACHE BOOL "Build MAiNGO executable with the MeLOn toolbox.")
set(MAiNGO_use_cplex TRUE CACHE BOOL "Use CPLEX if it is available on the system.")
set(MAiNGO_use_knitro TRUE CACHE BOOL "Use KNITRO if it is available on the system.")
set(MAiNGO_use_mpi FALSE CACHE BOOL "Build parallel version of MAiNGO.")
set(MAiNGO_build_python_interface FALSE CACHE BOOL "Build the Python package 'maingopy' that allows to call MAiNGO from Python.")
set(MAiNGO_build_standalone FALSE CACHE BOOL "Build MAiNGOcpp executable as standalone solver with problem.h.")
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(MAiNGO_build_parser TRUE CACHE BOOL "Build MAiNGO executable with parser.")
set(MAiNGO_build_test TRUE CACHE BOOL "Build MAiNGO test cases.")
else()
set(MAiNGO_build_parser FALSE CACHE BOOL "Build MAiNGO executable with parser.")
set(MAiNGO_build_test FALSE CACHE BOOL "Build MAiNGO test cases.")
endif()
#------------------------ MAiNGO library -----------------------------
include(${PROJECT_SOURCE_DIR}/cmake/MAiNGOsourceFiles.cmake)
#------------------------ Adjust settings when building with scikit-build -----------------------------
if(SKBUILD)
message(STATUS "The project is built using scikit-build, also building Python interface.")
# Enforce use of Python interface
set(MAiNGO_build_python_interface TRUE CACHE INTERNAL "" FORCE)
set(MAiNGO_use_cplex FALSE CACHE INTERNAL "" FORCE)
set(MAiNGO_use_knitro FALSE CACHE INTERNAL "" FORCE)
# Default: disable use of CPLEX and KNITRO
message(STATUS "Not using CPLEX and KNITRO even if they are available. If you still want to use them, you need to explicitly enable the corresponding CMake options.")
set(MAiNGO_use_cplex FALSE CACHE BOOL "Use CPLEX if it is available on the system." FORCE)
set(MAiNGO_use_knitro FALSE CACHE BOOL "Use KNITRO if it is available on the system." FORCE)
# Disable stuff that is not compatible with the Python package to be installed
set(MAiNGO_use_mpi FALSE CACHE INTERNAL "" FORCE)
set(MAiNGO_build_standalone FALSE CACHE INTERNAL "" FORCE)
set(MAiNGO_build_parser FALSE CACHE INTERNAL "" FORCE)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(BUILD_SHARED_LIBS FALSE CACHE INTERNAL "" FORCE)
set(MAiNGO_build_test FALSE CACHE INTERNAL "" FORCE)
set(BLAS_usePrecompiledDll FALSE CACHE INTERNAL "" FORCE)
set(LAPACK_usePrecompiledDlls FALSE CACHE INTERNAL "" FORCE)
set(MUMPS_usePrecompiledDll FALSE CACHE INTERNAL "" FORCE)
# Force required settings
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(BUILD_SHARED_LIBS FALSE CACHE INTERNAL "" FORCE)
endif()
if(MAiNGO_build_python_interface)
# if building the python interface, the generated module needs PIC, even if building static libraries
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
#------------------------ MAiNGO library -----------------------------
include(${PROJECT_SOURCE_DIR}/cmake/MAiNGOsourceFiles.cmake)
add_library(maingo-core ${MAiNGO_SRC})
if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(maingo-core PRIVATE WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
target_include_directories(maingo-core PUBLIC ${PROJECT_SOURCE_DIR}/inc)
configure_file(${PROJECT_SOURCE_DIR}/inc/version.h.in maingo-core/version.h)
target_include_directories(maingo-core
PUBLIC
${PROJECT_SOURCE_DIR}/inc
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/maingo-core
)
target_compile_features(maingo-core PRIVATE cxx_std_14)
if(MSVC)
target_compile_options(maingo-core PRIVATE /MP;/Qpar)
......@@ -69,9 +93,6 @@ target_link_libraries(maingo-core
ipopt
clp
)
if(MAiNGO_use_melon)
target_link_libraries(maingo-core PUBLIC melon)
endif()
if(MAiNGO_build_parser)
add_library(parser STATIC ${PARSER_SRC})
target_include_directories(parser PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)
......@@ -80,6 +101,9 @@ if(MAiNGO_build_parser)
target_link_libraries(maingo-core PUBLIC parser)
target_compile_definitions(maingo-core PUBLIC HAVE_MAiNGO_PARSER)
endif()
if(MAiNGO_use_melon)
target_link_libraries(maingo-core PUBLIC melon)
endif()
if(MAiNGO_use_knitro)
# knitro always needs to be linked after all other math-related libraries because of incompatibility with several math routines
target_link_libraries(maingo-core PRIVATE knitro)
......@@ -92,7 +116,7 @@ if(MAiNGO_use_mpi)
endif()
#----------------- If this is the top level, include dependencies and build executable --------------------
#----------------- If this is the top level, include dependencies --------------------
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# --------------- Dependencies ---------------------------
......@@ -112,10 +136,6 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
add_dependency_subdir(nlopt)
add_dependency_subdir(clp)
add_dependency_subdir(filib)
if(MAiNGO_use_melon)
add_dependency_subdir(melon)
add_dependency_subdir(json)
endif()
if(MAiNGO_build_parser)
add_dependency_subdir(libale)
endif()
......@@ -135,6 +155,13 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
endif()
add_dependency_subdir(pybind11)
endif()
if(MAiNGO_use_melon) # Melon needs to go after pybind11, since it's CMakeLists.txt need pybind11_add_module if using the Python interface of MeLOn
if(MAiNGO_build_python_interface)
set(MeLOn_build_python_interface TRUE CACHE BOOL "" FORCE)
endif()
add_dependency_subdir(melon)
add_dependency_subdir(json)
endif()
message("Done configuring dependencies.")
message("=================================================================")
message("=================================================================")
......@@ -146,8 +173,13 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# --------- Setup the Executable/.dll output Directory -------------
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE PATH "Single Directory for all Executables.")
# --------------- MAiNGO executable (using ALE parser) ---------------------------
if (MAiNGO_build_parser)
endif()
# --------------- MAiNGO executable (using ALE parser) ---------------------------
if (MAiNGO_build_parser)
add_executable(MAiNGO ${PROJECT_SOURCE_DIR}/examples/mainAleParser.cpp)
target_link_libraries(MAiNGO PRIVATE maingo-core)
target_compile_features(MAiNGO PRIVATE cxx_std_17)
......@@ -163,10 +195,12 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
$<$<CXX_COMPILER_ID:Clang>: $<$<NOT:$<CONFIG:DEBUG>>:-O3> $<$<CONFIG:DEBUG>:-O0>>
)
endif()
endif()
# --------------- Standalone MAiNGO executable (for C++ API) ---------------------------
if (MAiNGO_build_standalone)
endif()
# --------------- Standalone MAiNGO executable (for C++ API) ---------------------------
if (MAiNGO_build_standalone)
add_executable(MAiNGOcpp ${PROJECT_SOURCE_DIR}/examples/mainCppApi.cpp)
target_link_libraries(MAiNGOcpp PRIVATE maingo-core)
target_compile_features(MAiNGOcpp PRIVATE cxx_std_14)
......@@ -182,10 +216,13 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
$<$<CXX_COMPILER_ID:Clang>: $<$<NOT:$<CONFIG:DEBUG>>:-O3> $<$<CONFIG:DEBUG>:-O0>>
)
endif()
endif()
# --------------- Python interface ---------------------------
if(MAiNGO_build_python_interface)
endif()
# --------------- Python interface ---------------------------
if(MAiNGO_build_python_interface)
# Get output directories right
if(MSVC)
set(RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug)
set(RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release)
......@@ -193,51 +230,80 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
endif()
pybind11_add_module(_pymaingo pymaingo/_pymaingo.cpp)
target_compile_features(_pymaingo PRIVATE cxx_std_14)
target_link_libraries(_pymaingo PRIVATE maingo-core)
target_compile_options(_pymaingo PRIVATE $<$<CXX_COMPILER_ID:AppleClang>: -fvisibility=default>)
# Create target for _maingopy extension module
pybind11_add_module(_maingopy maingopy/_maingopy.cpp)
target_compile_features(_maingopy PRIVATE cxx_std_14)
target_link_libraries(_maingopy PRIVATE maingo-core)
target_compile_options(_maingopy PRIVATE $<$<CXX_COMPILER_ID:AppleClang>: -fvisibility=default>)
# Create target for maingopy package
if(SKBUILD)
install(TARGETS maingo-core DESTINATION . )
install(TARGETS _pymaingo DESTINATION .)
install(TARGETS _maingopy DESTINATION .)
if(MAiNGO_use_melon AND MeLOn_build_python_interface)
install(TARGETS melonpy DESTINATION .)
install(FILES ${PROJECT_SOURCE_DIR}/maingopy/__init__maingopy_and_melonpy.py.in DESTINATION . RENAME __init__.py)
else()
endif()
else()
set_target_properties(_pymaingo PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/pymaingo
set_target_properties(_maingopy PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
ARCHIVE_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
)
add_custom_target(pymaingo ALL
if(MAiNGO_use_melon AND MeLOn_build_python_interface)
set_target_properties(melonpy PROPERTIES
LIBRARY_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
ARCHIVE_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
)
add_custom_target(maingopy ALL
COMMAND ${CMAKE_COMMAND} -E make_directory
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/pymaingo
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
COMMAND ${CMAKE_COMMAND} -E copy
${PROJECT_SOURCE_DIR}/pymaingo/__init__.py
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/pymaingo
${PROJECT_SOURCE_DIR}/maingopy/__init__maingopy_and_melonpy.py.in
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy/__init__.py
)
add_dependencies(melonpy maingopy)
add_dependencies(_maingopy maingopy)
else()
add_custom_target(maingopy ALL
COMMAND ${CMAKE_COMMAND} -E make_directory
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy
COMMAND ${CMAKE_COMMAND} -E copy
${PROJECT_SOURCE_DIR}/maingopy/__init__only_maingopy.py.in
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/maingopy/__init__.py
)
add_dependencies(_maingopy maingopy)
endif()
if(${BLAS_usePrecompiledDll})
add_custom_target(copyBlasDllPymaingo ALL
add_custom_target(copyBlasDllmaingopy ALL
COMMAND ${CMAKE_COMMAND} -E copy
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/blasd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/blas.dll>
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/pymaingo/blasd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/pymaingo/blas.dll>)
add_dependencies(copyBlasDllPymaingo copyBlasDll)
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/maingopy/blasd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/maingopy/blas.dll>)
add_dependencies(copyBlasDllmaingopy copyBlasDll melonpy)
endif()
if(${LAPACK_usePrecompiledDlls})
add_custom_target(copyLapackDllPymaingo ALL
add_custom_target(copyLapackDllmaingopy ALL
COMMAND ${CMAKE_COMMAND} -E copy
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/lapackd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/lapack.dll>
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/pymaingo/lapackd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/pymaingo/lapack.dll>)
add_dependencies(copyLapackDllPymaingo copyLapackDll)
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/maingopy/lapackd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/maingopy/lapack.dll>)
add_dependencies(copyLapackDllmaingopy copyLapackDll melonpy)
endif()
if(${MUMPS_usePrecompiledDll})
add_custom_target(copyMumpsDllPymaingo ALL
add_custom_target(copyMumpsDllmaingopy ALL
COMMAND ${CMAKE_COMMAND} -E copy
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/mumpsd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/mumps.dll>
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/pymaingo/mumpsd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/pymaingo/mumps.dll>)
add_dependencies(copyMumpsDllPymaingo copyMumpsDll)
endif()
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}/maingopy/mumpsd.dll>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}/maingopy/mumps.dll>)
add_dependencies(copyMumpsDllmaingopy copyMumpsDll melonpy)
endif()
endif()
endif()
# --------------- MAiNGO Tests ---------------------------
if(MAiNGO_build_test)
# --------------- MAiNGO Tests ---------------------------
if(MAiNGO_build_test)
add_executable(test-maingo ${PROJECT_SOURCE_DIR}/tests/testProblems/main.cpp)
target_link_libraries(test-maingo PRIVATE maingo-core)
target_compile_features(test-maingo PRIVATE cxx_std_17)
......@@ -255,10 +321,10 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
endif()
if (MAiNGO_build_python_interface)
set(PYTHON_TEST_DIR ${PROJECT_SOURCE_DIR}/pymaingo/tests)
add_custom_target(test-pymaingo ALL
set(PYTHON_TEST_DIR ${PROJECT_SOURCE_DIR}/maingopy/tests)
add_custom_target(test-maingopy ALL
COMMAND ${CMAKE_COMMAND} -E copy
${PYTHON_TEST_DIR}/testPyMAiNGO.py
${PYTHON_TEST_DIR}/testMaingopy.py
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>
COMMAND ${CMAKE_COMMAND} -E make_directory
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/individualPythonTests
......@@ -275,6 +341,5 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
$<$<CONFIG:Debug>:${RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<NOT:$<CONFIG:Debug>>:${RUNTIME_OUTPUT_DIRECTORY_RELEASE}>/individualPythonTests
)
endif()
endif()
endif()
\ No newline at end of file
This diff is collapsed.
include setup.py CMakeLists.txt README.md ReleaseNotes.txt AUTHORS LICENSE
graft cmake
graft dep
exclude dep/*/*/configure*
exclude dep/*/*/*/configure*
prune dep/*/example*
prune dep/*/*/example*
prune dep/*/test*
prune dep/*/*/test*
prune dep/*/doc*
prune dep/*/*/doc*
prune dep/*/*/DOC*
prune dep/*/build
prune dep/*/Build
prune dep/mumps/precompiled
prune dep/blas/precompiled
prune dep/lapack/precompiled
prune dep/lapack/*/BLAS
prune dep/lapack/*/CBLAS
prune dep/lapack/*/LAPACKE
prune dep/lapack/*/TESTING
prune dep/ipopt/*/ThirdParty
prune dep/clp/*/Data
prune dep/clp/*/ThirdParty
prune dep/clp/*/Osi
prune dep/clp/*/BuildTools
prune dep/clp/*/*/MSVisualStudio
prune dep/filib/*/msvc
prune dep/filib/*/autom4te.cache
graft examples
graft inc
graft maingopy
graft src
graft tests
global-exclude .git*
# <img src="doc/images/MAiNGO.png" alt="MAiNGO" width="300"/> <br> McCormick-based Algorithm for mixed-integer Nonlinear Global Optimization
Thank you for using the beta version of MAiNGO! If you have any issues, concerns, or comments, please communicate them using the ["Issues"
functionality in GitLab](https://git.rwth-aachen.de/avt.svt/public/maingo/-/issues) or send an e-mail to [MAiNGO@avt.rwth-aachen.de](mailto:MAiNGO@avt.rwth-aachen.de).
functionality in GitLab](https://git.rwth-aachen.de/avt-svt/public/maingo/-/issues) or send an e-mail to [MAiNGO@avt.rwth-aachen.de](mailto:MAiNGO@avt.rwth-aachen.de).
## About
General information about the capabilities and main algorithmic features of MAiNGO can be found in our technical report available on [our website](http://permalink.avt.rwth-aachen.de/?id=729717).
For a detailed installation guide, description of the algorithm, and a complete list of available options, please clone the repository first and then refer to the documentation found at `doc/html/index.html` in the MAiNGO repository.
For a detailed installation guide, description of the algorithm, and a complete list of available options, please refer to the [MAiNGO documentation](https://avt-svt.pages.rwth-aachen.de/public/maingo).
## Obtaining MAiNGO
The MAiNGO git repository contains submodules for all dependencies. Hence, to obtain MAiNGO, you need to use the following commands (on Windows, you might need to get Git Bash first).
### Via Git
$ git clone https://git.rwth-aachen.de/avt.svt/public/maingo.git <directory>
To acess the full functionality of MAiNGO including the C++ API, text-based parser, MPI parallelization and all supported subsolvers, you should obtain the code from this git repository. The MAiNGO repository uses submodules for all dependencies. Hence, to obtain MAiNGO, you need to run the following commands (on Windows, you might need to get Git Bash first).
$ git clone https://git.rwth-aachen.de/avt-svt/public/maingo.git <directory>
$ cd <directory>
$ git submodule init
$ git submodule update -j 1
If you want to switch from between HTTPS (default) and SSH protocols for obtaining the submodules, simply execute the shell scripts (only for Linux or MacOS) `switchToSsh` or `switchToHttps` **after** executing the `git submodule init` command.
For more information on SSH keys, please refer to the git documentation on SSH authentication which can be found under `Help -> SSH authentication` in your GitLab.
If you are having https authentication problems on Windows, please make sure that your credential manager has stored the correct settings. The Windows credential manager can be found at
`Control Panel -> User Accounts -> Manage your credentials`.
If you want to check if the above has worked, you can check that each subfolder in the `dep` folder is non-empty.
A note for users more familiar with git: `git submodule update` is executed without the `--recursive` option.
This avoids instantiating any indirect dependencies; in the repository design of MAiNGO, all dependencies (including indirect ones) are present in `dep`. Additionally, it is executed using only one process `-j 1` to avoid input failures.
This avoids instantiating any indirect dependencies; in the repository design of MAiNGO, all dependencies (including indirect ones) are present in `dep`.
Additionally, it is executed using only one process `-j 1` to avoid input failures.
## Updating MAiNGO
If you want to update to the latest MAiNGO version, use the following git commands
If you have cloned the MAiNGO repository before and want to update to the latest version, use the following git commands
$ git pull
$ git submodule update -j 1
If you changed any of the source files in MAiNGO or any dependency found in the <tt>dep/</tt> folder, you should restore the original state of MAiNGO and the dependencies by running <tt>git stash</tt> in the corresponding repository.
Then, update the MAiNGO repository with the <tt>git pull</tt> and <tt>git submodule update</tt> commands. Finally, you can retrieve your changes via <tt>git stash pop</tt>.
### Via PyPI
If you plan to use MAiNGO via its Python interface, you can also obtain the [<tt>maingopy</tt> package from PyPI](https://pypi.org/project/maingopy) via
$ pip install maingopy
This package is available as source as well as binary distribution containing a precompiled version of MAiNGO for multiple Python versions under Windows, Linux, and MacOS.
It also includes the <tt>melonpy</tt> module, the Python interface of [MeLOn](https://git.rwth-aachen.de/avt-svt/public/melon), which contains various machine learning models for use in optimization problems to be solved with MAiNGO.
Note that the following features are *not* available in the maingopy package available via PyPI:
- the MPI parallelization of MAiNGO
- the C++ API and text-based model parser of MAiNGO
- the subsolvers CPLEX and KNITRO
If you want to use these features, you should obtain the MAiNGO code via git as described above.
This also enables you to build a version of the <tt>maingopy</tt> package that can use CPLEX and KNITRO if you have them installed on your system.
The MPI parallelization is currently not available via the Python interface of MAiNGO even when building it from source.
## First steps
If you are new to MAiNGO, we recommend looking at the following documents in this order after having cloned the repository:
* `doc/html/index.html`: This is the manual for MAiNGO. It includes information on how to install and execute MAiNGO.
If you are new to MAiNGO, we recommend looking at the following to get started:
* The [documentation of MAiNGO](https://avt-svt.pages.rwth-aachen.de/public/maingo) contains more detailed information on how to obtain, build and execute MAiNGO.
* `examples/01_BasicExample`: This folder contains the most basic example for solving problems with MAiNGO.
## Example applications
......
Release version 0.5.0 (June 14th, 2021):
- New features & availability:
- MAiNGO is now also available from PyPI for use via Python
- New intrinsic functions: fstep & bstep, i.e. unit steps from 0 to 1 (or vice version) at x=0
- Bugfixes:
- Fixed bug that caused instant crashes of the MPI parallelized version on some systems (see info on MUMPS below)
- Minor fixes to ensure compatibility with GCC 11
- Several fixes in MAiNGO_Reader_Writer utility to avoid compile errors with different versions of GCC and MSVC 2019
- Misc:
- Now using GitLab CI/CD for automated testing
- The documentation of MAiNGO is now hosted via GitLab Pages (see links in Readme.md)
- Now giving more information on third-party software (local / linear solvers etc.) used
- Now printing more comprehensive information about the initial point (constraint residuals etc.) when using BAB_verbosity = VERB_ALL
- Third-party libraries:
- Upgraded to MUMPS 5.4.0; also renamed all routines called MPI_* to FPI_* to avoid issues with the fake MPI implementation of MUMPS
when using MAiNGO with actual MPI parallelization
Release version 0.4.0 (March 4th, 2021):
- New features:
- MAiNGO now has a Python API. It consists of Python bindings for the C++ API and thus works very similarly to the latter
......@@ -11,7 +28,7 @@ Release version 0.4.0 (March 4th, 2021):
- Renamed a few options as well as methods of the MAiNGO class to be more descriptive
- Fixed random seeds for CPLEX and CLP
- Improved diagnostic output for problems without objective or with constant objective
- Third party libraries:
- Third-party libraries:
- Included pybind11 for the Python API
- New version of babbase containing minor bugfixes, and now also allowing binary variables without explicit bounds
- New version of mcpp containing bugfixes in relaxations and constraint propagation
......@@ -39,7 +56,7 @@ Release version 0.3.0 (June 12th, 2020):
- An example for using MAiNGO within Bayesian optimization (i.e., maximizing/minimizing typical acquisition functions for Bayesian optimization that use Gaussian processes)
- The documentation for building MAiNGO was improved
- A section on the output written by MAiNGO was added
- Third party libraries:
- Third-party libraries: