Hello community, here is the log from the commit of package harminv for openSUSE:Factory checked in at 2015-02-27 11:09:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/harminv (Old) and /work/SRC/openSUSE:Factory/.harminv.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "harminv" Changes: -------- --- /work/SRC/openSUSE:Factory/harminv/harminv.changes 2015-01-29 09:54:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.harminv.new/harminv.changes 2015-02-27 11:09:35.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Feb 25 15:41:00 UTC 2015 - normand@linux.vnet.ibm.com + +- new patch harminv_change_protos_with_harminv_complex.patch + required for ppc64 architecture to avoid make check error + while building meep package. + +------------------------------------------------------------------- New: ---- harminv_change_protos_with_harminv_complex.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ harminv.spec ++++++ --- /var/tmp/diff_new_pack.uejAHi/_old 2015-02-27 11:09:36.000000000 +0100 +++ /var/tmp/diff_new_pack.uejAHi/_new 2015-02-27 11:09:36.000000000 +0100 @@ -25,6 +25,8 @@ Group: Productivity/Scientific/Electronics Url: http://ab-initio.mit.edu/wiki/index.php/Harminv Source0: http://ab-initio.mit.edu/harminv/harminv-%{version}.tar.gz +# PATCH-FIX-UPSTREAM harminv_change_protos_with_harminv_complex.patch -- https://github.com/stevengj/meep/issues/13 +Patch1: harminv_change_protos_with_harminv_complex.patch BuildRequires: blas-devel BuildRequires: gcc-fortran BuildRequires: lapack-devel @@ -67,6 +69,7 @@ %prep %setup -q +%patch1 -p1 sed -i 's/@LIBS@//g' harminv.pc.in ++++++ harminv_change_protos_with_harminv_complex.patch ++++++ From: Michel Normand <normand@linux.vnet.ibm.com> Subject: harminv change protos with harminv complex Date: Mon, 23 Feb 2015 10:05:08 +0100 harminv change protos with harminv complex This patch concern the harminv package, this is a prereq to a similar patch for meep package. This is related to meep issue 13 https://github.com/stevengj/meep/issues/13 Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com> --- harminv-main.c | 18 ++++++++++++------ harminv.c | 10 ++++++---- harminv.h | 4 ++-- 3 files changed, 20 insertions(+), 12 deletions(-) Index: harminv-1.3.1/harminv.h =================================================================== --- harminv-1.3.1.orig/harminv.h +++ harminv-1.3.1/harminv.h @@ -50,8 +50,8 @@ extern int harminv_get_num_freqs(harminv extern double harminv_get_freq(harminv_data d, int k); extern double harminv_get_Q(harminv_data d, int k); extern double harminv_get_decay(harminv_data d, int k); -extern harminv_complex harminv_get_omega(harminv_data d, int k); -extern harminv_complex harminv_get_amplitude(harminv_data d, int k); +extern void harminv_get_omega(harminv_complex *omega, harminv_data d, int k); +extern void harminv_get_amplitude(harminv_complex *amplitude, harminv_data d, int k); extern double harminv_get_freq_error(harminv_data d, int k); /* the following routines are undocumented and not recommended */ Index: harminv-1.3.1/harminv.c =================================================================== --- harminv-1.3.1.orig/harminv.c +++ harminv-1.3.1/harminv.c @@ -839,21 +839,23 @@ double harminv_get_Q(harminv_data d, int / (2 * harminv_get_decay(d, k))); } -cmplx harminv_get_omega(harminv_data d, int k) +void harminv_get_omega(cmplx *omega, harminv_data d, int k) { CHECK(d->nfreqs >= 0, "haven't computed eigensolutions yet"); CHECK(k >= 0 && k < d->nfreqs, "argument out of range in harminv_get_omega"); - return(I * clog(d->u[k])); + *omega = (I * clog(d->u[k])); + return; } -cmplx harminv_get_amplitude(harminv_data d, int k) +void harminv_get_amplitude(cmplx *amplitude, harminv_data d, int k) { CHECK(k >= 0 && k < d->nfreqs, "argument out of range in harminv_get_amplitude"); if (!d->amps) d->amps = harminv_compute_amplitudes(d); - return d->amps[k]; + *amplitude = d->amps[k]; + return; } double harminv_get_freq_error(harminv_data d, int k) Index: harminv-1.3.1/harminv-main.c =================================================================== --- harminv-1.3.1.orig/harminv-main.c +++ harminv-1.3.1/harminv-main.c @@ -179,6 +179,7 @@ static int compar(const void *a, const v { const int *ia = (const int *) a; const int *ib = (const int *) b; + cmplx aa, ab; switch (sortby) { case SORT_FREQUENCY: @@ -189,8 +190,9 @@ static int compar(const void *a, const v return cmp(harminv_get_freq_error(hd, *ia), harminv_get_freq_error(hd, *ib)); case SORT_AMPLITUDE: - return cmp(cabs(harminv_get_amplitude(hd, *ia)), - cabs(harminv_get_amplitude(hd, *ib))); + harminv_get_amplitude(&aa, hd, *ia); + harminv_get_amplitude(&ab, hd, *ia); + return cmp(cabs(aa), cabs(ab)); case SORT_Q: return cmp(harminv_get_freq(hd,*ia) / harminv_get_decay(hd,*ia), harminv_get_freq(hd,*ib) / harminv_get_decay(hd,*ib)); @@ -212,6 +214,7 @@ static int mode_ok(harminv_data d, int k mode_ok_data *ok_d = (mode_ok_data *) ok_d_; double errk, ampk, f; int ok; + cmplx aa; if (k == -1) { /* initialize */ int i; @@ -219,12 +222,14 @@ static int mode_ok(harminv_data d, int k if (!harminv_get_num_freqs(d)) return 0; ok_d->min_err = harminv_get_freq_error(d, 0);; - ok_d->max_amp = cabs(harminv_get_amplitude(d, 0)); + harminv_get_amplitude(&aa, d, 0); + ok_d->max_amp = cabs(aa); for (i = 1; i < harminv_get_num_freqs(d); ++i) { double err, amp; if ((err = harminv_get_freq_error(d, i)) < ok_d->min_err) ok_d->min_err = err; - if ((amp = cabs(harminv_get_amplitude(d, i))) > ok_d->max_amp) + harminv_get_amplitude(&aa, d, i); + if ((amp = cabs(aa)) > ok_d->max_amp) ok_d->max_amp = amp; } @@ -245,7 +250,8 @@ static int mode_ok(harminv_data d, int k f = fabs(harminv_get_freq(d, k)); errk = harminv_get_freq_error(d, k); - ampk = cabs(harminv_get_amplitude(d, k)); + harminv_get_amplitude(&aa, d, k); + ampk = cabs(aa); ok = ((!ok_d->only_f_inrange || (f >= ok_d->fmin && f <= ok_d->fmax)) && errk <= ok_d->err_thresh @@ -460,7 +466,7 @@ int main(int argc, char **argv) #endif freq = harminv_get_freq(hd, j) / dt; decay = harminv_get_decay(hd, j) / fabs(dt); - amp = harminv_get_amplitude(hd, j); + harminv_get_amplitude(&, hd, j); err = harminv_get_freq_error(hd, j); printf("%g, %e, %g, %g, %g, %e\n", freq * (specify_omega ? TWOPI : 1.0), decay, -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org