Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.

6 changed files with 47 additions and 211 deletions

View file

@ -1,20 +0,0 @@
--- src/solver/dsdpvec.h.orig 2005-10-21 13:31:14.000000000 -0600
+++ src/solver/dsdpvec.h 2019-12-09 11:50:57.152412502 -0700
@@ -27,14 +27,14 @@ typedef struct DSDPVec_C DSDPVec;
#define DSDPVecGetArray(a,b) 0;{ *(b)=((a).val); }
#define DSDPVecRestoreArray(a,b) 0;{ *(b)=0; }
#define DSDPVecGetSize(a,b) 0;{ *(b)=((a).dim); }
-#define DSDPVecAddElement(a,b,c) 0;{ if (c){((a).val[b])+=(c);} }
+#define DSDPVecAddElement(a,b,c) 0;{ if ((c)!=0){((a).val[b])+=(c);} }
#define DSDPVecSetElement(a,b,c) 0;{ {((a).val[b])=(c); } }
#define DSDPVecGetElement(a,b,c) 0;{ *(c)=((a).val[b]); }
#define DSDPVecSetR(a,b) 0;{ {((a).val[(a).dim-1])=(b); } }
-#define DSDPVecAddR(a,b) 0;{ if(b){((a).val[(a).dim-1])+=(b); } }
+#define DSDPVecAddR(a,b) 0;{ if((b)!=0){((a).val[(a).dim-1])+=(b); } }
#define DSDPVecGetR(a,b) 0;{ *(b)=((a).val[(a).dim-1]); }
#define DSDPVecSetC(a,b) 0;{ {((a).val[0])=(b); } }
-#define DSDPVecAddC(a,b) 0;{ if(b){((a).val[0])+=(b); } }
+#define DSDPVecAddC(a,b) 0;{ if((b)!=0){((a).val[0])+=(b); } }
#define DSDPVecGetC(a,b) 0;{ *(b)=((a).val[0]); }
#define DSDPVecCreateWArray(a,b,c) 0;{ (*(a)).val=(b); (*(a)).dim=(c);}
/*

View file

@ -1,27 +1,11 @@
--- examples/readsdpa.c.orig 2005-10-21 13:31:14.000000000 -0600
+++ examples/readsdpa.c 2019-12-09 11:47:34.346905327 -0700
@@ -87,7 +87,7 @@ int ReadSDPAFile(int argc,char *argv[]){
double ddobj,ppobj,scl,dpot;
char problemname[100],thisline[100], filename[300],savefile[100];
char directory[100]="/home/benson/sdpexamples/sdplib/";
- char outputfile[50]="",suffix[20]=".dat-s", tablename[20]="results-dsdp-5.8";
+ char outputfile[50]="",suffix[20]=".dat-s", tablename[90]="results-dsdp-5.8";
char success='s',sformat;
FILE *fp1=0,*fp2=0,*fout;
DSDPData dddd;
@@ -106,12 +106,12 @@ int ReadSDPAFile(int argc,char *argv[]){
if (strncmp(argv[i],"-benchmark",8)==0){
+++ examples/readsdpa.c 2011-05-21 13:26:38.967119006 -0600
@@ -107,7 +107,7 @@ int ReadSDPAFile(int argc,char *argv[]){
strncpy(thisline,argv[i+1],90); fp1=fopen(thisline,"r");runbenchmark=1; justone=0;
};
- if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],90);}
+ if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],100);}
if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],90);};
if (strncmp(argv[i],"-directory",8)==0){strncpy(directory,argv[i+1],90);}
- if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],90);};
+ if (strncmp(argv[i],"-table",4)==0){strncpy(tablename,argv[i+1],20);};
if (strncmp(argv[i],"-suffix",4)==0){strncpy(suffix,argv[i+1],20);};
- if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],40);saveit=1;};
+ if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],100);saveit=1;};
if (strncmp(argv[i],"-save",5)==0){ strncpy(savefile,argv[i+1],40);saveit=1;};
if (strncmp(argv[i],"-dlogsummary",8)==0){printsummary=atoi(argv[i+1]);}
- if (rank==0&&strncmp(argv[i],"-fout",5)==0){ strncpy(outputfile,argv[i+1],45);fileout=1;};
+ if (rank==0&&strncmp(argv[i],"-fout",5)==0){ strncpy(outputfile,argv[i+1],50);fileout=1;};
}
if (runbenchmark || argc>2){

View file

@ -1,39 +0,0 @@
Description: Use correct integer type for Fortran prototypes and variables
GNU Fortran's default integer width is 32-bit, the same as GCC, therefore use
int rather than long int when interfacing with Fortran. This was an issue on
64-bit big-endian systems, since the upper 32 bits of the long would be set,
which would also be lost when truncating to a 32-bit integer.
Author: James Clarke <jrtc27@debian.org>
Bug-Debian: https://bugs.debian.org/857067
Last-Update: 2017-03-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- include/dsdplapack.h.orig
+++ include/dsdplapack.h
@@ -4,11 +4,11 @@
\file dsdplapack.h
\brief DSDP uses BLAS and LAPACK for many of its operations.
*/
-
-typedef long int ffinteger;
/*
-typedef int ffinteger;
+typedef long int ffinteger;
*/
+typedef int ffinteger;
+
/*
#define __DSDP_NONAMEMANGLING
#undef __DSDP_NONAMEMANGLING
--- src/vecmat/dtrsm2.c.orig
+++ src/vecmat/dtrsm2.c
@@ -1,7 +1,7 @@
#include "dsdplapack.h"
-typedef long int integer;
-typedef long int logical;
+typedef int integer;
+typedef int logical;
#define max(a,b) ((a) >= (b) ? (a) : (b))
#define dmax(a,b) (double)max(a,b)

View file

@ -11,11 +11,11 @@
# Forget it! I'm writing my own Makefile.
CC = gcc
INCLUDES = -I/usr/include/flexiblas -Iinclude -Isrc/solver -Isrc/sdp -Isrc/vecmat
INCLUDES = -I/usr/include/openblas -Iinclude -Isrc/solver -Isrc/sdp -Isrc/vecmat
CFLAGS = @RPM_OPT_FLAGS@ -fPIC -DDSDP_TIME $(INCLUDES)
BFLAGS = @RPM_OPT_FLAGS@ -DDSDP_TIME -Iinclude -Lsrc
LDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -lflexiblas -lm
BDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -ldsdp -lflexiblas -lm
LDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -lopenblas -lm
BDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -ldsdp -lopenblas -lm
SONAME = -Wl,-h,libdsdp.so.5
SOLVER_OBJS = src/solver/dualalg.o src/solver/dualimpl.o \

149
DSDP.spec
View file

@ -1,67 +1,52 @@
Name: DSDP
Version: 5.8
Release: 40%{?dist}
Release: 21%{?dist}
Summary: Software for semidefinite programming
# The content is DSDP. The remaining licenses cover the various fonts embedded
# in PDFs.
# AMS: OFL-1.1-RFN
# CM: Knuth-CTAN
License: DSDP AND OFL-1.1-RFN AND Knuth-CTAN
URL: https://www.mcs.anl.gov/hs/software/DSDP/
Source0: https://www.mcs.anl.gov/hs/software/DSDP/%{name}%{version}.tar.gz
License: DSDP
URL: http://www.mcs.anl.gov/software/applied-mathematics-software
# Upstream no longer offers a download or supports this software.
Source0: DSDP%{version}.tar.gz
# Man pages written by Jerry James using text from the sources.
# Therefore, the man pages have the same copyright and license as the source.
Source1: DSDP-man.tar.xz
# A substitute makefile to fix the brokenness of the distributed Makefiles
Source2: DSDP.Makefile
# Fix a buffer overflow in one of the examples.
Patch: %{name}-overflow.patch
# Fix -Wint-in-bool-context warnings.
Patch: %{name}-int-in-bool-context.patch
# Fix big endian problems (patch courtesy of Debian)
Patch: %{name}-type-mismatch.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
# This patch fixes a buffer overflow in one of the examples. There is no
# longer an upstream to which it can be sent.
Patch0: DSDP-overflow.patch
BuildRequires: doxygen-latex
BuildRequires: gcc
BuildRequires: ghostscript
BuildRequires: make
BuildRequires: pkgconfig(flexiblas)
BuildRequires: openblas-devel
%description
DSDP is a free open source implementation of an interior-point method for
semidefinite programming. It provides primal and dual solutions, exploits
low-rank structure and sparsity in the data, and has relatively low memory
requirements for an interior-point method. It allows feasible and infeasible
starting points and provides approximate certificates of infeasibility when no
feasible solution exists. The dual-scaling algorithm implemented in this
package has a convergence proof and worst-case polynomial complexity under
mild assumptions on the data. The software can be used as a set of
subroutines, through Matlab, or by reading and writing to data files.
Furthermore, the solver offers scalable parallel performance for large
problems and a well documented interface. Some of the most popular
applications of semidefinite programming and linear matrix inequalities (LMI)
are model control, truss topology design, and semidefinite relaxations of
combinatorial and global optimization problems.
DSDP is a free open source implementation of an interior-point method
for semidefinite programming. It provides primal and dual solutions,
exploits low-rank structure and sparsity in the data, and has relatively
low memory requirements for an interior-point method. It allows
feasible and infeasible starting points and provides approximate
certificates of infeasibility when no feasible solution exists. The
dual-scaling algorithm implemented in this package has a convergence
proof and worst-case polynomial complexity under mild assumptions on the
data. The software can be used as a set of subroutines, through Matlab,
or by reading and writing to data files. Furthermore, the solver offers
scalable parallel performance for large problems and a well documented
interface. Some of the most popular applications of semidefinite
programming and linear matrix inequalities (LMI) are model control,
truss topology design, and semidefinite relaxations of combinatorial and
global optimization problems.
%package devel
# The content is DSDP. The remaining licenses cover the various fonts embedded
# in PDFs.
# AMS: OFL-1.1-RFN
# CM: Knuth-CTAN
License: DSDP AND OFL-1.1-RFN AND Knuth-CTAN
Summary: Headers and libraries for developing with DSDP
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: bundled(js-jquery)
Provides: bundled(jquery)
%description devel
Headers and libraries for developing with DSDP.
%package examples
License: DSDP
Summary: Example programs that use DSDP
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -69,17 +54,18 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Examples programs that use the DSDP library.
%prep
%autosetup -p0 -n %{name}%{version} -a 1
%setup -q -n %{name}%{version}
%setup -q -n %{name}%{version} -T -D -a 1
%patch0
%conf
sed -e 's|@RPM_OPT_FLAGS@|%{build_cflags}|' \
-e 's|@RPM_LD_FLAGS@|%{build_ldflags}|' \
-e 's|@libdir@|%{_libdir}|' \
-e 's|@version@|%{version}|' \
sed -e "s|@RPM_OPT_FLAGS@|${RPM_OPT_FLAGS}|" \
-e "s|@RPM_LD_FLAGS@|${RPM_LD_FLAGS}|" \
-e "s|@libdir@|%{_libdir}|" \
-e "s|@version@|%{version}|" \
%{SOURCE2} > Makefile
%build
%make_build
make %{?_smp_mflags}
cd docs
unzip DSDP5-api-html.zip
cd dox
@ -111,10 +97,12 @@ for f in *.1; do
sed "s/@VERSION@/%{version}/" $f > $RPM_BUILD_ROOT%{_mandir}/man1/$f
done
%ldconfig_scriptlets
%files
%doc docs/DSDP5-Exe-UserGuide.pdf docs/DSDP5-P1289-0905.pdf
%license dsdp-license
%{_libdir}/libdsdp.so.5{,.*}
%{_libdir}/libdsdp.so.*
%files devel
%doc docs/DSDP5-API-UserGuide.pdf docs/dox
@ -123,71 +111,10 @@ done
%files examples
%doc examples/Contents
%{_bindir}/dsdp*
%{_mandir}/man1/dsdp*
%{_bindir}/*
%{_mandir}/man1/*
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Nov 23 2022 Jerry James <loganjerry@gmail.com> - 5.8-31
- Add SPDX License identifiers for PDF documentation
- Minor spec file cleanups
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 3 2021 Jerry James <loganjerry@gmail.com> - 5.8-28
- Change ghostscript-core BR to ghostscript
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Aug 07 2020 Iñaki Úcar <iucar@fedoraproject.org> - 5.8-26
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 27 2020 Jerry James <loganjerry@gmail.com> - 5.8-23
- Add -type-mismatch patch from Debian to fix big endian issues
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.8-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View file

@ -1,16 +0,0 @@
# DSDP
[DSDP](https://www.mcs.anl.gov/hs/software/DSDP/) is a free open source
implementation of an interior-point method for semidefinite programming. It
provides primal and dual solutions, exploits low-rank structure and sparsity
in the data, and has relatively low memory requirements for an interior-point
method. It allows feasible and infeasible starting points and provides
approximate certificates of infeasibility when no feasible solution exists.
The dual-scaling algorithm implemented in this package has a convergence proof
and worst-case polynomial complexity under mild assumptions on the data. The
software can be used as a set of subroutines, through Matlab, or by reading
and writing to data files. Furthermore, the solver offers scalable parallel
performance for large problems and a well documented interface. Some of the
most popular applications of semidefinite programming and linear matrix
inequalities (LMI) are model control, truss topology design, and semidefinite
relaxations of combinatorial and global optimization problems.