From nobody@FreeBSD.org  Tue Mar  5 03:08:39 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 40D70B00
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Mar 2013 03:08:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 32E0FB01
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Mar 2013 03:08:39 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2538cIj012766
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 5 Mar 2013 03:08:38 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2538che012765;
	Tue, 5 Mar 2013 03:08:38 GMT
	(envelope-from nobody)
Message-Id: <201303050308.r2538che012765@red.freebsd.org>
Date: Tue, 5 Mar 2013 03:08:38 GMT
From: Pedro Giffuni <giffunip@tutopia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Add a fix to math/spooles
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         176653
>Category:       ports
>Synopsis:       Add a fix to math/spooles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    maho
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 05 03:10:00 UTC 2013
>Closed-Date:    Fri Aug 16 01:50:59 UTC 2013
>Last-Modified:  Fri Aug 16 01:50:59 UTC 2013
>Originator:     Pedro Giffuni
>Release:        9.1-PRERELEASE
>Organization:
>Environment:
FreeBSD pcbsd-8555 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #7: Sun Oct  7 00:05:03 COT 2012     Pedro@pcbsd-8555:/usr/src/sys/amd64/compile/GENERIC  amd64

>Description:
The CalculiX package includes a correction to SPOOLES.2.2 for large input decks:

http://www.dhondt.de/ccx_2.5.SPOOLEScorrection.tar.bz2

