# Adding a debug variant to the spack package

**URL:** https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521
**Category:** Installing preCICE
**Created:** [May 30, 2025, 9:43am UTC](https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521 "2025-05-30T09:43:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hoehnp](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/hoehnp/32/2838_2.png) [@hoehnp](https://precice.discourse.group/u/hoehnp)
#### Post date: [May 30, 2025, 9:43am UTC](https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521/1 "2025-05-30T09:43:59Z")

</div>

Dear preCICE developers and maintainers,

for debugging purposes it would be great of the spack package of preCICE could also offer a debug variant inside the package.py. Did you consider this before?

Best  
hoehnp

---

<div class="post-metadata">

### Author: ![fsimonis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/fsimonis/32/6_2.png) [@fsimonis](https://precice.discourse.group/u/fsimonis)
#### Post date: [June 3, 2025, 11:49am UTC](https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521/2 "2025-06-03T11:49:24Z")

</div>

Hi @hoehnp

Spack internally defines the variant `build_type` for every package that uses CMake.  
Meaning you can use `spack install precice build_type=Debug` to install a debug build.

If you are only looking for debug log or assertions, then the variants `checked` and `debug_log` avoid most of the performance hit. `spack install precice +checked +debug_log`

Use `spack info precice` to see all possibile configurations.

Best regards  
Frédéric

---

<div class="post-metadata">

### Author: ![hoehnp](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/hoehnp/32/2838_2.png) [@hoehnp](https://precice.discourse.group/u/hoehnp)
#### Post date: [June 3, 2025, 6:33pm UTC](https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521/3 "2025-06-03T18:33:03Z")

</div>

Hi @fsimonis,

thanks for letting me know. Despite using spack already for quite a while, I didnt know this implicit variant for CMake yet.

Best Regards,  
Patrick

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)
#### Post date: [June 6, 2025, 6:33pm UTC](https://precice.discourse.group/t/adding-a-debug-variant-to-the-spack-package/2521/4 "2025-06-06T18:33:13Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
