<div dir="ltr"><div dir="ltr"><div>This can be tracked down to n vs N being used. The vector in the second loop is created using N while MatCreateVecsFFTW uses n (for real numbers). n!=N and hence the error. <br><br></div>If the lines 50/51 and line 91 are switched to
MatCreateVecsFFW instead of MatGetVecs and VecCreateSeq respectively, the example would work for real numbers as well.<br></div></div>