├── .gitignore ├── bundled ├── patches │ ├── lt_init.diff │ └── shared.diff └── sdpawrap │ ├── CMakeLists.txt │ └── sdpawrap.cpp ├── README.md ├── LICENSE.md └── .travis.yml /.gitignore: -------------------------------------------------------------------------------- 1 | products/ 2 | downloads/ 3 | build/ 4 | -------------------------------------------------------------------------------- /bundled/patches/lt_init.diff: -------------------------------------------------------------------------------- 1 | diff --git a/configure.ac b/configure.ac 2 | index b9a3b19..19ef6d8 100644 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -9,6 +9,7 @@ AC_PROG_RANLIB 6 | AC_PROG_CC 7 | AC_PROG_CXX 8 | AC_PROG_FC 9 | +LT_INIT 10 | AC_FC_LIBRARY_LDFLAGS 11 | AC_FC_WRAPPERS 12 | AC_CANONICAL_HOST 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SDPABuilder 2 | 3 | [![Build Status](https://travis-ci.org/JuliaOpt/SDPABuilder.svg?branch=master)](https://travis-ci.org/JuliaOpt/SDPABuilder) 4 | 5 | This repository builds binary artifacts for the SDPABuilder project. Binary artifacts are automatically uploaded to 6 | [this repository's GitHub releases page](https://github.com/JuliaOpt/SDPABuilder/releases) whenever a tag is created 7 | on this repository. 8 | 9 | This repository was created using [BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl) 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to deal 4 | in the Software without restriction, including without limitation the rights 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | SOFTWARE. 19 | -------------------------------------------------------------------------------- /bundled/sdpawrap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(SDPAWrap) 2 | 3 | cmake_minimum_required(VERSION 2.8.12) 4 | #set(CMAKE_MACOSX_RPATH 1) 5 | set(CMAKE_MACOSX_RPATH 0) 6 | set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 7 | add_definitions(-DJULIA_ENABLE_THREADING) 8 | 9 | 10 | # debug 11 | set(CMAKE_VERBOSE_MAKEFILE ON) 12 | 13 | find_package(JlCxx) 14 | 15 | set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${Julia_LIBRARY_DIR}") 16 | 17 | # See https://github.com/blegat/SDPA.jl/pull/11#issuecomment-422154825 18 | #get_target_property(JlCxx_location JlCxx::cxxwrap_julia LOCATION) 19 | #get_filename_component(JlCxx_location ${JlCxx_location} DIRECTORY) 20 | #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${JlCxx_location}") 21 | 22 | include_directories(${SDPA_DIR}) 23 | include_directories(${MUMPS_INCLUDE_DIR}) 24 | include_directories(${Julia_INCLUDE_DIRS}) 25 | include_directories(${CMAKE_SOURCE_DIR}/include) 26 | include_directories(${INTERFACE_INCLUDE_DIRECTORIES}) 27 | 28 | 29 | add_library(sdpawrap SHARED sdpawrap.cpp) 30 | # ${PORD_LIB}: PORD_LIB does not seem usefull 31 | #target_include_directories(sdpawrap PRIVATE ${Julia_INCLUDE_DIRS}) 32 | target_link_libraries(sdpawrap JlCxx::cxxwrap_julia ${SDPA_LIBRARY}) 33 | #target_link_libraries(sdpawrap ${JLCXX_TARGET}) 34 | 35 | #get_property(JULIA_LIBRARY TARGET JlCxx::cxxwrap_julia PROPERTY INTERFACE_LINK_LIBRARIES) 36 | #get_property(JULIA_INCLUDE_DIRS TARGET JlCxx::cxxwrap_julia PROPERTY INTERFACE_INCLUDE_DIRECTORIES) 37 | 38 | install(TARGETS 39 | sdpawrap 40 | LIBRARY DESTINATION lib${LIBDIR_SUFFIX} 41 | ARCHIVE DESTINATION lib${LIBDIR_SUFFIX} 42 | RUNTIME DESTINATION lib${LIBDIR_SUFFIX} 43 | INCLUDES DESTINATION include) 44 | -------------------------------------------------------------------------------- /bundled/patches/shared.diff: -------------------------------------------------------------------------------- 1 | diff --git a/Makefile.am b/Makefile.am 2 | index afadcff..400b3cf 100644 3 | --- a/Makefile.am 4 | +++ b/Makefile.am 5 | @@ -20,20 +20,22 @@ sdpa_call.h sdpa_chordal.h sdpa_dataset.h sdpa_dpotrf.h \ 6 | sdpa_include.h sdpa_io.h sdpa_jordan.h sdpa_linear.h sdpa_newton.h \ 7 | sdpa_parts.h sdpa_right.h sdpa_struct.h sdpa_tool.h 8 | 9 | -lib_LIBRARIES = libsdpa.a 10 | -libsdpa_a_SOURCES = sdpa_block.cpp sdpa_call.cpp sdpa_chordal.cpp \ 11 | +lib_LTLIBRARIES = libsdpa.la 12 | +libsdpa_la_LDFLAGS = -shared -no-undefined -export-symbols-regex "(sdpa|SDPA)" 13 | +libsdpa_la_LIBADD = $(MUMPS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(PTHREAD_LIBS) $(FCLIBS) 14 | +libsdpa_la_SOURCES = sdpa_block.cpp sdpa_call.cpp sdpa_chordal.cpp \ 15 | sdpa_dataset.cpp sdpa_dpotrf.cpp sdpa_io.cpp sdpa_jordan.cpp \ 16 | sdpa_linear.cpp sdpa_newton.cpp sdpa_parts.cpp sdpa_solve.cpp \ 17 | sdpa_struct.cpp sdpa_tool.cpp \ 18 | sdpa_algebra.h sdpa_block.h \ 19 | sdpa_call.h sdpa_chordal.h sdpa_dataset.h sdpa_dpotrf.h \ 20 | sdpa_include.h sdpa_io.h sdpa_jordan.h sdpa_linear.h sdpa_newton.h \ 21 | -sdpa_parts.h sdpa_right.h sdpa_struct.h sdpa_tool.h 22 | -libsdpa_a_CXXFLAGS = $(pthread_cflags) $(MUMPS_INCLUDE) $(PTHREAD_INCLUDE) 23 | +sdpa_parts.h sdpa_right.h sdpa_struct.h sdpa_tool.h 24 | +libsdpa_la_CXXFLAGS = $(pthread_cflags) $(MUMPS_INCLUDE) $(PTHREAD_INCLUDE) 25 | 26 | bin_PROGRAMS = sdpa 27 | sdpa_SOURCES = sdpa_exe.cpp 28 | -sdpa_LDADD = -L. -lsdpa $(MUMPS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(PTHREAD_LIBS) $(FCLIBS) 29 | +sdpa_LDADD = libsdpa.la $(MUMPS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(PTHREAD_LIBS) $(FCLIBS) 30 | sdpa_CXXFLAGS = $(pthread_cflags) $(MUMPS_INCLUDE) $(PTHREAD_INCLUDE) 31 | 32 | # each file of mumps is copied by 'nobase' option 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: julia 2 | os: 3 | - linux 4 | julia: 5 | - 1.0 6 | notifications: 7 | email: false 8 | git: 9 | depth: 99999999 10 | cache: 11 | timeout: 1000 12 | directories: 13 | - downloads 14 | env: 15 | global: 16 | - BINARYBUILDER_DOWNLOADS_CACHE=downloads 17 | - BINARYBUILDER_AUTOMATIC_APPLE=true 18 | sudo: required 19 | 20 | # Before anything else, get the latest versions of things 21 | before_script: 22 | - julia -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaPackaging/BinaryProvider.jl"))' 23 | - julia -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaPackaging/BinaryBuilder.jl")); Pkg.build()' 24 | 25 | script: 26 | - julia build_tarballs.jl 27 | 28 | 29 | deploy: 30 | provider: releases 31 | api_key: 32 | # Note; this api_key is only valid for juan-pablo-vielma/SDPABuilder; you need 33 | # to make your own: https://docs.travis-ci.com/user/deployment/releases/ 34 | secure: o/4ZosUbxP5CWuNgI6AP5KZNGPQyUw4LDP1efRAouXVfGMjsUsUtDqFFK6B9cW+F0XgQId0CinZrPHFKg1HSQ/3EoFYMAGtU+DvDKLACI4+u0rFGrA/D1XtbP6tDJGQAxdWgUk542RFYYf7ixAieVlR+Lh6shMLSF/qS/Mro+7ppWyHuX+UwGiNQwukJ1p/NrDJLEbdaI5/QJtuIcDxi7/UP6GkVnDhpE+FQqbqn1P3G3wclCZKXeBM31NRStEvy9bJDFen+OmPOon585SoTARH0TJ7CG9uuMb29QGVrYFycWL1095JRs5rlxvp/LuHm4jqI8QzvCr2ZPQud81l+M1MGbS+E0AxwSsoje0OGAqucktZYesjCMduAJZVPCEUU2lFb0mNz0RN8+oFz11G0mGGdjiTD/rWb7BVPGLH7ztH8AwoT6qFbSp7Sfr2XLoC+kzkFMHgJfVoA9RAYasCwuIA94ft/tivCYHwPTfpY7VQmJf04j3vVbuUJA2i0catzDfgCL4VlCELCZPJIiyfuNxl+HUy4392+RfZaabAUDWPdetJq3YHf3JUA+/ZshO8GCReChUmZ6Ig3X5eKHpHv3f5SZt6amE1gdc/darame4lwdZF18ApvT+9sih0MAFKznebq+QDlI1gopR862BVXdPHNhQ3mI4PIiysF5NkBn0A= 35 | file_glob: true 36 | file: products/* 37 | skip_cleanup: true 38 | on: 39 | repo: JuliaOpt/SDPABuilder 40 | tags: true 41 | -------------------------------------------------------------------------------- /bundled/sdpawrap/sdpawrap.cpp: -------------------------------------------------------------------------------- 1 | #include "jlcxx/jlcxx.hpp" 2 | #include 3 | 4 | namespace jlcxx 5 | { 6 | template<> struct IsBits : std::true_type {}; 7 | template<> struct IsBits : std::true_type {}; 8 | template<> struct IsBits : std::true_type {}; 9 | } 10 | 11 | JLCXX_MODULE define_julia_module(jlcxx::Module& sdpa) 12 | { 13 | sdpa.add_bits("ConeType"); 14 | sdpa.set_const("SDP", SDPA::SDP); 15 | sdpa.set_const("SOCP", SDPA::SOCP); 16 | sdpa.set_const("LP", SDPA::LP); 17 | 18 | sdpa.add_bits("PhaseType"); 19 | sdpa.set_const("noINFO", SDPA::noINFO); 20 | sdpa.set_const("pFEAS", SDPA::pFEAS); 21 | sdpa.set_const("dFEAS", SDPA::dFEAS); 22 | sdpa.set_const("pdFEAS", SDPA::pdFEAS); 23 | sdpa.set_const("pdINF", SDPA::pdINF); 24 | sdpa.set_const("pFEAS_dINF", SDPA::pFEAS_dINF); 25 | sdpa.set_const("pINF_dFEAS", SDPA::pINF_dFEAS); 26 | sdpa.set_const("pdOPT", SDPA::pdOPT); 27 | sdpa.set_const("pUNBD", SDPA::pUNBD); 28 | sdpa.set_const("dUNBD", SDPA::dUNBD); 29 | 30 | sdpa.add_bits("ParameterType"); 31 | sdpa.set_const("PARAMETER_DEFAULT", SDPA::PARAMETER_DEFAULT); 32 | sdpa.set_const("PARAMETER_UNSTABLE_BUT_FAST", SDPA::PARAMETER_UNSTABLE_BUT_FAST); 33 | sdpa.set_const("PARAMETER_STABLE_BUT_SLOW", SDPA::PARAMETER_STABLE_BUT_SLOW); 34 | 35 | sdpa.add_type("SDPAProblem") 36 | .method("inputConstraintNumber", &SDPA::inputConstraintNumber) 37 | .method("getConstraintNumber", &SDPA::getConstraintNumber) 38 | .method("inputBlockNumber", &SDPA::inputBlockNumber) 39 | .method("getBlockNumber", &SDPA::getBlockNumber) 40 | .method("inputBlockSize", &SDPA::inputBlockSize) 41 | .method("getBlockSize", &SDPA::getBlockSize) 42 | .method("inputBlockType", &SDPA::inputBlockType) 43 | .method("getBlockType", &SDPA::getBlockType) 44 | .method("initializeUpperTriangleSpace", &SDPA::initializeUpperTriangleSpace) 45 | .method("inputCVec", &SDPA::inputCVec) 46 | .method("inputElement", &SDPA::inputElement) 47 | .method("initializeUpperTriangle", &SDPA::initializeUpperTriangle) 48 | .method("initializeSolve", &SDPA::initializeSolve) 49 | .method("solve", &SDPA::solve) 50 | .method("getIteration", &SDPA::getIteration) 51 | .method("getPrimalObj", &SDPA::getPrimalObj) 52 | .method("getDualObj", &SDPA::getDualObj) 53 | .method("getPrimalError", &SDPA::getPrimalError) 54 | .method("getDualError", &SDPA::getDualError) 55 | .method("getPhaseValue", &SDPA::getPhaseValue) 56 | .method("getResultXMat", &SDPA::getResultXMat) 57 | .method("getResultXVec", &SDPA::getResultXVec) 58 | .method("getResultYMat", &SDPA::getResultYMat) 59 | .method("terminate", &SDPA::terminate) 60 | .method("setParameterType", &SDPA::setParameterType) 61 | .method("setParameterMaxIteration", &SDPA::setParameterMaxIteration) 62 | .method("setParameterEpsilonStar", &SDPA::setParameterEpsilonStar) 63 | .method("setParameterLambdaStar", &SDPA::setParameterLambdaStar) 64 | .method("setParameterOmegaStar", &SDPA::setParameterOmegaStar) 65 | .method("setParameterLowerBound", &SDPA::setParameterLowerBound) 66 | .method("setParameterUpperBound", &SDPA::setParameterUpperBound) 67 | .method("setParameterBetaStar", &SDPA::setParameterBetaStar) 68 | .method("setParameterBetaBar", &SDPA::setParameterBetaBar) 69 | .method("setParameterGammaStar", &SDPA::setParameterGammaStar) 70 | .method("setParameterEpsilonDash", &SDPA::setParameterEpsilonDash); 71 | 72 | //.method("writeInputSparse", &SDPA::writeInputSparse); 73 | } 74 | --------------------------------------------------------------------------------