I added a patch to our spooles and while here updated the WWW URL to one that works.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: spooles/files/patch-I2Ohash-large-input
===================================================================
--- spooles/files/patch-I2Ohash-large-input	(revision 0)
+++ spooles/files/patch-I2Ohash-large-input	(working copy)
@@ -0,0 +1,49 @@
+--- I2Ohash/src/util.c.orig	2013-03-04 21:21:54.000000000 -0500
++++ I2Ohash/src/util.c	2012-10-06 08:28:37.000000000 -0500
+@@ -39,8 +39,9 @@
+ */
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
+-loc =(int) loc3;
++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc=(int)loc3;
+ #if MYDEBUG > 0
+ fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
+ fflush(stdout) ;
+@@ -51,7 +52,7 @@
+    --------------------------------------------------------
+ */
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
++fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
+ fflush(stdout) ;
+ #endif
+ if ( (i2op = hashtable->freeI2OP) == NULL ) {
+@@ -159,10 +160,11 @@
+ #endif
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
+-loc =(int) loc3;
++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc=(int)loc3;
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
+ fflush(stdout) ;
+ #endif
+ /*
+@@ -231,7 +233,9 @@
+ }
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-loc  = (loc1*loc2) % hashtable->nlist ;
++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc=(int)loc3;
+ /*
+    ---------------------------------------------------
+    find the location of the first (key1,key2,*) triple
Index: spooles/pkg-descr
===================================================================
--- spooles/pkg-descr	(revision 313418)
+++ spooles/pkg-descr	(working copy)
@@ -17,4 +17,4 @@
        methods. The preconditioner is a drop tolerance factorization,
        with or without pivoting for stability.
 
-WWW:	http://www.spooles.org/
+WWW:	http://www.netlib.org/linalg/spooles/spooles.2.2.html


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->maho 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Mar 5 03:10:11 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176653 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/176653: commit references a PR
Date: Wed,  6 Mar 2013 00:56:15 +0000 (UTC)

 Author: maho
 Date: Wed Mar  6 00:56:02 2013
 New Revision: 313492
 URL: http://svnweb.freebsd.org/changeset/ports/313492
 
 Log:
   Add a fix to math/spooles from the CalculiX package.
   
   PR:             176653
   Submitted by:   pfg@
 
 Added:
   head/math/spooles/files/patch-I2Ohash-large-input   (contents, props changed)
 Modified:
   head/math/spooles/Makefile
   head/math/spooles/pkg-descr
 
 Modified: head/math/spooles/Makefile
 ==============================================================================
 --- head/math/spooles/Makefile	Wed Mar  6 00:50:28 2013	(r313491)
 +++ head/math/spooles/Makefile	Wed Mar  6 00:56:02 2013	(r313492)
 @@ -7,7 +7,7 @@
  
  PORTNAME=	spooles
  PORTVERSION=	2.2
 -PORTREVISION=	9
 +PORTREVISION=	10
  CATEGORIES=	math
  MASTER_SITES=	http://www.netlib.org/linalg/spooles/
  .ifdef WITH_MPI
 
 Added: head/math/spooles/files/patch-I2Ohash-large-input
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/math/spooles/files/patch-I2Ohash-large-input	Wed Mar  6 00:56:02 2013	(r313492)
 @@ -0,0 +1,99 @@
 +$FreeBSD$
 +--- I2Ohash/src/util.c.orig	2013-03-04 21:21:54.000000000 -0500
 ++++ I2Ohash/src/util.c	2012-10-06 08:28:37.000000000 -0500
 +@@ -39,8 +39,9 @@
 + */
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 +-loc =(int) loc3;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + #if MYDEBUG > 0
 + fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 + fflush(stdout) ;
 +@@ -51,7 +52,7 @@
 +    --------------------------------------------------------
 + */
 + #if MYDEBUG > 0
 +-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
 ++fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
 + fflush(stdout) ;
 + #endif
 + if ( (i2op = hashtable->freeI2OP) == NULL ) {
 +@@ -159,10 +160,11 @@
 + #endif
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 +-loc =(int) loc3;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + #if MYDEBUG > 0
 +-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
 ++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 + fflush(stdout) ;
 + #endif
 + /*
 +@@ -231,7 +233,9 @@
 + }
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-loc  = (loc1*loc2) % hashtable->nlist ;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + /*
 +    ---------------------------------------------------
 +    find the location of the first (key1,key2,*) triple
 +--- I2Ohash/src/util.c.orig	2013-03-04 21:21:54.000000000 -0500
 ++++ I2Ohash/src/util.c	2012-10-06 08:28:37.000000000 -0500
 +@@ -39,8 +39,9 @@
 + */
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 +-loc =(int) loc3;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + #if MYDEBUG > 0
 + fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 + fflush(stdout) ;
 +@@ -51,7 +52,7 @@
 +    --------------------------------------------------------
 + */
 + #if MYDEBUG > 0
 +-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
 ++fprintf(stdout, "\n hashtable->freeI2OP = %p", hashtable->freeI2OP) ;
 + fflush(stdout) ;
 + #endif
 + if ( (i2op = hashtable->freeI2OP) == NULL ) {
 +@@ -159,10 +160,11 @@
 + #endif
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 +-loc =(int) loc3;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + #if MYDEBUG > 0
 +-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
 ++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
 + fflush(stdout) ;
 + #endif
 + /*
 +@@ -231,7 +233,9 @@
 + }
 + loc1 = (key1 + 1) % hashtable->nlist ;
 + loc2 = (key2 + 1) % hashtable->nlist ;
 +-loc  = (loc1*loc2) % hashtable->nlist ;
 ++/*loc  = (loc1*loc2) % hashtable->nlist ;*/
 ++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
 ++loc=(int)loc3;
 + /*
 +    ---------------------------------------------------
 +    find the location of the first (key1,key2,*) triple
 
 Modified: head/math/spooles/pkg-descr
 ==============================================================================
 --- head/math/spooles/pkg-descr	Wed Mar  6 00:50:28 2013	(r313491)
 +++ head/math/spooles/pkg-descr	Wed Mar  6 00:56:02 2013	(r313492)
 @@ -17,4 +17,4 @@
         methods. The preconditioner is a drop tolerance factorization,
         with or without pivoting for stability.
  
 -WWW:	http://www.spooles.org/
 +WWW:	http://www.netlib.org/linalg/spooles/spooles.2.2.html
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: maho 
State-Changed-When: Fri Aug 16 01:50:37 UTC 2013 
State-Changed-Why:  
closed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176653 
>Unformatted:
