Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Jan 5, 2024
1 parent c47ab7c commit 35f4e9d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
./env
*.sqlite3


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
*.o

# Distribution / packaging
.Python
Expand Down
1 change: 1 addition & 0 deletions environment_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- defaults
dependencies:
- jupytext
- mkl
- monkeytype
- numpy
- openbabel
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
requires = ["setuptools", "setuptools-scm", "numpy"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
1 change: 1 addition & 0 deletions src/qmllib/kernels/fkernels.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module searchtools

implicit none


contains

function searchsorted(all_values, sorted) result(cdf_idx)
Expand Down
34 changes: 34 additions & 0 deletions src/qmllib/math/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# https://www.matecdev.com/posts/fortran-in-python.html
# https://www.matecdev.com/posts/fortran-legacy-code.html

MKLROOT=$(CONDA_PREFIX)

# LD_LIBRARY_PATH=${MKL_ROOT}/lib:${LD_LIBRARY_PATH}

all:
# f2py -c -m fsolvers --opt='-lblas -llapack' ./fsolvers.f90
f2py -c -m fsolvers -lblas -llapack ./fsolvers.f90
# f2py -c -m fsolvers ./fsolvers.f90 \
# --f90flags='-I${MKLROOT}/include' \
# -lgomp -lpthread -lm -ldl -L${MKLROOT}/lib -lmkl_rt



# ${F2PY} -c kitchen/fkitchen.f90 -m fkitchen
# --opt='-O3 -fopenmp -m64 -march=native'
# --f90flags='-I${MKLROOT}/include'
# -lgomp -lpthread -lm -ldl -L${MKLROOT}/lib/intel64 -lmkl_rt

test:
f2py -c ./fsolvers.f90 -m fsolvers extra_link_args="-lblas -llapack"
python -m numpy.f2py ./fsolvers.f90 -m fsolvers --dep lapack
-fopenmp -m64 -march=native -fPIC \
-Wno-maybe-uninitialized -Wno-unused-function -Wno-cpp \
-lgomp\
-lblas -llapack


clean:
rm *.so
rm -rf ./__pycache__/

0 comments on commit 35f4e9d

Please sign in to comment.