From b84f54dc653a0769d2afe7c1dd047b63b3c66e9d Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 22 Feb 2022 16:41:56 +1300 Subject: [PATCH 1/8] Prep for v1.0 release --- .github/workflows/ci.yml | 4 +- Project.toml | 9 +- deps/.gitignore | 8 - deps/.unittest.sh | 1 - deps/build.jl | 27 -- deps/build_CSDP.v6.2.0.jl | 100 ----- deps/build_CompilerSupportLibraries.v0.3.3.jl | 240 ------------ deps/build_OpenBLAS32.v0.3.9.jl | 369 ------------------ src/CSDP.jl | 13 +- 9 files changed, 9 insertions(+), 762 deletions(-) delete mode 100644 deps/.gitignore delete mode 100644 deps/.unittest.sh delete mode 100644 deps/build.jl delete mode 100644 deps/build_CSDP.v6.2.0.jl delete mode 100644 deps/build_CompilerSupportLibraries.v0.3.3.jl delete mode 100644 deps/build_OpenBLAS32.v0.3.9.jl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c7dd6..beb8d28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,12 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.0', '1'] # Test against LTS + version: ['1.6', '1'] # Test against LTS os: [ubuntu-latest, macOS-latest, windows-latest] arch: [x64] include: # Also test against 32-bit Linux on LTS. - - version: '1' + - version: '1.6' os: ubuntu-latest arch: x86 steps: diff --git a/Project.toml b/Project.toml index e00d0d4..14328fa 100644 --- a/Project.toml +++ b/Project.toml @@ -1,22 +1,17 @@ name = "CSDP" uuid = "0a46da34-8e4b-519e-b418-48813639ff34" repo = "https://github.com/jump-dev/CSDP.jl.git" -version = "0.7.3" +version = "1.0.0" [deps] -BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" CSDP_jll = "9ce75daa-2788-5e2c-ba1d-cf8c48367b27" -Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" -Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] -BinaryProvider = "0.5.9" CSDP_jll = "=6.2.0, =600.200.1" -Glob = "1.2" -MathOptInterface = "0.10" +MathOptInterface = "1" julia = "1" [extras] diff --git a/deps/.gitignore b/deps/.gitignore deleted file mode 100644 index 8cfabf7..0000000 --- a/deps/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -deps.jl -build -downloads/ -src -usr -build.64/ -src.64/ -build.log diff --git a/deps/.unittest.sh b/deps/.unittest.sh deleted file mode 100644 index 2b9459c..0000000 --- a/deps/.unittest.sh +++ /dev/null @@ -1 +0,0 @@ -unittest() { rm -fr usr/ && julia --color=yes -e 'Pkg.build("CSDP")' && julia --color=yes -e 'using CSDP; info("CSDP => $(CSDP.csdp)"); Pkg.test("CSDP")'; } diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index d0d4739..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,27 +0,0 @@ -# Inspired from https://github.com/JuliaDatabases/MySQL.jl/blob/36eaf2bfbbdd9a27c408d0b2a734fff0d81b63ad/deps/build.jl -module Anon1 end -module Anon2 end -module Anon3 end - -@static if VERSION < v"1.3.0" - using BinaryProvider # requires BinaryProvider 0.3.0 or later - - # Parse some basic command-line arguments - const verbose = "--verbose" in ARGS - const prefix = Prefix( - get( - [a for a in ARGS if a != "--verbose"], - 1, - joinpath(@__DIR__, "usr"), - ), - ) - - products = [LibraryProduct(prefix, ["libcsdp"], :libcsdp)] - - Anon1.include("build_CompilerSupportLibraries.v0.3.3.jl") - Anon2.include("build_OpenBLAS32.v0.3.9.jl") - Anon3.include("build_CSDP.v6.2.0.jl") - - # Finally, write out a deps.jl file - write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose = true) -end # VERSION diff --git a/deps/build_CSDP.v6.2.0.jl b/deps/build_CSDP.v6.2.0.jl deleted file mode 100644 index d8fd45c..0000000 --- a/deps/build_CSDP.v6.2.0.jl +++ /dev/null @@ -1,100 +0,0 @@ -# Generated by running -# julia --color=yes generate_buildjl.jl C/Coin-OR/CSDP/build_tarballs.jl JuliaBinaryWrappers/CSDP_jll.jl CSDP-v6.2.0+4 -# in the root the the source tree of https://github.com/JuliaPackaging/Yggdrasil/ -# by first replacing the `include` by its content, see https://github.com/JuliaPackaging/Yggdrasil/issues/858 -# We also added `prefix, ` after `LibraryProduct(`. -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix( - get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")), -) -products = [LibraryProduct(prefix, ["libcsdp"], :libcsdp)] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/CSDP_jll.jl/releases/download/CSDP-v6.2.0+4" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc = :glibc) => ( - "$bin_prefix/CSDP.v6.2.0.aarch64-linux-gnu.tar.gz", - "446a2d5c60a9270a345d2aab12093c76accab967c175ff96de7f684e48c2f482", - ), - Linux(:aarch64, libc = :musl) => ( - "$bin_prefix/CSDP.v6.2.0.aarch64-linux-musl.tar.gz", - "1e0c1e5c89e6b70538ff9b4e705bda3d267721ae4d58ee600152bc5f6101bf46", - ), - Linux(:armv7l, libc = :glibc, call_abi = :eabihf) => ( - "$bin_prefix/CSDP.v6.2.0.armv7l-linux-gnueabihf.tar.gz", - "88532fc19eb7a33b72bad0b7e01d61b1bd29b6069b4a883d468d6e12f00cf711", - ), - Linux(:armv7l, libc = :musl, call_abi = :eabihf) => ( - "$bin_prefix/CSDP.v6.2.0.armv7l-linux-musleabihf.tar.gz", - "f1dd8bba6a91b4c94394ad421487b99249c8abd592dfbb2256d0dee704ea2a82", - ), - Linux(:i686, libc = :glibc) => ( - "$bin_prefix/CSDP.v6.2.0.i686-linux-gnu.tar.gz", - "80e2a2b2263ca378efb23cd565814bd66f5e120cdb955e9bdf548ab32b43b75d", - ), - Linux(:i686, libc = :musl) => ( - "$bin_prefix/CSDP.v6.2.0.i686-linux-musl.tar.gz", - "df0608d84f7b4c511ef002271f0f6a9481a81da3e3c751d36392d6fc89540cf2", - ), - Windows(:i686) => ( - "$bin_prefix/CSDP.v6.2.0.i686-w64-mingw32.tar.gz", - "33f83f94bcec13087f9fa9276345ec296722b14b6a28c3790bb494e419bf41ea", - ), - Linux(:powerpc64le, libc = :glibc) => ( - "$bin_prefix/CSDP.v6.2.0.powerpc64le-linux-gnu.tar.gz", - "461214a00369395ccd544ec40e7c89d787fcc2a869aeb73a832f79ff06c16b97", - ), - MacOS(:x86_64) => ( - "$bin_prefix/CSDP.v6.2.0.x86_64-apple-darwin14.tar.gz", - "af4cbf6d324b32f26e3700d50ed2950eebbd3bdc6cc13eae8c1d15ba25c70de6", - ), - Linux(:x86_64, libc = :glibc) => ( - "$bin_prefix/CSDP.v6.2.0.x86_64-linux-gnu.tar.gz", - "7ddaafbe0079f6852b60c3479bbed050b367931da3c231ba26ef20c2b71c698f", - ), - Linux(:x86_64, libc = :musl) => ( - "$bin_prefix/CSDP.v6.2.0.x86_64-linux-musl.tar.gz", - "337e68f51132e080d8bb5cdf79197326df9637ede69ed9258c67626a99edc7b5", - ), - FreeBSD(:x86_64) => ( - "$bin_prefix/CSDP.v6.2.0.x86_64-unknown-freebsd11.1.tar.gz", - "d7affbc5d639bff71fce4848d77d368dbca49dd8125cf849a416c4c059668201", - ), - Windows(:x86_64) => ( - "$bin_prefix/CSDP.v6.2.0.x86_64-w64-mingw32.tar.gz", - "181520ca04efb32323a369ecee7d067937d9a59d5f45ed4b78d3669f8a52769d", - ), -) - -# Install unsatisfied or updated dependencies: -# We added `, isolate=true` as otherwise, it would segfault when closing `OpenBLAS32`, -# probably because it is conflicting with Julia openblas. -unsatisfied = - any(!satisfied(p; verbose = verbose, isolate = true) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error( - "Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!", - ) -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix = prefix) - # Download and install binaries - install( - dl_info...; - prefix = prefix, - force = true, - verbose = verbose, - ignore_platform = true, - ) -end diff --git a/deps/build_CompilerSupportLibraries.v0.3.3.jl b/deps/build_CompilerSupportLibraries.v0.3.3.jl deleted file mode 100644 index 1aa3bbf..0000000 --- a/deps/build_CompilerSupportLibraries.v0.3.3.jl +++ /dev/null @@ -1,240 +0,0 @@ -# Generated by running -# julia --color=yes generate_buildjl.jl C/CompilerSupportLibraries/build_tarballs.jl JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl CompilerSupportLibraries-v0.3.3+0 -# in the root the the source tree of https://github.com/JuliaPackaging/Yggdrasil/ -# by first replacing the `include` by its content, see https://github.com/JuliaPackaging/Yggdrasil/issues/858 -# and commenting out `build_info = autobuild(...)`, `tarball_path, ...` and replace `sources = ...` by `sources = nothing`. -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix( - get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")), -) -products = [ - LibraryProduct( - prefix, - ["libgcc_s", "libgcc_s_sjlj", "libgcc_s_seh"], - :libgcc_s, - ), - LibraryProduct(prefix, ["libstdc++"], :libstdcxx), - LibraryProduct(prefix, ["libgfortran"], :libgfortran), - LibraryProduct(prefix, ["libgomp"], :libgomp), -] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.3.3+0" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux(:aarch64, libc = :glibc, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran3.tar.gz", - "17132bd0c2f2c6d8426a601b57de2c4e670da64076ab7ab0f311dc3c39ed421c", - ), - Linux(:aarch64, libc = :glibc, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran4.tar.gz", - "c6fa95bb0873c23084bfb7e154ef546b21488777e2d352e5acf38d8e9800c14d", - ), - Linux(:aarch64, libc = :glibc, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-gnu-libgfortran5.tar.gz", - "a3b98e7b24c580f5120ac2344d19c4884c93b17271fb296fa0b97fc562de7f2d", - ), - Linux(:aarch64, libc = :musl, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran3.tar.gz", - "ee0b1e57302709cf159573ec23017fec797af6b0dae7dbd2ea0904e67b4e0343", - ), - Linux(:aarch64, libc = :musl, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran4.tar.gz", - "b5fb9e89ed28eb3aa31397a165e583d6e860e54e24bd9af7474670335e2b2d57", - ), - Linux(:aarch64, libc = :musl, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.aarch64-linux-musl-libgfortran5.tar.gz", - "85cd3c8ad611c8949f7cd0fd01444650358144f576e69fa20d58e9f29f781695", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc4), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran3.tar.gz", - "6964b730d3764a82252fe6144d0e9103d0d9a409027c44de224afc8f05782733", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc7), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran4.tar.gz", - "6b76ac45d465413bf6bc6b45cda8f1f528ce212979d94887b80d9b975e116696", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc8), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-gnueabihf-libgfortran5.tar.gz", - "e5c9854d8191f2fabe81ef1fb7974ce4c4e9261c790ec21e225fbdc57ccf3bf0", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc4), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran3.tar.gz", - "ead80d5f2f8ed45598fd8331da07dc3e430e42b8129d982e1209c6dc392c4595", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc7), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran4.tar.gz", - "713f7de6f6b79869c4818b861d9877d008ef0f9bc287a88fb6c80c5757a5f80d", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = CompilerABI(:gcc8), - ) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.armv7l-linux-musleabihf-libgfortran5.tar.gz", - "7fcd1b6a46cf1bb89602b3ad64dc546c251ca628197a9ab3d23d2ef460f39709", - ), - Linux(:i686, libc = :glibc, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran3.tar.gz", - "39f8673f0fb61a1d2c9bb3e847a0e7275bf56ad3a9f41e2c85063c1d9c4c9d5e", - ), - Linux(:i686, libc = :glibc, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran4.tar.gz", - "aafe4c28b74eb3fe57e861a814bec3bf7d5d0d1ec252f558a34fd95ea3fedac8", - ), - Linux(:i686, libc = :glibc, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-gnu-libgfortran5.tar.gz", - "55abe3b785c179e86430616ad6309c0bde47d32517f468f064c5c69a1b506e74", - ), - Linux(:i686, libc = :musl, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran3.tar.gz", - "2846df4b60cbabfc86b990c87bec8d7e58431c4ad1b250036993a899fdb29172", - ), - Linux(:i686, libc = :musl, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran4.tar.gz", - "73ba40c10b825b0a5abc4fd6bd1edd9d270ff4dd37c652a6380e38da5aeab864", - ), - Linux(:i686, libc = :musl, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-linux-musl-libgfortran5.tar.gz", - "80f8df63b1137a061b30a11bc2b0a985fbde56c665601bb30ff7762e3fbace72", - ), - Windows(:i686, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran3.tar.gz", - "e53493d881c2a36d697e6abbeaeec8181488868e479bf06ea7db959d9a016763", - ), - Windows(:i686, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran4.tar.gz", - "58c25e695e7dace12db66d19575914922183a8083c353b691e16b1bf86ab9a3a", - ), - Windows(:i686, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.i686-w64-mingw32-libgfortran5.tar.gz", - "c9bc14ed49945c57353fffa7d7e374fbb146218bc0345d43bbbf8182f142ca77", - ), - Linux(:powerpc64le, libc = :glibc, compiler_abi = CompilerABI(:gcc4)) => - ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran3.tar.gz", - "c2a29d7f514acca1f9a8f0b723098d1340f3002ab689010546afcb0f9fa5d315", - ), - Linux(:powerpc64le, libc = :glibc, compiler_abi = CompilerABI(:gcc7)) => - ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran4.tar.gz", - "facbe1ae766e774c9ca2782dcb5dc6544b1c025ec1cc091bae15b3f57e6b5513", - ), - Linux(:powerpc64le, libc = :glibc, compiler_abi = CompilerABI(:gcc8)) => - ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.powerpc64le-linux-gnu-libgfortran5.tar.gz", - "c11ab7865a3812446c2f1b32c78d89e3af2ddd31c9c32b472706e8f20368d6ed", - ), - MacOS(:x86_64, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran3.tar.gz", - "2739fe9184b065bf32cd1246ee12c1fd6507a9932a921dbf1bf268a3819164a0", - ), - MacOS(:x86_64, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran4.tar.gz", - "cb2825f0eae2cf4e5b6bc7075f3ee70afb8a31711fd5220bfd85827b87625a43", - ), - MacOS(:x86_64, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-apple-darwin14-libgfortran5.tar.gz", - "e308cbb8e0b2b50635f98cf700b24743a2eb9d5c7726a99375ef31e096371642", - ), - Linux(:x86_64, libc = :glibc, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran3.tar.gz", - "9d0223f3562e0b609595904ecab0fd55650f068da367353a38146394d8329f69", - ), - Linux(:x86_64, libc = :glibc, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran4.tar.gz", - "adcc8519411cf0518c472d3ce47d8ac93492934a05c0276afe76eda6d91c4f4d", - ), - Linux(:x86_64, libc = :glibc, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-gnu-libgfortran5.tar.gz", - "23771ec6d2fa014db480b5cfe8e1b6f34b2d29e8bbea8cdce1edd5f1e15cb6e0", - ), - Linux(:x86_64, libc = :musl, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran3.tar.gz", - "a04abda3002d81567e415d17b6d72c010ef6e202d47e6d8bac32c034321ddd48", - ), - Linux(:x86_64, libc = :musl, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran4.tar.gz", - "b6911e4ece0432d74c24d47d12000179fb00912e587ddae08e0ab1b7eda4bcf5", - ), - Linux(:x86_64, libc = :musl, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-linux-musl-libgfortran5.tar.gz", - "269279af71f2b64c30162cfb0d2168d518fa913aade7564fa28c8928497b3e64", - ), - FreeBSD(:x86_64, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran3.tar.gz", - "aeda35832c30df2d24f06cd061b21f573b1167c76ff57f3f20f1b5dfbe249adc", - ), - FreeBSD(:x86_64, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran4.tar.gz", - "3476688c80d8032685c57ced39a810447fc3da1b3f3275fe3af37509ccc1252e", - ), - FreeBSD(:x86_64, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-unknown-freebsd11.1-libgfortran5.tar.gz", - "19a779b6e539b0050432684d952342b18c28587b0c27a399cb0a00da2773c381", - ), - Windows(:x86_64, compiler_abi = CompilerABI(:gcc4)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran3.tar.gz", - "bec6c38ec12b26b1fd3c99944af81e463a29daf52152b53f49ca15fbf633b528", - ), - Windows(:x86_64, compiler_abi = CompilerABI(:gcc7)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran4.tar.gz", - "aec25acb618447247e3ad5ee9aec88725cd26d7abb9b6c29ac45e7aea601331e", - ), - Windows(:x86_64, compiler_abi = CompilerABI(:gcc8)) => ( - "$bin_prefix/CompilerSupportLibraries.v0.3.3.x86_64-w64-mingw32-libgfortran5.tar.gz", - "69957fdd4eb5d6cfd1073c3b63b63a3ff3e2db909b4f4834b102d8a96944f66c", - ), -) - -# Install unsatisfied or updated dependencies: -unsatisfied = any(!satisfied(p; verbose = verbose) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error( - "Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!", - ) -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix = prefix) - # Download and install binaries - install(dl_info...; prefix = prefix, force = true, verbose = verbose) -end - -# Write out a deps.jl file that will contain mappings for our products -write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose = verbose) diff --git a/deps/build_OpenBLAS32.v0.3.9.jl b/deps/build_OpenBLAS32.v0.3.9.jl deleted file mode 100644 index 131d7fd..0000000 --- a/deps/build_OpenBLAS32.v0.3.9.jl +++ /dev/null @@ -1,369 +0,0 @@ -# Generated by running -# julia --color=yes generate_buildjl.jl O/OpenBLAS/OpenBLAS32@0.3.9/build_tarballs.jl JuliaBinaryWrappers/OpenBLAS32_jll.jl OpenBLAS32-v0.3.9+2 -# in the root the the source tree of https://github.com/JuliaPackaging/Yggdrasil/ -# by first replacing the `include` by its content, see https://github.com/JuliaPackaging/Yggdrasil/issues/858 -# We also added `prefix, ` after `LibraryProduct(`. -# Renamed `CompilerABI` into `_CompilerABI` and added this as this method was not defined. -function _CompilerABI(; libgfortran_version = nothing) - # See https://github.com/JuliaPackaging/BinaryProvider.jl/blob/332b58c898486c6cdf3c963164b1f66f9850d64b/src/PlatformNames.jl#L560-L564 - if libgfortran_version == v"3.0.0" - gcc = :gcc4 - elseif libgfortran_version == v"4.0.0" - gcc = :gcc7 - elseif libgfortran_version == v"5.0.0" - gcc = :gcc8 - else - error("Unrecognied libgfortran version $libgfortran_version.") - end - return CompilerABI(gcc) -end - -using BinaryProvider # requires BinaryProvider 0.3.0 or later - -# Parse some basic command-line arguments -const verbose = "--verbose" in ARGS -const prefix = Prefix( - get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")), -) -products = [LibraryProduct(prefix, ["libopenblas"], :libopenblas)] - -# Download binaries from hosted location -bin_prefix = "https://github.com/JuliaBinaryWrappers/OpenBLAS32_jll.jl/releases/download/OpenBLAS32-v0.3.9+2" - -# Listing of files generated by BinaryBuilder: -download_info = Dict( - Linux( - :aarch64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-gnu-libgfortran3.tar.gz", - "70c72d420d3358c885f00ab57b48acbd1af76b3d575fd77071e36fbbaa00892e", - ), - Linux( - :aarch64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-gnu-libgfortran4.tar.gz", - "5046fbf88664004298b5033782365ec2481b012c08e501d81aa88f341b00d6d7", - ), - Linux( - :aarch64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-gnu-libgfortran5.tar.gz", - "ee396e4681f2582bb1af846399946bc877771e7703b51ded58d943eddac5efc6", - ), - Linux( - :aarch64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-musl-libgfortran3.tar.gz", - "b79b8c5b473885c7e4988d1a62b52e90d9f5034c8000b39e1b831a10ba753a5c", - ), - Linux( - :aarch64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-musl-libgfortran4.tar.gz", - "9931954d062b0dd603c6b4bb049672404726bdbd4969b22068400accbbd233a4", - ), - Linux( - :aarch64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.aarch64-linux-musl-libgfortran5.tar.gz", - "376f594def5d788f2d235b02f6f54fe7e9956e893ff3a0a42e12abb0ac1cff15", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-gnueabihf-libgfortran3.tar.gz", - "edd34511fe5876f47883eaec62bc2e7b220d9396c32c924e5496a6cbfb86a0ff", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-gnueabihf-libgfortran4.tar.gz", - "ad10a79218b8bc8ccdb442d640bc392d8c1d41a89d49de116819f022525d6cc5", - ), - Linux( - :armv7l, - libc = :glibc, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-gnueabihf-libgfortran5.tar.gz", - "04c5b704ae04c209d7c0f9506c29bf870760272096a7f106b4161a803fbbfcf6", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-musleabihf-libgfortran3.tar.gz", - "668f70e1b4b76feee0ee9d51f2b256dfd2d9a05f3c7936d6ed5e3bb16c6f91f6", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-musleabihf-libgfortran4.tar.gz", - "03b70ad1cb44c8530c66fbab8adfd6d1ca0b7c66f34a6b4cfe8c93c264c5f881", - ), - Linux( - :armv7l, - libc = :musl, - call_abi = :eabihf, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.armv7l-linux-musleabihf-libgfortran5.tar.gz", - "24d3be8016ca46467d8a207334609c761bc6b7d3a07634ca81ddd2be52625a1b", - ), - Linux( - :i686, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-gnu-libgfortran3.tar.gz", - "41ce6b10e963824d2cbbbbf31e02ba5edc4784d9ce8adf4edfd611042753b472", - ), - Linux( - :i686, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-gnu-libgfortran4.tar.gz", - "4ba05d858cde46d35120295e2b0f549d666327b25f15892520dda94af3ce29b9", - ), - Linux( - :i686, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-gnu-libgfortran5.tar.gz", - "1bd5dd9c01cb418d3c1b30b0d02826c7f193883e5a493b38728b81db52f318cb", - ), - Linux( - :i686, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-musl-libgfortran3.tar.gz", - "fa5ee765cea55afb5de007c4c9fe28db10c75f426a895f39f57363da3e248a71", - ), - Linux( - :i686, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-musl-libgfortran4.tar.gz", - "50db036850af08df7b241ab25f5e7f668fc0dbb7ac779b899693f386af21fac8", - ), - Linux( - :i686, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-linux-musl-libgfortran5.tar.gz", - "e38be09ffa8a48010e395a8cf57d0e2348d8147a4724054962baf2750fabe6c9", - ), - Windows( - :i686, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-w64-mingw32-libgfortran3.tar.gz", - "7673c3c0eed1e48d0bb3771d73a9b192e95af78b134b68cb40cd69e533849a53", - ), - Windows( - :i686, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-w64-mingw32-libgfortran4.tar.gz", - "eb21686bbc2e880c5c0fe59da595816b427a023422810c2866ed826626763fa7", - ), - Windows( - :i686, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.i686-w64-mingw32-libgfortran5.tar.gz", - "433ec40a8496efce9680bc6297efa510374f7e9038ef0eaacd314fd7133fa278", - ), - Linux( - :powerpc64le, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.powerpc64le-linux-gnu-libgfortran3.tar.gz", - "772480f50a235b311a2d8e767339cca46665d0ee4aa39abf24f3ec4d4c261f5c", - ), - Linux( - :powerpc64le, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.powerpc64le-linux-gnu-libgfortran4.tar.gz", - "ae3596cb668b02e7c82302c8e7b3e445260a32252b5d85fdc6bd7cddfc7783a0", - ), - Linux( - :powerpc64le, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.powerpc64le-linux-gnu-libgfortran5.tar.gz", - "c94e277724c5ef483775cceac9f16b778c8c4a9a823353dbd4bfaffd137d7a58", - ), - MacOS( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-apple-darwin14-libgfortran3.tar.gz", - "bb41f81ec7aae04a773c188fe9683bc6ad47af211e87f3ede1195ab83961f951", - ), - MacOS( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-apple-darwin14-libgfortran4.tar.gz", - "99d88d0a7dc55bafe071c61a231fe36279f89317fef196954dbea80c566be96d", - ), - MacOS( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-apple-darwin14-libgfortran5.tar.gz", - "56ee6d750897c91f29d701ead5b2f44a2a12a72d5c1eb9b09dc2c0eb3b65d1d1", - ), - Linux( - :x86_64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-gnu-libgfortran3.tar.gz", - "13861d28a1832ce0d5f1b8ecb84de2f19d7970ab9188d07da6da209ac4c4e5d0", - ), - Linux( - :x86_64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-gnu-libgfortran4.tar.gz", - "e2786ab3c111e3cb33f4e4eda50de5ea536aea99edcc952e7d6a87c82b802c36", - ), - Linux( - :x86_64, - libc = :glibc, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-gnu-libgfortran5.tar.gz", - "639b8f40d0c8f9177574b413b9e475eb9045abe2e82078c5a4dde4efbfe39a07", - ), - Linux( - :x86_64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-musl-libgfortran3.tar.gz", - "0bba4279e2e524a6504c16b7cc4266621ba09f62880b6847e291955c90ec5c6c", - ), - Linux( - :x86_64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-musl-libgfortran4.tar.gz", - "cfcc99aa3a9124e54225e01299e86e8b7599b0de75835db12d88e643cd1ef83a", - ), - Linux( - :x86_64, - libc = :musl, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-linux-musl-libgfortran5.tar.gz", - "a9dd680a5bcefad112d03993a35d6de434baafc055a71e2f4961d5f8177b983b", - ), - FreeBSD( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-unknown-freebsd11.1-libgfortran3.tar.gz", - "9c877be5d99c2fb5d479e72c5945d076994b720431e11bfc1426ff69c9147183", - ), - FreeBSD( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-unknown-freebsd11.1-libgfortran4.tar.gz", - "90bb169c6fc582243eabf6f2849d3fb53b0b7e17a3e39f4693c004a4f3249f4c", - ), - FreeBSD( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-unknown-freebsd11.1-libgfortran5.tar.gz", - "0e7c2f8125cda30d1e6cae556caea06a7db3b98479119b361826f5973316632f", - ), - Windows( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"3.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-w64-mingw32-libgfortran3.tar.gz", - "21949a80fde51fda975a423c893843c7b94557f9286bb73ba079792e33be3c8d", - ), - Windows( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"4.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-w64-mingw32-libgfortran4.tar.gz", - "417fe312177ed42a6a95cf4b5bfd39aa202199ca1e210d9a5bd25b622f511944", - ), - Windows( - :x86_64, - compiler_abi = _CompilerABI(libgfortran_version = v"5.0.0"), - ) => ( - "$bin_prefix/OpenBLAS32.v0.3.9.x86_64-w64-mingw32-libgfortran5.tar.gz", - "b945a95923389da1ec7efd76bbfa1337ac525a37581053dc6aed0cf113c5a1d7", - ), -) - -# Install unsatisfied or updated dependencies: -# We added `, isolate=true` as otherwise, it would segfault when closing `OpenBLAS32`, -# probably because it is conflicting with Julia openblas. -unsatisfied = - any(!satisfied(p; verbose = verbose, isolate = true) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) -if dl_info === nothing && unsatisfied - # If we don't have a compatible .tar.gz to download, complain. - # Alternatively, you could attempt to install from a separate provider, - # build from source or something even more ambitious here. - error( - "Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!", - ) -end - -# If we have a download, and we are unsatisfied (or the version we're -# trying to install is not itself installed) then load it up! -if unsatisfied || !isinstalled(dl_info...; prefix = prefix) - # Download and install binaries - install( - dl_info...; - prefix = prefix, - force = true, - verbose = verbose, - ignore_platform = true, - ) -end diff --git a/src/CSDP.jl b/src/CSDP.jl index b5a8884..f313106 100644 --- a/src/CSDP.jl +++ b/src/CSDP.jl @@ -3,14 +3,11 @@ module CSDP using LinearAlgebra # For Diagonal using SparseArrays # For SparseMatrixCSC -if VERSION < v"1.3" - if isfile(joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")) - include("../deps/deps.jl") - else - error("CSDP not properly installed. Please run Pkg.build(\"CSDP\")") - end -else - import CSDP_jll: libcsdp +import CSDP_jll + +function __init__() + global libcsdp = CSDP_jll.libcsdp + return end # This is the size of int used by the LAPACK library used by CSDP. From 8f35960a78336265bfab24b1eeef7f67ec3264d3 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 22 Feb 2022 16:48:38 +1300 Subject: [PATCH 2/8] Update README --- README.md | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 37e2e50..c9d2697 100644 --- a/README.md +++ b/README.md @@ -2,44 +2,42 @@ ![](https://www.coin-or.org/wordpress/wp-content/uploads/2014/08/COINOR.png) -`CSDP.jl` is an interface to the **[COIN-OR SemiDefinite -Programming](https://projects.coin-or.org/Csdp)** solver. It provides a complete -interface to the low-level C API, as well as an implementation of the -solver-independent `MathProgBase` and `MathOptInterface` API's. +[![Build Status](https://github.com/jump-dev/CSDP.jl/workflows/CI/badge.svg?branch=master)](https://github.com/jump-dev/CSDP.jl/actions?query=workflow%3ACI) +[![codecov](https://codecov.io/gh/jump-dev/CSDP.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/jump-dev/CSDP.jl) + +`CSDP.jl` is a wrapper for the [COIN-OR SemiDefinite Programming](https://projects.coin-or.org/Csdp) +solver. + +The wrapper has two components: + * a thin wrapper around the low-level C API + * an interface to [MathOptInterface](https://github.com/jump-dev/MathOptInterface.jl) *Note: This wrapper is maintained by the JuMP community and is not a COIN-OR project.* -| **Build Status** | -|:----------------:| -| [![Build Status][build-img]][build-url] | -| [![Codecov branch][codecov-img]][codecov-url] | - -The original algorithm is described by -B. Borchers. -*CSDP, A C Library for Semidefinite Programming*. +The original algorithm is described by B. Borchers. +_CSDP, A C Library for Semidefinite Programming_. Optimization Methods and Software 11(1):613-623, 1999. DOI [10.1080/10556789908805765](http://dx.doi.org/10.1080/10556789908805765). [Preprint](http://euler.nmt.edu/~brian/csdppaper.pdf). ## Installation -The package can be installed with `Pkg.add`. - -``` -julia> import Pkg; Pkg.add("CSDP") +Install CSDP using `Pkg.add`: +```julia +import Pkg; Pkg.add("CSDP") ``` -CSDP.jl will use [BinaryProvider.jl](https://github.com/JuliaPackaging/BinaryProvider.jl) to automatically install the CSDP binaries. This should work for both the [official Julia binaries](https://julialang.org/downloads) and source-builds. +In addition to installing the CSDP.jl package, this will also download and +install the CSDP binaries. (You do not need to install CSDP separately.) -### Using with **[JuMP]** -[JuMP]: https://github.com/jump-dev/JuMP.jl +## Use with JuMP We highly recommend that you use the *CSDP.jl* package with higher level packages such as [CSDP.jl](https://github.com/jump-dev/CSDP.jl). -This can be done using the ``CSDP.Optimizer`` object. Here is how to create a -*JuMP* model that uses CSDP as the solver. +To use CSDP with [JuMP](https://github.com/jump-dev/JuMP.jl), use +`CSDP.Optimizer`: ```julia using JuMP, CSDP @@ -114,7 +112,7 @@ If the `printlevel` option is at least `1`, the following will be printed: ## Options -The CSDP options are listed in the table below. Their value can be specified in the constructor of the CSDP solver, e.g. `CSDPSolver(axtol=1e-7, printlevel=0)`. +The CSDP options are listed in the table below. Name | | Default Value | ------------ | ----------------------------------- | -------------- | @@ -134,8 +132,3 @@ Name | `perturbobj` | The `perturbobj` parameter determines whether the objective function will be perturbed to help deal with problems that have unbounded optimal solution sets. If `perturbobj` is `0`, then the objective will not be perturbed. If `perturbobj` is `1`, then the objective function will be perturbed by a default amount. Larger values of `perturbobj` (e.g. `100`) increase the size of the perturbation. This can be helpful in solving some difficult problems. | `1` | `fastmode` | The `fastmode` parameter determines whether or not CSDP will skip certain time consuming operations that slightly improve the accuracy of the solutions. If `fastmode` is set to `1`, then CSDP may be somewhat faster, but also somewhat less accurate | `0` | `printlevel` | The `printlevel` parameter determines how much debugging information is output. Use a `printlevel` of `0` for no output and a `printlevel` of `1` for normal output. Higher values of printlevel will generate more debugging output | `1` | - -[build-img]: https://github.com/jump-dev/CSDP.jl/workflows/CI/badge.svg?branch=master -[build-url]: https://github.com/jump-dev/CSDP.jl/actions?query=workflow%3ACI -[codecov-img]: http://codecov.io/github/jump-dev/CSDP.jl/coverage.svg?branch=master -[codecov-url]: http://codecov.io/github/jump-dev/CSDP.jl?branch=master From 4fd45c303e0343773678abcfd66312a3578f36a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 11:30:33 -0500 Subject: [PATCH 3/8] Move to MOI.Test --- test/MOI_wrapper.jl | 164 +++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 71 deletions(-) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index 8e492f5..76267c8 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -1,90 +1,112 @@ -using Test +module TestCSDP +using Test using MathOptInterface -const MOI = MathOptInterface -const MOIT = MOI.DeprecatedTest -const MOIU = MOI.Utilities -const MOIB = MOI.Bridges - import CSDP -const optimizer_constructor = - MOI.OptimizerWithAttributes(CSDP.Optimizer, MOI.Silent() => true) -const optimizer = MOI.instantiate(optimizer_constructor) -@testset "SolverName" begin - @test MOI.get(optimizer, MOI.SolverName()) == "CSDP" +const MOI = MathOptInterface + +function runtests() + for name in names(@__MODULE__; all = true) + if startswith("$(name)", "test_") + @testset "$(name)" begin + getfield(@__MODULE__, name)() + end + end + end + return end -const bridged = - MOI.instantiate(optimizer_constructor, with_bridge_type = Float64) -const config = MOIT.Config(atol = 1e-4, rtol = 1e-4) +function test_solver_name() + @test MOI.get(CSDP.Optimizer(), MOI.SolverName()) == "CSDP" +end -@testset "Options" begin +function test_options() param = MOI.RawOptimizerAttribute("bad_option") err = MOI.UnsupportedAttribute(param) @test_throws err MOI.set( - optimizer, + CSDP.Optimizer(), MOI.RawOptimizerAttribute("bad_option"), 0, ) end -@testset "Unit" begin - MOIT.unittest( - bridged, - config, - [ - # `NUMERICAL_ERROR` on Mac: https://travis-ci.org/JuliaOpt/CSDP.jl/jobs/601302777#L217-L219 - "solve_unbounded_model", - # `NumberOfThreads` not supported. - "number_threads", - # `TimeLimitSec` not supported. - "time_limit_sec", - # Quadratic functions are not supported - "solve_qcp_edge_cases", - "solve_qp_edge_cases", - # Integer and ZeroOne sets are not supported - "solve_integer_edge_cases", - "solve_objbound_edge_cases", - "solve_start_soc", # RSOCtoPSDBridge seems to be incorrect for dimension-2 RSOC cone. - "solve_zero_one_with_bounds_1", - "solve_zero_one_with_bounds_2", - "solve_zero_one_with_bounds_3", - ], +function test_runtests() + model = MOI.Utilities.CachingOptimizer( + MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()), + MOI.instantiate(CSDP.Optimizer, with_bridge_type=Float64), ) -end -@testset "Continuous Linear" begin - # See explanation in `MOI/test/Bridges/lazy_bridge_optimizer.jl`. - # This is to avoid `Variable.VectorizeBridge` which does not support - # `ConstraintSet` modification. - MOIB.remove_bridge(bridged, MOIB.Constraint.ScalarSlackBridge{Float64}) - MOIT.contlineartest(bridged, config, [ - # Finds `MOI.ALMOST_OPTIMAL` instead of `MOI.OPTIMAL` - "linear10b", - # Empty constraint - "linear15", - ]) -end -@testset "Continuous Conic" begin - MOIT.contconictest( - bridged, - config, - [ - # Finds `MOI.OPTIMAL` instead of `MOI.INFEASIBLE`. - "soc3", - # Empty constraint `c4` - "psdt2", - # See https://github.com/coin-or/Csdp/issues/11 - "rotatedsoc1v", - # Missing bridges - "rootdets", - # Does not support power and exponential cone - "pow", - "dualpow", - "logdet", - "exp", - "dualexp", - "relentr", + # `Variable.ZerosBridge` makes dual needed by some tests fail. + MOI.Bridges.remove_bridge(model.optimizer, MathOptInterface.Bridges.Variable.ZerosBridge{Float64}) + MOI.set(model, MOI.Silent(), true) + MOI.Test.runtests( + model, + MOI.Test.Config( + rtol = 1e-3, + atol = 1e-3, + exclude = Any[ + MOI.ConstraintBasisStatus, + MOI.VariableBasisStatus, + MOI.ObjectiveBound, + MOI.SolverVersion, + ], + ), + exclude = String[ + # Empty constraint not supported + "test_linear_VectorAffineFunction_empty_row", + "test_conic_PositiveSemidefiniteConeTriangle", + # SLOW_PROGRESS + "test_quadratic_constraint_basic", + "test_quadratic_constraint_minimize", + # FIXME need to investigate + # Expression: MOI.get(model, MOI.TerminationStatus()) == config.infeasible_status + # Evaluated: MathOptInterface.OPTIMAL == MathOptInterface.INFEASIBLE + "test_conic_SecondOrderCone_INFEASIBLE", + # FIXME need to investigate + "test_objective_qp_ObjectiveFunction_edge_cases", + # FIXME need to investigate + # Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), objective_value, config) + # Evaluated: isapprox(-0.9999999999999991, 1.0, ... + # Expression: isapprox(MOI.get(model, MOI.VariablePrimal(), index), solution_value, config) + # Evaluated: isapprox(-0.9999999999999991, 1.0, ... + #BoundsError: attempt to access 1-element Vector{Float64} at index [3] + "test_constraint_PrimalStart_DualStart_SecondOrderCone", + # FIXME investigate + # Internal library error: status=-1 + "test_model_default_DualStatus", + "test_model_default_PrimalStatus", + # FIXME investigate + # Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), T(2), config) + # Evaluated: isapprox(6.0, 2.0, ... + "test_modification_delete_variables_in_a_batch", + # FIXME investigate + # Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), objective_value, config) + # Evaluated: isapprox(4.162643563176971e-9, 5.0 + "test_objective_qp_ObjectiveFunction_zero_ofdiag", + # FIXME investigate + # Expression: isapprox(MOI.get(model, MOI.ConstraintPrimal(), index), solution_value, config) + # Evaluated: isapprox(9.973062820023415e-9, 1.0, ... + "test_variable_solve_with_lowerbound", + # TODO CSDP just returns an infinite ObjectiveValue + "test_unbounded_MIN_SENSE", + "test_unbounded_MIN_SENSE_offset", + "test_unbounded_MAX_SENSE", + "test_unbounded_MAX_SENSE_offset", + # TODO SDPT3 just returns an infinite DualObjectiveValue + "test_infeasible_MAX_SENSE", + "test_infeasible_MAX_SENSE_offset", + "test_infeasible_MIN_SENSE", + "test_infeasible_MIN_SENSE_offset", + "test_infeasible_affine_MAX_SENSE", + "test_infeasible_affine_MAX_SENSE_offset", + "test_infeasible_affine_MIN_SENSE", + "test_infeasible_affine_MIN_SENSE_offset", + # See https://github.com/jump-dev/MathOptInterface.jl/issues/1758 + "test_model_copy_to_UnsupportedAttribute", ], ) end + +end # module + +TestCSDP.runtests() From d91e55ee2432733a63f59fcf87863aa0153d8dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 12:08:34 -0500 Subject: [PATCH 4/8] Report issue upstream --- test/MOI_wrapper.jl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index 76267c8..b145d42 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -64,12 +64,7 @@ function test_runtests() "test_conic_SecondOrderCone_INFEASIBLE", # FIXME need to investigate "test_objective_qp_ObjectiveFunction_edge_cases", - # FIXME need to investigate - # Expression: isapprox(MOI.get(model, MOI.ObjectiveValue()), objective_value, config) - # Evaluated: isapprox(-0.9999999999999991, 1.0, ... - # Expression: isapprox(MOI.get(model, MOI.VariablePrimal(), index), solution_value, config) - # Evaluated: isapprox(-0.9999999999999991, 1.0, ... - #BoundsError: attempt to access 1-element Vector{Float64} at index [3] + # See https://github.com/jump-dev/MathOptInterface.jl/issues/1761 "test_constraint_PrimalStart_DualStart_SecondOrderCone", # FIXME investigate # Internal library error: status=-1 From a90a9391c8179efa81f901afc0824572b41ea11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 12:27:05 -0500 Subject: [PATCH 5/8] Exlude failing tests on GH Actions --- test/MOI_wrapper.jl | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index b145d42..516e2d2 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -34,10 +34,13 @@ end function test_runtests() model = MOI.Utilities.CachingOptimizer( MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()), - MOI.instantiate(CSDP.Optimizer, with_bridge_type=Float64), + MOI.instantiate(CSDP.Optimizer, with_bridge_type = Float64), ) # `Variable.ZerosBridge` makes dual needed by some tests fail. - MOI.Bridges.remove_bridge(model.optimizer, MathOptInterface.Bridges.Variable.ZerosBridge{Float64}) + MOI.Bridges.remove_bridge( + model.optimizer, + MathOptInterface.Bridges.Variable.ZerosBridge{Float64}, + ) MOI.set(model, MOI.Silent(), true) MOI.Test.runtests( model, @@ -98,8 +101,24 @@ function test_runtests() "test_infeasible_affine_MIN_SENSE_offset", # See https://github.com/jump-dev/MathOptInterface.jl/issues/1758 "test_model_copy_to_UnsupportedAttribute", + # The rest occurs only on Github Actions for some OSes but not all: + # Incorrect solution + "test_objective_ObjectiveFunction_VariableIndex", + "test_conic_SecondOrderCone_negative_post_bound", + # ALMOST_OPTIMAL + "test_conic_RotatedSecondOrderCone_VectorOfVariables", + # NUMERICAL_ERROR + "test_objective_ObjectiveFunction_blank", + "test_objective_ObjectiveFunction_duplicate_terms", + "test_modification_transform_singlevariable_lessthan", + "test_conic_SecondOrderCone_no_initial_bound", + # Expression: MOI.get(model, MOI.TerminationStatus()) == MOI.DUAL_INFEASIBLE + # Evaluated: MathOptInterface.INFEASIBLE == MathOptInterface.DUAL_INFEASIBLE + "test_conic_SecondOrderCone_negative_post_bound_2", + "test_conic_SecondOrderCone_negative_post_bound_3", ], ) + return end end # module From ca84b2e45ccf0de762d7e8447e478f2776e9c0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 13:11:34 -0500 Subject: [PATCH 6/8] Exclude failing tests on CI --- test/MOI_wrapper.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index 516e2d2..e004f90 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -105,6 +105,7 @@ function test_runtests() # Incorrect solution "test_objective_ObjectiveFunction_VariableIndex", "test_conic_SecondOrderCone_negative_post_bound", + "test_solve_result_index", # ALMOST_OPTIMAL "test_conic_RotatedSecondOrderCone_VectorOfVariables", # NUMERICAL_ERROR @@ -112,10 +113,18 @@ function test_runtests() "test_objective_ObjectiveFunction_duplicate_terms", "test_modification_transform_singlevariable_lessthan", "test_conic_SecondOrderCone_no_initial_bound", + "test_conic_SecondOrderCone_negative_initial_bound", + "test_solve_TerminationStatus_DUAL_INFEASIBLE", + "test_modification_set_singlevariable_lessthan:", + "test_modification_delete_variable_with_single_variable_obj", # Expression: MOI.get(model, MOI.TerminationStatus()) == MOI.DUAL_INFEASIBLE # Evaluated: MathOptInterface.INFEASIBLE == MathOptInterface.DUAL_INFEASIBLE "test_conic_SecondOrderCone_negative_post_bound_2", "test_conic_SecondOrderCone_negative_post_bound_3", + # Expression: MOI.get(model, MOI.TerminationStatus()) == config.optimal_status + # Evaluated: MathOptInterface.INFEASIBLE == MathOptInterface.OPTIMAL + "test_modification_const_scalar_objective", + "test_modification_coef_scalar_objective", ], ) return From f47cfb4981b3a73de005c6142285c4b6a7145498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 13:24:18 -0500 Subject: [PATCH 7/8] Exclude more tests --- test/MOI_wrapper.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index e004f90..65f177f 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -101,11 +101,14 @@ function test_runtests() "test_infeasible_affine_MIN_SENSE_offset", # See https://github.com/jump-dev/MathOptInterface.jl/issues/1758 "test_model_copy_to_UnsupportedAttribute", - # The rest occurs only on Github Actions for some OSes but not all: + # FIXME The following are weird test failures that occur only on Github Actions for Mac OS but not Linux. + # It also seems to not be consistent between runs: # Incorrect solution "test_objective_ObjectiveFunction_VariableIndex", "test_conic_SecondOrderCone_negative_post_bound", "test_solve_result_index", + "test_modification_set_singlevariable_lessthan", + "test_conic_SecondOrderCone_nonnegative_initial_bound", # ALMOST_OPTIMAL "test_conic_RotatedSecondOrderCone_VectorOfVariables", # NUMERICAL_ERROR @@ -125,6 +128,7 @@ function test_runtests() # Evaluated: MathOptInterface.INFEASIBLE == MathOptInterface.OPTIMAL "test_modification_const_scalar_objective", "test_modification_coef_scalar_objective", + "test_modification_set_singlevariable_lessthan", ], ) return From 27f771bb6c2e8bec0338ae99a8f6c7da1737749d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 27 Feb 2022 15:32:41 -0500 Subject: [PATCH 8/8] Exclude failing test --- test/MOI_wrapper.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/MOI_wrapper.jl b/test/MOI_wrapper.jl index 65f177f..fa9f4f9 100644 --- a/test/MOI_wrapper.jl +++ b/test/MOI_wrapper.jl @@ -109,6 +109,7 @@ function test_runtests() "test_solve_result_index", "test_modification_set_singlevariable_lessthan", "test_conic_SecondOrderCone_nonnegative_initial_bound", + "test_objective_FEASIBILITY_SENSE_clears_objective", # ALMOST_OPTIMAL "test_conic_RotatedSecondOrderCone_VectorOfVariables", # NUMERICAL_ERROR