Hello,
I found that the examples in CKKS producing crash, floating point exception (core dump) , on the latest version (v1.1.4).
Here’s the minimum code snippet of the crash example:
int main(void)
{
CCParams<CryptoContextCKKSRNS> parameters;
parameters.SetRingDim(32768);
parameters.SetMultiplicativeDepth(2);
parameters.SetFirstModSize(49);
parameters.SetScalingModSize(49);
CryptoContext<DCRTPoly> cc = GenCryptoContext(parameters);
cc->Enable(PKE);
cc->Enable(KEYSWITCH);
cc->Enable(LEVELEDSHE);
return 0;
}
In this case, {firstModSize, scalingModSize}
is {49, 49}
.
Also I’ve found that when {firstModSize, scalingModSize}
is {36, 36}, {32, 32}, or {30, 30}
terminates with crash.
- Note: These mod sizes are above 30. I’m aware that from the comment in #1252, mod sizes under 30 are very small and don’t offer good precision.
However, when I increase firstModSize larger than scalingModSize (in all cases), for example {firstModSize, scalingModSize} = {31, 30}
, then it just terminates normally. So I guess this crash happens due to the equality between firstModSize and scalingModsize.
I want to ask:
- Is it invalid case to have equal firstModSize and scalingModsize? If so, can you give me some reference related with?
- Anyway, I believe this is not the case can be expected… Could you please check out this unexpected behavior?
Thank you for your attention!