From 5d04797eba36093afd5a43478ad8565fa04b79dc Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Mon, 9 Jun 2025 09:52:20 -0600 Subject: [PATCH 1/3] Instead of forcing O3 flag, use cmake build type, defaulting to release --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c66b0267..2993ee21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,14 @@ project( LANGUAGES CXX C ) +# Set default build type to Release if not specified +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose build type" FORCE) +endif() + set(BLT_CXX_STD "c++14" CACHE STRING "Version of C++ standard") set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + set(ENABLE_MPI ON CACHE BOOL "") ################################ From 134029e8543365ed5094b9fae230166acbf73df3 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Thu, 12 Jun 2025 16:07:41 -0600 Subject: [PATCH 2/3] Update quandary spack package debug and int64 variants --- .ci-scripts/radiuss-spack-configs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci-scripts/radiuss-spack-configs b/.ci-scripts/radiuss-spack-configs index 7b3c95ac..62d8cb0c 160000 --- a/.ci-scripts/radiuss-spack-configs +++ b/.ci-scripts/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit 7b3c95ac17b6fb692bc7712da37d7ef0fc33fa45 +Subproject commit 62d8cb0ca22a6b6379124082094dbe1b20ff7d69 From d868a2bd05c6d1909ae8222760d7f6845fb666c7 Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 13 Jun 2025 09:35:55 -0600 Subject: [PATCH 3/3] Update readme with debug/int64 instructions --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8cab70b4..39b6977f 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,8 @@ pip install -e . #### Optional Spack environment variations The Spack environment used to build Quandary is defined in `.spack_env/spack.yaml`. You can add or remove packages from the `specs` list as needed or use different variants of these. -For instance, if you want to use the debug variant (which builds Petsc in debug mode) you can use `quandary@develop+test+debug`. +For instance, if you want to use the debug variant (which builds Quandary and Petsc in debug mode) you can use `quandary@develop+test build_type=Debug`. +To build with `PetscInt`s set to 64-bit integers, use `quandary+int64`. To use a specific version of Petsc instead of the latest release, you can do e.g. `quandary@develop^petsc@3.22.1`. The `+test` variant (by default on in `.spack_env/spack.yaml`) adds python and pip to the Spack environment. This allows `pip install` to install python packages to your Spack virtual environment rather than a global one. @@ -89,6 +90,7 @@ cmake .. make ``` +To build in debug mode use `cmake -DCMAKE_BUILD_TYPE=Debug ..`. Add the path to Quandary to your `PATH` variable with `export PATH=/path/to/quandary/:$PATH`, so your binary can be found. Alternatively, you can install the Quandary executable in a specific path (such as the default `/usr/local/bin` to have it in your `PATH` automatically): ```