fix slepc formula and implement both debug and opt arches