[sdpb] 183/233: Small fix to parsing; added test.xml; small fixes to Makefile

Tobias Hansen thansen at moszumanska.debian.org
Thu Mar 9 04:06:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sdpb.

commit 495045b894ad20449086b3bd70acab1c74c1b2e0
Author: David Simmons-Duffin <dsd at athena.sns.ias.edu>
Date:   Wed Oct 21 11:51:06 2015 -0400

    Small fix to parsing; added test.xml; small fixes to Makefile
---
 .gitignore    |  1 +
 Makefile      | 10 +++++-----
 src/parse.cpp |  6 ------
 test.xml      | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6556ed0..7008f79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ obj
 */examples
 sdpb
 tests
+test.out
 
 .DS_Store
 docs/*.aux
diff --git a/Makefile b/Makefile
index 4ca5408..e92cb1d 100755
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,10 @@ else
 # these variables to point to the appropriate places.
 
 # directory containing the header files 'gmp.h' and 'gmpxx.h'
-GMPINCLUDEDIR   = /home/dsd/include
+GMPINCLUDEDIR   = $(HOME)/include
 
 # directory containing boost header files, e.g. 'bind.hpp', etc.
-BOOSTINCLUDEDIR = /home/dsd/include/boost
+BOOSTINCLUDEDIR = $(HOME)/include/boost
 
 # directory containing library files, e.g.
 #   libboost_filesystem.a,
@@ -26,7 +26,7 @@ BOOSTINCLUDEDIR = /home/dsd/include/boost
 # as well as analogous files for 'boost_system',
 # 'boost_serialization', 'boost_timer', 'boost_program_options',
 # 'gmp', and 'gmpxx',
-LIBDIR          = /home/dsd/lib
+LIBDIR          = $(HOME)/lib
 
 endif
 
@@ -58,8 +58,8 @@ obj:
 	@mkdir -p $@/mpack
 	@mkdir -p $@/tinyxml2
 
-foo:
-	echo $(OBJECTS)
+test:
+	./sdpb -s test.xml --noFinalCheckpoint
 
 $(OBJECTS): $(HEADERS) | obj
 
diff --git a/src/parse.cpp b/src/parse.cpp
index 4ec3343..84da7b5 100644
--- a/src/parse.cpp
+++ b/src/parse.cpp
@@ -92,12 +92,6 @@ SDP parseBootstrapSDP(XMLElement *xml) {
 
 SDP readBootstrapSDP(const path sdpFile) {
   XMLDocument doc;
-  
-#ifndef BOOST_WINDOWS_API
-  doc.LoadFile(sdpFile.c_str());
-#else
   doc.LoadFile(sdpFile.string().c_str());
-#endif  
-
   return parseBootstrapSDP(doc.FirstChildElement("sdp"));
 }
diff --git a/test.xml b/test.xml
new file mode 100644
index 0000000..e0ee36b
--- /dev/null
+++ b/test.xml
@@ -0,0 +1,49 @@
+<!-- This file was generated using the function testSDP in
+  -- mathematica/Tests.m. To solve it, run
+  -- './sdpb -s test.xml --noFinalCheckpoint' or
+  -- 'make test'
+  -->
+<sdp><objective><elt>0</elt>
+<elt>-1</elt>
+</objective>
+<polynomialVectorMatrices><polynomialVectorMatrix><rows>1</rows>
+<cols>1</cols>
+<elements><polynomialVector><polynomial><coeff>1</coeff>
+<coeff>0</coeff>
+<coeff>0</coeff>
+<coeff>0</coeff>
+<coeff>1</coeff>
+</polynomial>
+<polynomial><coeff>0</coeff>
+<coeff>0</coeff>
+<coeff>1</coeff>
+<coeff>0</coeff>
+<coeff>0.083333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333</coeff>
+</polynomial>
+</polynomialVector>
+</elements>
+<samplePoints><elt>0.017496844815659516198101598668525045094139866796002804765631617516473610308279662195607592613550339644869351475878507472982893182997007128538615906267516663733367744589191115891367127597415338007399109</elt>
+<elt>0.15747160334093564578291438801672540584725880116402524289068455764826249277451695976046833352195305680382416328290656725684603864697306415684754315640764997360030970130272004302230414837673804206659198</elt>
+<elt>0.85734539596731629370697833475772720961285347300413743351594925830720690510570344758477203806396664259859822231804686617616176596685334929839217940710831652293501948487036467867698925227335156236255635</elt>
+<elt>2.1171182226948014599702934388915304563909238823163393766414257194933068473018391256685187062395910970291915285812994042309300751426378625531725246583695163117374970952921250228554224392872558988952922</elt>
+<elt>3.9367900835233911445728597004181351461814700291006310722671139412065623193629239940117083380488264200956040820726641814211509661743266039211885789101912493400077425325680010755576037094184510516647996</elt>
+</samplePoints>
+<sampleScalings><elt>0.98265533611891052025129164308977401452864417919058579750526790162356650374404733533337987237406114102416815294620992901555758434730576738310784769460743639202407176439695985048606265404727944492874320</elt>
+<elt>0.85430107256033706849743383435641229646234195411562058448115518288336478210103594802065891510847529070032476107069547583670925433573644447208849045532999227201078716828340524156594280640775015088989232</elt>
+<elt>0.42428690240337275788654194254778065370622197596963744669861904990573447743846378775760737971045511512162277209820867447079524135305185526564207989350181745338786711430880781275574905566439571797675136</elt>
+<elt>0.12037803182327875448553115525403096618393094947839491488878698985314352952010059942034166799060264470342125889574376297613753085761032596479842487536765330990652768775441410604500776550100494190081886</elt>
+<elt>0.019510742190587576672392429243942263564025585024525911407767615529085880410331931050128164296326499703653970503791726824425400816294497240896844124053757080929832052747014881661886754392407917583474214</elt>
+</sampleScalings>
+<bilinearBasis><polynomial><coeff>1</coeff>
+</polynomial>
+<polynomial><coeff>-1</coeff>
+<coeff>1</coeff>
+</polynomial>
+<polynomial><coeff>1</coeff>
+<coeff>-2</coeff>
+<coeff>0.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</coeff>
+</polynomial>
+</bilinearBasis>
+</polynomialVectorMatrix>
+</polynomialVectorMatrices>
+</sdp>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sdpb.git



More information about the debian-science-commits mailing list