Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add formula for DSDP

The DSDP software is a free open source implementation of an interior-point method for semidefinite programming
  • Loading branch information...
commit 61bcaa6e02c987c9deae06298c8577572d399652 1 parent 6a6e76e
@CRP authored
Showing with 59 additions and 0 deletions.
  1. +59 −0 Library/Formula/dsdp.rb
View
59 Library/Formula/dsdp.rb
@@ -0,0 +1,59 @@
+require 'formula'
+
+class Dsdp < Formula
+ homepage 'http://www.mcs.anl.gov/hs/software/DSDP/'
+ url 'http://www.mcs.anl.gov/hs/software/DSDP/DSDP5.8.tar.gz'
+ md5 '37c15a3c6c3f13e31262f65ac4364b5e'
+
+ def patches
+ # remove -lg2c and #include malloc.h, not needed nowadays
@adamv
adamv added a note

A link to an upstream bug report would be appreciated.

@CRP Owner
CRP added a note

There is no "issues" page for this project, so I just had an email exchange with the authors. Here is an excerpt:

--- begin author reply ---
Hi, Christian,

  1. Yes, "-lg2c" is not needed for a newer version of compiler. But it's still required for old version of compilers.

  2. "#include malloc.h" should be removed for Apple users. Maybe it's better to change it into something like
    #if !defined(APPLE)
    #include
    #endif

Thank you for pointing it out.
--- end author reply ---

They do not seem interested in updating the project, and I do not feel like pushing any further.

What do you think I should do beyond this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ DATA
+ end
+
+ def install
+ ENV['DSDPROOT'] = Dir.pwd
+ system "make dsdpapi"
+# bin contains just test files
@adamv
adamv added a note

Remove commented-out files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+# bin.install Dir['bin/*']
+ lib.install Dir['lib/*']
@adamv
adamv added a note

Can be prefix.install 'lib', 'include'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ include.install Dir['include/*']
+ end
+
+end
+
+__END__
+diff --git a/make.include b/make.include
+index d1b85f0..98d518a 100644
+--- a/make.include
++++ b/make.include
+@@ -32,7 +32,7 @@ DSDPTIMER = DSDP_TIME
+ #DSDPTIMER = DSDP_MS_TIME
+
+ # STEP 3c: Add other compiler flags.
+-DSDPCFLAGS =
++DSDPCFLAGS = -DDSDP_TIME -I/usr/include/sys
+ #DSDPCFLAGS = -Wall
+ #DSDPCFLAGS = -DDSDPMATLAB
+ # Other flags concern BLAS and LAPACK libraries -- see next step.
+@@ -55,7 +55,7 @@ CLINKER = ${CC} ${OPTFLAGS}
+ # Not needed to compile library or matlab executable
+ # Needed to link DSDP library to the driver ( read SDPA files, maxcut example, ...)
+ # Also include the math library and other libraries needed to link the BLAS to the C files that call them.
+-LAPACKBLAS = -llapack -lblas -lg2c -lm
++LAPACKBLAS = -llapack -lblas -lm
+ #LAPACKBLAS = -L/usr/lib/ -llapack -lblas -lg2c -lm
+ #LAPACKBLAS = -L/home/benson/ATLAS/Linux_P4SSE2/lib -llapack -lcblas -lf77blas -latlas -lg2c -lm
+ #LAPACKBLAS = -L/sandbox/benson/ATLAS-3.6/lib/Linux_P4SSE2 -llapack -lcblas -lf77blas -latlas -lg2c -lm
+diff --git a/src/sys/dsdploginfo.c b/src/sys/dsdploginfo.c
+index 9313549..cee4f93 100644
+--- a/src/sys/dsdploginfo.c
++++ b/src/sys/dsdploginfo.c
+@@ -6,7 +6,7 @@
+ #include <stdarg.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
+-#include <malloc.h>
++//#include <malloc.h>
+ #include "dsdpsys.h"
+ #include "dsdpbasictypes.h"
+
Please sign in to comment.
Something went wrong with that request. Please try again.