- edited description
Changing PETSc parameters between solves causes segfault
I have a code like this
dolfin_set("Krylov monitor convergence",true); //default is false
// lots of supposedly unrelated code
pde1 = LinearPDE(...);
pde2 = LinearPDE(...);
// lots of supposedly unrelated code
while (...)
for(a few times)
pde1->solve()
pde2->solve()
which works just fine. However, if I change it to
// lots of supposedly unrelated code
pde1 = LinearPDE(...);
pde2 = LinearPDE(...);
// lots of supposedly unrelated code
while (...)
for(a few times)
pde1->solve()
dolfin_set("Krylov monitor convergence",true); //default is false
pde2->solve()
dolfin_set("Krylov monitor convergence",false); //default is false
then I get a segmentation fault message from PETSc that comes from one of these two lines
dolfin_set("Krylov monitor convergence",true); //default is false
pde2.solve()
Is there anything special that I should do to make this work?
Comments (12)
-
Account Deleted reporter -
For which version of PETSc?
-
Account Deleted reporter PETSc version 3.7.3 from the FEniCS Ubuntu PPA.
-
Account Deleted reporter Sorry, please ignore my previous reply, I was looking at the wrong thing :D This happens on beskow with their petsc libraries. I cannot check the exact version now because beskow is down for maintenance.
-
Account Deleted reporter Ok, it happens using module
cray-petsc/3.6.1.0
on Beskow. -
Ok, but can you reproduce the problem on another platform? If not, you have to check that you have the correct version of all the aux. modules loaded on the Cray.
-
Account Deleted reporter I can try to do that. Meanwhile, this is the list of modules I'm using
#! Currently Loaded Modulefiles: 1) modules/3.2.6.7 12) Base-opts/1.0.2-1.0502.57047.1.1.ari 23) pdc-utils/0.0 2) nodestat/2.2-1.0502.58998.2.7.ari 13) craype-network-aries 24) cray-tpsl/1.5.2 3) sdb/1.0-1.0502.58450.3.27.ari 14) craype/2.2.1 25) boost/1.63.0-gcc-4.9.1 4) alps/5.2.3-2.0502.9295.14.14.ari 15) craype-haswell 26) cmake/3.7.1 5) lustre-cray_ari_s/2.5_3.0.101_0.35.1_1.0502.8640.15.1-1.0502.18911.12.4 16) cray-mpich/7.0.4 27) cray-petsc/3.6.1.0 6) udreg/2.3.2-1.0502.9889.2.20.ari 17) slurm/slurm-14.11.9 28) intel/14.0.4.211 7) ugni/6.0-1.0502.10245.9.9.ari 18) openssh/5.3p1-with-pam-gsskex-20100124 29) cray-libsci/13.0.1 8) gni-headers/4.0-1.0502.10317.9.2.ari 19) openafs/1.6.17-3.0.101-0.35.1_1.0502.8640-cray_ari_s 30) pmi/5.0.5-1.0000.10300.134.8.ari 9) dmapp/7.0.1-1.0502.10246.8.47.ari 20) heimdal/1.5.2 31) atp/1.7.5 10) xpmem/0.1-2.0502.57015.1.15.ari 21) snic-env/1.0.0 32) PrgEnv-intel/5.2.56 11) hss-llm/7.2.0 22) slurm-utils/0.1
which I load with
#! module load cray-tpsl/1.5.2 boost cmake cray-petsc/3.6.1.0 module swap PrgEnv-cray PrgEnv-intel
Do you see anything wrong with this?
-
How do you run configure? Properly or forcing autoconf to pick up PETSc?
-
Account Deleted reporter This is what I have in
config.log
:#! $ ./configure --prefix=/cfs/nobackup/m/mleoni/mySoftware/fenics-hpc/install --with-pic --enable-function-cache --enable-optimize-p1 --disable-boost-tr1 --with-parmetis --with-petsc --enable-mpi --enable-mpi-io --disable-progress-bar --disable-xmltest --enable-ufl --with-gts
-
Ok, seems to be correct. And I assume you get something like
Cray PETSc ..... yes
when you run it? Then we need to try on a different platform to rule out if this is a Cray issue or (most likely) and issue in our interface.
-
Account Deleted reporter Yes, I get that in the configure output. I will try to reproduce it on another architecture!
-
Account Deleted reporter I haven't been able to reproduce this bug regularly, and in several cases the code seemed to work as expected. We can mark this as "Invalid" for now and perhaps get back to it later if the problem shows up again.
- Log in to comment