Hello community,

here is the log from the commit of package meep for openSUSE:Factory checked in 
at 2015-02-27 11:09:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/meep (Old)
 and      /work/SRC/openSUSE:Factory/.meep.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "meep"

Changes:
--------
--- /work/SRC/openSUSE:Factory/meep/meep.changes        2015-01-29 
09:54:22.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.meep.new/meep.changes   2015-02-27 
11:09:36.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Feb 25 15:59:12 UTC 2015 - norm...@linux.vnet.ibm.com
+
+- new patch meep_change_protos_with_harminv_complex.patch
+  required for ppc64 architecture to avoid make check error
+  while building meep package.
+
+-------------------------------------------------------------------

New:
----
  meep_change_protos_with_harminv_complex.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ meep.spec ++++++
--- /var/tmp/diff_new_pack.akRO9c/_old  2015-02-27 11:09:37.000000000 +0100
+++ /var/tmp/diff_new_pack.akRO9c/_new  2015-02-27 11:09:37.000000000 +0100
@@ -25,6 +25,8 @@
 Group:          Productivity/Scientific/Electronics
 Url:            http://ab-initio.mit.edu/wiki/index.php/Meep
 Source0:        http://ab-initio.mit.edu/meep/meep-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM meep_change_protos_with_harminv_complex.patch -- 
https://github.com/stevengj/meep/issues/13
+Patch1:         meep_change_protos_with_harminv_complex.patch
 BuildRequires:  binutils
 BuildRequires:  blas-devel
 BuildRequires:  fftw3-devel
@@ -71,6 +73,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 export CFLAGS="%{optflags} -fPIC"

++++++ meep_change_protos_with_harminv_complex.patch ++++++
From: Michel Normand <norm...@linux.vnet.ibm.com>
Subject: meep change protos with harminv complex
Date: Wed, 25 Feb 2015 16:51:43 +0100

meep change protos with harminv complex

This patch concern the meep package,
it needs a prereq of similar patch for harminv package.

This is related to meep issue 13
https://github.com/stevengj/meep/issues/13

The initial reported problem was at make check:
===
[  259s] FAIL: aniso_disp
[  273s] FAIL: convergence_cyl_waveguide
[  396s] FAIL: 2D_convergence
===
../meep-1.2.1/tests> grep failure test-suite.log
test-suite.log:harminv: failure on line 853 of harminv.c: argument out of range 
in harminv_get_amplitude
test-suite.log:harminv: failure on line 853 of harminv.c: argument out of range 
in harminv_get_amplitude
test-suite.log:harminv: failure on line 853 of harminv.c: argument out of range 
in harminv_get_amplitude
===

Signed-off-by: Michel Normand <norm...@linux.vnet.ibm.com>
---
 src/bands.cpp |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

Index: meep-1.2.1/src/bands.cpp
===================================================================
--- meep-1.2.1.orig/src/bands.cpp
+++ meep-1.2.1/src/bands.cpp
@@ -466,9 +466,12 @@ int do_harminv(complex<double> *data, in
       }
   
   double min_err = harminv_get_freq_error(hd, fsort[0]);
-  double max_amp = abs(harminv_get_amplitude(hd, 0));
+  harminv_complex aa;
+  harminv_get_amplitude(&aa, hd, 0);
+  double max_amp = abs(aa);
   for (int i = 1; i < nf; ++i) {
-    double amp = abs(harminv_get_amplitude(hd, i));
+    harminv_get_amplitude(&aa, hd, i);
+    double amp = abs(aa);
     if (max_amp < amp)
       max_amp = amp;
   }
@@ -477,7 +480,8 @@ int do_harminv(complex<double> *data, in
     for (int i = 0; i < nf; ++i) {
       double f = abs(harminv_get_freq(hd, fsort[i]) / dt);
       double err = harminv_get_freq_error(hd, fsort[i]);
-      double amp = abs(harminv_get_amplitude(hd, fsort[i]));
+      harminv_get_amplitude(&aa, hd, fsort[i]);
+      double amp = abs(aa);
       if (f >= fmin && f <= fmax
          && abs(harminv_get_Q(hd, fsort[i])) > Q_thresh
          && err < err_thresh
@@ -536,10 +540,13 @@ int do_harminv(complex<double> *data, in
       }
   
   for (int i = 0; i < nf; ++i) {
-    complex<double> freq = harminv_get_omega(hd, fsort[i]) / (2*pi*dt);
+    harminv_complex oo;
+    complex<double> freq;
+    harminv_get_omega(&oo, hd, fsort[i]);
+    freq = oo / (2*pi*dt);
     freq_re[i] = abs(real(freq));
     freq_im[i] = imag(freq);
-    amps[i] = harminv_get_amplitude(hd, fsort[i]);
+    harminv_get_amplitude(&(amps[i]), hd, fsort[i]);
     if (errors)
       errors[i] = harminv_get_freq_error(hd, fsort[i]);
   }
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to