-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35e1eb6
commit 848307a
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"""Replaces functionality from the removed `firedrake_configuration` module.""" | ||
|
||
import os | ||
|
||
from pathlib import Path | ||
|
||
|
||
# Make a configuration that mimics the old one: | ||
_config = { | ||
"options": { | ||
"package_manager": False, | ||
"minimal_petsc": False, | ||
"mpicc": "/opt/mpich/bin/mpicc", | ||
"mpicxx": "/opt/mpich/bin/mpicxx", | ||
"mpif90": "/opt/mpich/bin/mpif90", | ||
"mpiexec": "/opt/mpich/bin/mpiexec", | ||
"disable_ssh": False, | ||
"honour_petsc_dir": True, | ||
"with_parmetis": False, | ||
"slepc": True, | ||
"packages": [], | ||
"honour_pythonpath": False, | ||
"opencascade": False, | ||
"tinyasm": True, | ||
"petsc_int_type": "int32", | ||
"cache_dir": "/scratch/jbetteri/firedrake_py311_opt/.cache", | ||
"complex": False, | ||
"remove_build_files": False, | ||
"with_blas": None, | ||
"torch": "cpu", | ||
"netgen": True, | ||
"jax": False, | ||
}, | ||
"environment": {}, | ||
"additions": [], | ||
} | ||
|
||
|
||
def get_config(): | ||
"""Return the current configuration dictionary""" | ||
return None | ||
|
||
|
||
def setup_cache_dirs(): | ||
root = Path(os.environ.get("VIRTUAL_ENV", "~")) | ||
if "PYOP2_CACHE_DIR" not in os.environ: | ||
os.environ["PYOP2_CACHE_DIR"] = str(root.joinpath("pyop2")) | ||
if 'FIREDRAKE_TSFC_KERNEL_CACHE_DIR' not in os.environ: | ||
os.environ["FIREDRAKE_TSFC_KERNEL_CACHE_DIR"] = str(root.joinpath("tsfc")) |