When the valid data length is an odd number, how to replicate before SetSlots?

If the valid data in the ciphertext is abc, and N=32. The number of valid data cannot be divided by N. How to replicate it in this case?

The simplest approach is to pad abc to the next power of two, i.e., abc0. This will allow you to use all existing methods, like EvalSum* with logarithmic complexity. If you want to clone abc (w/o padding), more involved (and potentially less efficient) algorithms would be needed. For this, I suggest looking at the slot replication contribution by Shai Halevi at GitHub - openfheorg/contrib: Community contributions to the OpenFHE project (note that this capability is not officially supported by the core OpenFHE team as it is not part of the main library.).