Skip to content

Commit e32478d

Browse files
authored
Create README for the PYTHON directory
1 parent 79f4968 commit e32478d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

PYTHON/README

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Python Interface
2+
====================
3+
4+
This directory contains the Python interface routines for SuperLU_DIST.
5+
The directory contains the following files:
6+
pdbridge.h - C header file for the Python handle slu_handle and APIs (using pdgssvx):
7+
initialization pdbridge_init, factorization pdbridge_factor, triangular solve
8+
pdbridge_solve, log-determinant computation pdbridge_logdet, and deallocation pdbridge_free.
9+
pdbridge.c - It contains C functions for the APIs.
10+
pdbridge.py - Utility Python functions.
11+
12+
13+
To compile the code, use CMake option -Denable_python=ON (the default) and -DBUILD_SHARED_LIBS=ON,
14+
then type 'make python'. This will create a shared library called superlu_dist_python. In addition,
15+
one need to install mpi4py>=4.0.0, e.g., using:
16+
MPICC=mpicc pip install mpi4py==4.0.0
17+
18+
There is one example in the directory.
19+
20+
1. pddrive.py:
21+
This example will generate a random SPD matrix, perform the factorization and computes the log-determinant (and compare with log-determinant from numpy.linalg.slogdet)
22+
To run the code, type:
23+
python pddrive.py -c 2 -r 1
24+
(The above use 2 MPIs.)
25+
Note that if a 64-bit integer interface is needed (assuming -DXSDK_INDEX_SIZE=64 has been used to compile the code), set INT64 = 1 in pddrive.py
26+

0 commit comments

Comments
 (0)