Skip to content

Commit 20b02f4

Browse files
committed
Update requirements, add tests
1 parent 0161bdb commit 20b02f4

File tree

10 files changed

+277
-600
lines changed

10 files changed

+277
-600
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,5 @@ docs/_*
185185

186186
#skbuild folder
187187
skbuild/*
188+
data/*
189+
*.swp

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ This repository contains the final project for the course in Development Tools i
66

77

88
TO DO:
9-
1) Integrate the new code in the parallel solver
10-
2) Profile runtime and memory usage, saving the results and plotting
11-
3) Runtime vs matrix size comparison (follow in detail the instructions on the course repo)
12-
4) Accuracy vs efficiency
13-
5) Script to run on Ulysses
14-
6) Add missing tests
15-
7) Possibly delete eigenvalues\_np and so on, which I inserted because I thought it was not going to be necessary to compute the eigenvectors, making these wrappers useless
16-
8) Write missing documentation
9+
1) Profile runtime and memory usage, saving the results and plotting
10+
2) Runtime vs matrix size comparison (follow in detail the instructions on the course repo)
11+
3) Accuracy vs efficiency
12+
4) Add missing tests
13+
14+
# To install using Ulysses:
15+
```bash
16+
source shell/submit.sh
17+
```
18+
The previous line will load CMake and gcc. Both are needed to compile the project.
19+
In addition, it will enable the istallation of `mpi4py`.
20+
After that, you can just write
21+
```bash
22+
python -m pip install .
23+
```
24+
25+
## Additional note
26+
There is the possibility that you may need to write the following command:
27+
```bash
28+
conda install -c conda-forge gxx
29+
```
30+
Notice that you should first try *without* using that command, as the normal installation is expected to work.
31+
This is likely a consequence of the fact that we are using a `setup.py` file in order to automatically compile a `C++` file when `pip install .` is executed.

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ llvmlite==0.44.0
1919
MarkupSafe==3.0.2
2020
matplotlib==3.10.0
2121
memory-profiler==0.61.0
22+
mpi4py==4.0.3
2223
mypy-extensions==1.0.0
2324
numba==0.61.0
2425
numpy==2.1.3

shell/submit.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
2-
31
module load cmake/3.29.1
42
module load intel/2021.2
3+
# Comment the following line if you are not interested in running using MPI
4+
module load openmpi3/3.1.4

src/pyclassify/eigenvalues.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
def eigenvalues_np(A, symmetric=True):
1919
"""
20+
Wrapper for the np eigenvalue solver. This function is only used in tests for better readability.
2021
Compute the eigenvalues of a square matrix using NumPy's `eig` or `eigh` function.
2122
2223
This function checks if the input matrix is square (and is actually a matrix) using

src/pyclassify/helpers_secular.py

Lines changed: 0 additions & 257 deletions
This file was deleted.

0 commit comments

Comments
 (0)