Changeset 2842 for inundation
- Timestamp:
- May 11, 2006, 1:26:48 PM (19 years ago)
- Location:
- inundation/pymetis
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pymetis/Makefile
r2806 r2842 15 15 pymetis: metis pymetis_module 16 16 17 metis: patched17 metis: 18 18 make -C $(METIS_DIR) 19 19 … … 23 23 for_win32: metis_win32 pymetis_module_win32 24 24 25 metis_win32: patched25 metis_win32: 26 26 make -C win32 METIS_DIR=$(METIS_DIR) 27 27 ########make -C $(METIS_DIR)/Lib is implied by make -C win32 … … 33 33 34 34 ### 35 # Patch the metis sources to use long as the idxtype36 # (for x86_64 mainly, but this allows a drop-in of the metis dir.)37 #38 patched:39 patch -p0<long_idxtype.patch40 touch patched41 42 ###43 35 # Clean 44 36 # 37 45 38 clean: 46 39 make -C $(METIS_DIR) clean … … 54 47 -rm -f metis.so 55 48 -rm -f metis.pyd 56 patch -p0 -R<long_idxtype.patch57 -rm -f patched -
inundation/pymetis/README
r2806 r2842 10 10 Should the metis version change, the new metis package should be in a new 11 11 subdirectory. Metis 4.0 is in metis-4.0 12 13 The build scripts patch the metis sources to use longs instead of ints for the14 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' in16 the top pymetis directory.17 12 18 13 The 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.h2 --- metis-4.0/Lib/struct.h 2006-05-05 13:35:37.000000000 +10003 +++ metis-4.0-new/Lib/struct.h 2006-05-05 15:33:22.000000000 +10004 @@ -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_INT10 -11 -/* Indexes are as long as integers for now */12 -#ifdef IDXTYPE_INT13 -typedef int idxtype;14 -#else15 -typedef short idxtype;16 -#endif17 +typedef long idxtype;18 19 #define MAXIDX (1<<8*sizeof(idxtype)-2)20 -
inundation/pymetis/pymetis/metis.c
r2806 r2842 3 3 4 4 /* This must be the same as the metis idxtype */ 5 typedef longidxtype;5 typedef int idxtype; 6 6 7 7 #include "bridge.h" … … 61 61 return NULL; 62 62 63 elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_ LONG, 1, 1);63 elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_INT, 1, 1); 64 64 65 65 if(!elem_arr) -
inundation/pymetis/test_metis.py
r2806 r2842 38 38 #print epart 39 39 #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') 42 42 self.assert_(edgecut == 5) 43 43 for i in range(len(epart)):
Note: See TracChangeset
for help on using the changeset viewer.