Add a plethora of config options to a-b-c. (#1958)
Closes #1861 Closes #1783 - arbor-build-catalogue (a-b-c) does no longer need to be in a fixed location - nor do we statically fix the configuration for a-b-c - instead, we rely on `arbor.config` to read the relevant default values - each value can be overriden, if desired - added many more values to the configuration - gpu type and arch - paths and prefix - CXX - report default settings for better diagnosis - implement a fallback for prefix if that does not exist; in particular for the amazing skbuild. In essence you can now use a-b-c as a standalone tool, as long as you have a properly configured py-arbor. Example output after removing `_skbuild` ``` Warning: prefix '/Users/hater/src/arbor/_skbuild/macosx-11.0-x86_64-3.10/cmake-install' does not exist, falling back to '/Users/hater/src/arbor/.direnv/python-3.10.6'. usage: arbor-build-catalogue catalogue_name mod_source_dir Generate dynamic catalogue and build it into a shared object. positional arguments: name Catalogue name. modpfx Directory name where *.mod files live. options: --raw raw [raw ...] Advanced: Raw mechanisms as C++ files. Per <name> the files <name>.hpp, <name>_cpu.cpp (if CPU is enabled) must be present in the target directory and with GPU support also <name>_gpu.cpp and <name>_gpu.cu. -v, --verbose Verbose. -q, --quiet Less output. --cpu CPU Enable CPU support. --debug [path] Don't clean up the generated temp cpp code. Can be a target path for the generated code. --gpu gpu Enable GPU support --gpu-arch gpu_arch Enable GPU support; default=- --cxx cxx Use this C++ compiler; default=/usr/local/opt/llvm/bin/clang++. --prefix prefix Arbor's install prefix; default=/Users/hater/src/arbor/.direnv/python-3.10.6. --bin bin Look here for Arbor utils like modcc; relative to prefix, default=bin. --lib lib Look here for Arbor's CMake config; relative to prefix, default=lib. --data data Look here for Arbor supplementals like generate_catalogue; relative to prefix, default=lib -h, --help Display this help and exit. ```
Showing
- .github/workflows/lint.yml 3 additions, 3 deletions.github/workflows/lint.yml
- CMakeLists.txt 1 addition, 8 deletionsCMakeLists.txt
- arbor/include/CMakeLists.txt 9 additions, 0 deletionsarbor/include/CMakeLists.txt
- python/CMakeLists.txt 8 additions, 0 deletionspython/CMakeLists.txt
- python/config.cpp 20 additions, 7 deletionspython/config.cpp
- python/context.cpp 2 additions, 2 deletionspython/context.cpp
- python/test/fixtures.py 2 additions, 1 deletionpython/test/fixtures.py
- python/test/unit/test_domain_decompositions.py 2 additions, 2 deletionspython/test/unit/test_domain_decompositions.py
- python/test/unit_distributed/test_domain_decompositions.py 1 addition, 1 deletionpython/test/unit_distributed/test_domain_decompositions.py
- scripts/arbor-build-catalogue 103 additions, 58 deletionsscripts/arbor-build-catalogue
Please register or sign in to comment