<div dir="ltr"><div dir="ltr"><div><div></div>Hi PETSc Developers, <br><br></div>I happen to be a user who needs 4 vectors whose layout is aligned with FFTW. The usual MatCreateVecsFFTW allows one to make 3 such vectors. To get around this I call the function twice, once with three vectors, once with one vector (and 2x NULL). This causes a strange segfault when freeing the memory with VecDestroy (for the lone vector I'm guessing). <br><br>My program runs with no issues if I create the fourth vector with VecCreateMPI (I need the 4th vector for point-wise multiply so this would be ineffiient). <br><br> To get around this problem, is there a way to ask for 4 vectors aligned to the FFTW matrix? If not is there a way to get the intended behavior from VecCreateMPI, (perhaps by using a helper function to determine the data alignment and pass to it instead of using PETSC_DECIDE)? <br><br></div><div>I'm attaching my code just in case what I'm thinking is wrong and anyone would be kind enough to point it out to me. The issue is at line 87/88. With 87, the program crashes, with 88 it works fine. <br></div><div dir="ltr"><div><div><br></div><div>Thanks in advance for the help! <br></div><div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="font-size:12.8px">Sajid Ali<br></div><div style="font-size:12.8px">Applied Physics<br></div><div style="font-size:12.8px">Northwestern University</div></div></div></div></div></div></div>