Changeset 2842


Ignore:
Timestamp:
May 11, 2006, 1:26:48 PM (18 years ago)
Author:
jack
Message:

Rolled back the patching of the metis sources. Now passes the unittest
on x86_64.

Location:
inundation/pymetis
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • inundation/pymetis/Makefile

    r2806 r2842  
    1515pymetis: metis pymetis_module
    1616
    17 metis: patched
     17metis:
    1818        make -C $(METIS_DIR)
    1919
     
    2323for_win32: metis_win32 pymetis_module_win32
    2424
    25 metis_win32: patched
     25metis_win32:
    2626        make -C win32 METIS_DIR=$(METIS_DIR)
    2727########make -C $(METIS_DIR)/Lib is implied by make -C win32
     
    3333
    3434###
    35 # Patch the metis sources to use long as the idxtype
    36 # (for x86_64 mainly, but this allows a drop-in of the metis dir.)
    37 #
    38 patched:
    39         patch -p0<long_idxtype.patch
    40         touch patched
    41 
    42 ###
    4335# Clean
    4436#
     37
    4538clean:
    4639        make -C $(METIS_DIR) clean
     
    5447        -rm -f metis.so
    5548        -rm -f metis.pyd
    56         patch -p0 -R<long_idxtype.patch
    57         -rm -f patched
  • inundation/pymetis/README

    r2806 r2842  
    1010Should the metis version change, the new metis package should be in a new
    1111subdirectory. Metis 4.0 is in metis-4.0
    12 
    13 The build scripts patch the metis sources to use longs instead of ints for the
    14 index type. If a future metis version does not require manually patching,
    15 either edit the makefile or create an empty file with the name `patched' in
    16 the top pymetis directory.
    1712
    1813The METIS_DIR= line in the makefile will need to be changed appropriately.
  • inundation/pymetis/long_idxtype.patch

    r2806 r2842  
    1 diff -aur metis-4.0/Lib/struct.h metis-4.0-new/Lib/struct.h
    2 --- metis-4.0/Lib/struct.h      2006-05-05 13:35:37.000000000 +1000
    3 +++ metis-4.0-new/Lib/struct.h  2006-05-05 15:33:22.000000000 +1000
    4 @@ -11,15 +11,7 @@
    5   * $Id: struct.h,v 1.1 1998/11/27 17:59:31 karypis Exp $
    6   */
    7  
    8 -/* Undefine the following #define in order to use short int as the idxtype */
    9 -#define IDXTYPE_INT
    10 -
    11 -/* Indexes are as long as integers for now */
    12 -#ifdef IDXTYPE_INT
    13 -typedef int idxtype;
    14 -#else
    15 -typedef short idxtype;
    16 -#endif
    17 +typedef long idxtype;
    18  
    19  #define MAXIDX (1<<8*sizeof(idxtype)-2)
    20  
  • inundation/pymetis/pymetis/metis.c

    r2806 r2842  
    33
    44/* This must be the same as the metis idxtype */
    5 typedef long idxtype;
     5typedef int idxtype;
    66
    77#include "bridge.h"
     
    6161    return NULL;
    6262
    63   elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_LONG, 1, 1);
     63  elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_INT, 1, 1);
    6464
    6565  if(!elem_arr)
  • inundation/pymetis/test_metis.py

    r2806 r2842  
    3838        #print epart
    3939        #print npart
    40         epart_expected = array([2, 0, 2, 0, 0, 0], 'i')
    41         npart_expected = array([0, 0, 2, 0, 2, 0, 2], 'i')
     40        epart_expected = array([2, 2, 0, 0, 0, 0], 'i')
     41        npart_expected = array([0, 2, 2, 2, 0, 0, 0], 'i')
    4242        self.assert_(edgecut == 5)
    4343        for i in range(len(epart)):
Note: See TracChangeset for help on using the changeset viewer.