chiao45 / mgmetis Goto Github PK
View Code? Open in Web Editor NEWMETIS partitioner for mesh and graph
License: MIT License
METIS partitioner for mesh and graph
License: MIT License
I have installed it successfully, but wheni run it. it feeds back the following error:
OSError: libmpi.so.20: cannot open shared object file: No such file or directory
The feedbacks are about " /usr/lib64/mpi/gcc/openmpi2/bin/mpicc: no such file or directory". I only use mpich and i have intalled it.
I want to know how to disable the use of openmpi or disable it.
ParMETIS is not available, please install mpi4py and rebuild mgmetis
Multithreading is definitely useful, it should be enabled in mgmetis
.
Hi.
I tried to use mgmetis inside a Docker container that uses Python 3.6.7 and NumPy 1.18.1. When I attempt to partition a mesh with 8 cells into 4 parts with the following script,
from mgmetis import metis
import numpy as np
cells = np.array([[0, 1, 4], [0, 3, 4], [1, 2, 5], [1, 4, 5], [3, 4, 7], [3, 6, 7], [4, 5, 8], [4, 7, 8]], dtype = 'int64')
print(cells.dtype)
parts = 4
objval, epart, npart = metis.part_mesh_dual(parts, cells, ncommon = 2)
print('objval:', objval)
print('epart:', epart)
I get a bad partition:
When I run the same script locally with Python 3.8.2 and NumPy 1.18.1, I get a good partition:
Do you know what my problem may be?
Thank you.
Hi, I am trying to use parmetis but I am having a segmentation fault.
OS: Ubuntu 7.5.0-3ubuntu1~18.04
MPI: mpirun (Open MPI) 4.0.5
First, I check MPI is properly installed:
$ env MPICC=$(which mpicc) python3 -m pip install mpi4py
$ mpiexec -n 5 python -m mpi4py.bench helloworld
Hello, World! I am process 0 of 5 on localhost.
Hello, World! I am process 1 of 5 on localhost.
Hello, World! I am process 2 of 5 on localhost.
Hello, World! I am process 3 of 5 on localhost.
Hello, World! I am process 4 of 5 on localhost.
Next, I install mgmetis
:
$ python3 -m pip install --upgrade pip setuptools wheel
$ git clone https://github.com/chiao45/mgmetis.git
$ cd mgmetis
$ python setup.py build
$ python setup.py install
Finally, I tried running a simple example, my_test.py
, inspired from the unittest test_part_kway.py:
import numpy as np
from mgmetis.parmetis import part_kway
from mpi4py import MPI
comm = MPI.COMM_WORLD
has_mpi = True
rank = comm.rank
xadj = [int(x) for x in "0 2 5 8 11 13 16 20 24 28 31 33 36 39 42 44".split()]
adjncy = [
int(x)
for x in "1 5 0 2 6 1 3 7 2 4 8 3 9 0 6 10 1 5 7 11 2 6 8 12 3 7 9 13 4 8 14 5 11 6 10 12 7 11 13 8 12 14 9 13".split()
]
xadj, adjncy = np.asarray(xadj, dtype=int), np.asarray(adjncy, dtype=int)
n = xadj.size // 2
xadj0 = xadj[: n + 1].copy()
adjs0 = adjncy[: xadj0[-1]].copy()
xadj, adjs = np.asarray(xadj0, dtype=int), np.asarray(adjs0, dtype=int)
_, part = part_kway(4, xadj, adjs, comm=comm)
But I get this segmentation fault:
$ python my_test.py
[localhost:222298] *** Process received signal ***
[localhost:222298] Signal: Segmentation fault (11)
[localhost:222298] Signal code: (128)
[localhost:222298] Failing at address: (nil)
[localhost:222298] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef10)[0x7fdab870af10]
[localhost:222298] [ 1] /my_project/mgmetis/_cython/./metis64.cpython-36m-x86_64-linux-gnu.so(libmetis__CreateCoarseGraphNoMask+0x1df)[0x7fd897e6749f]
[localhost:222298] [ 2] /myproject/mgmetis/mgmetis/_cython/./metis64.cpython-36m-x86_64-linux-gnu.so(libmetis__Match_RM+0x33a)[0x7fd897e6840a]
[localhost:222298] [ 3] /myproject/mgmetis/mgmetis/_cython/./metis64.cpython-36m-x86_64-linux-gnu.so(libmetis__CoarsenGraph+0x123)[0x7fd897e68e93]
[localhost:222298] [ 4] /myproject/mgmetis/mgmetis/_cython/./metis64.cpython-36m-x86_64-linux-gnu.so(libmetis__MlevelKWayPartitioning+0xf1)[0x7fd897e763b1]
[localhost:222298] [ 5] /myproject/mgmetis/mgmetis/_cython/./metis64.cpython-36m-x86_64-linux-gnu.so(METIS_PartGraphKway+0x2af)[0x7fd897e7678f]
[localhost:222298] [ 6] /myproject/mgmetis/mgmetis/_cython/parmetis64.cpython-36m-x86_64-linux-gnu.so(ParMETIS_V3_PartKway+0x4f8)[0x7fd8980e0ce8]
[localhost:222298] [ 7] /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c)[0x7fd89c542dae]
[localhost:222298] [ 8] /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x22f)[0x7fd89c54271f]
[localhost:222298] [ 9] /my_venv_3.6.9/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x2b4)[0x7fd89c7565a4]
[localhost:222298] [10] /my_venv_3.6.9/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x11d34)[0x7fd89c756d34]
[localhost:222298] [11] python(_PyObject_FastCallKeywords+0x19c)[0x5aa9ac]
[localhost:222298] [12] python[0x50af03]
[localhost:222298] [13] python(_PyEval_EvalFrameDefault+0x444)[0x50c924]
[localhost:222298] [14] python[0x508675]
[localhost:222298] [15] python[0x50a3e0]
[localhost:222298] [16] python[0x50adcd]
[localhost:222298] [17] python(_PyEval_EvalFrameDefault+0x12a4)[0x50d784]
[localhost:222298] [18] python[0x508675]
[localhost:222298] [19] python(PyEval_EvalCode+0x23)[0x50b7d3]
[localhost:222298] [20] python[0x6352e2]
[localhost:222298] [21] python(PyRun_FileExFlags+0x97)[0x635397]
[localhost:222298] [22] python(PyRun_SimpleFileExFlags+0x17f)[0x638b4f]
[localhost:222298] [23] python(Py_Main+0x591)[0x6396f1]
[localhost:222298] [24] python(main+0xe0)[0x4b0e50]
[localhost:222298] [25] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fdab86edc87]
[localhost:222298] [26] python(_start+0x2a)[0x5b30ea]
[localhost:222298] *** End of error message ***
Segmentation fault
We need to add support for ParMETIS to enable using mgmetis
in parallel with MPI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.