Skip to content

Loading…

Add new formula for DSDP #11139

Closed
wants to merge 1 commit into from

4 participants

@CRP

The DSDP software is a free open source implementation of an interior-point method for semidefinite programming

@CRP CRP Add formula for DSDP
The DSDP software is a free open source implementation of an interior-point method for semidefinite programming
61bcaa6
@adamv

What is the source of the patch? Can it be reported upstream?

@CRP

I did report the necessary changes to the original authors. If they modify their source I will update the formula removing the patches.
BTW, just noticed that on macports they apply very similar patches...

@CRP

Got a reply from original authors. They acknowledge the need for the patches but do not IMO seem interested to update their sources anytime soon...

@CRP
CRP commented

Hi, just wondering, is there anything else I should do to get the formula accepted?

@dpo

This is one that could be tagged for homebrew-science

@adamv

A link to an upstream bug report would be appreciated.

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?

@adamv

Remove commented-out files.

@adamv

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

@jacknagel

Suggest this be reopened on Homebrew-science: https://github.com/Homebrew/homebrew-science

@jacknagel jacknagel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. @CRP

    Add formula for DSDP

    CRP committed
    The DSDP software is a free open source implementation of an interior-point method for semidefinite programming
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
+ DATA
+ end
+
+ def install
+ ENV['DSDPROOT'] = Dir.pwd
+ system "make dsdpapi"
+# bin contains just test files
+# bin.install Dir['bin/*']
+ lib.install Dir['lib/*']
+ 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"
+
Something went wrong with that request. Please try again.