Changeset 2806
- Timestamp:
- May 5, 2006, 4:27:36 PM (18 years ago)
- Location:
- inundation/pymetis
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pymetis/Makefile
r2115 r2806 15 15 pymetis: metis pymetis_module 16 16 17 metis: 17 metis: patched 18 18 make -C $(METIS_DIR) 19 19 … … 23 23 for_win32: metis_win32 pymetis_module_win32 24 24 25 metis_win32: 25 metis_win32: patched 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 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 ### 35 43 # Clean 36 44 # 37 38 45 clean: 39 46 make -C $(METIS_DIR) clean … … 47 54 -rm -f metis.so 48 55 -rm -f metis.pyd 56 patch -p0 -R<long_idxtype.patch 57 -rm -f patched -
inundation/pymetis/README
r2513 r2806 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 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. 12 17 13 18 The METIS_DIR= line in the makefile will need to be changed appropriately. -
inundation/pymetis/metis-4.0/Lib/struct.h
r2051 r2806 12 12 */ 13 13 14 /* Undefine the following #define in order to use short int as the idxtype */ 15 #define IDXTYPE_INT 16 17 /* Indexes are as long as integers for now */ 18 #ifdef IDXTYPE_INT 19 typedef int idxtype; 20 #else 21 typedef short idxtype; 22 #endif 14 typedef long idxtype; 23 15 24 16 #define MAXIDX (1<<8*sizeof(idxtype)-2) -
inundation/pymetis/pymetis/metis.c
r2071 r2806 3 3 4 4 /* This must be the same as the metis idxtype */ 5 typedef intidxtype;5 typedef long idxtype; 6 6 7 7 #include "bridge.h" … … 61 61 return NULL; 62 62 63 elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_ INT, 1, 1);63 elem_arr = (PyArrayObject *) PyArray_ContiguousFromObject(elements, PyArray_LONG, 1, 1); 64 64 65 65 if(!elem_arr) -
inundation/pymetis/test_metis.py
r2115 r2806 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 42 self.assert_(edgecut == 5) 41 self.assert_(epart == array([2, 2, 0, 0, 0, 0], 'i')) 42 self.assert_(npart == array([0, 2, 2, 2, 0, 0, 0], 'i')) 43 for i in range(len(epart)): 44 self.assert_(epart[i] == epart_expected[i]) 45 for i in range(len(npart)): 46 self.assert_(npart[i] == npart_expected[i]) 43 47 44 48 if __name__ == '__main__':
Note: See TracChangeset
for help on using the changeset viewer.