# Why FuncViaSchemeSwitching() display core dump?

**URL:** <https://openfhe.discourse.group/t/why-funcviaschemeswitching-display-core-dump/1242>\
**Category:** Library Questions\
**Created:** [April 29, 2024, 1:02pm UTC](https://openfhe.discourse.group/t/why-funcviaschemeswitching-display-core-dump/1242 "2024-04-29T13:02:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capibala](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@capibala](https://openfhe.discourse.group/u/capibala)\
**Post date:** [April 29, 2024, 1:02pm UTC](https://openfhe.discourse.group/t/why-funcviaschemeswitching-display-core-dump/1242/1 "2024-04-29T13:02:26Z")

</div>

[\> Blockquote](https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/scheme-switching.cpp)

-----FuncViaSchemeSwitching-----  
Output precision is only wrt the operations in CKKS after switching back.  
CKKS scheme is using ring dimension 2048, and number of slots 8  
FHEW scheme is using lattice parameter 32, logQ 25, and modulus q 2048  
(interrupted by signal 11:SIGSEGV)

with 96 cores and 512 GB RAM

---

<div class="post-metadata">

**Author:** ![andreea.alexandru](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/andreea.alexandru/32/378_2.png) [@andreea.alexandru](https://openfhe.discourse.group/u/andreea.alexandru)\
**Post date:** [April 29, 2024, 1:50pm UTC](https://openfhe.discourse.group/t/why-funcviaschemeswitching-display-core-dump/1242/2 "2024-04-29T13:50:38Z")

</div>

This was fixed in [Moved check on optional argument before it is used in EvalCKKStoFHEW by andreea-alexandru · Pull Request #712 · openfheorg/openfhe-development · GitHub](https://github.com/openfheorg/openfhe-development/pull/712), which is merged in the dev branch, but not in the main branch yet.

You can either work with the dev branch, or change  
auto cTemp = cc-\>EvalCKKStoFHEW(c1)  
to  
auto cTemp = cc-\>EvalCKKStoFHEW(c1, slots).
