Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread TAY wee-beng
On 9/4/2014 12:31 AM, Dharmendar Reddy wrote: Hello wee-beng, What is the version of intel compiler you are using ? I use 13.1.0.146 Build 20130121, i have no issues using petsc.h90 in my fortran code. Reddy Hi Reddy, Thanks for the help. I was also using petsc.h9

Re: [petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Xiangdong
On Tue, Apr 8, 2014 at 4:45 PM, Barry Smith wrote: > >The first monitor is called BEFORE the Jacobian is ever created. So > skip mucking with the jacobian in the 0th iteration of SNES, use the > iteration argument in your SNES monitor routine. > Yes, by adding the condition iter>0 fixed the

Re: [petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Barry Smith
The first monitor is called BEFORE the Jacobian is ever created. So skip mucking with the jacobian in the 0th iteration of SNES, use the iteration argument in your SNES monitor routine. BTW: there is a lot of built in viewing of PETSc matrices you can do without writing your own monitor.

Re: [petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Matthew Knepley
On Tue, Apr 8, 2014 at 3:18 PM, Xiangdong wrote: > Hello everyone, > > I have a question about the usage of SNESGetJacobian(). > > When I added the following three lines to the snes Monitor function in ex3 > for viewing the Jacobian matrix: > > Mat Jmat; > ierr = SNESGetJacobian(snes,&Jmat,NULL,N

[petsc-users] SNESGetJacobian issue when added to snes/ex3.c

2014-04-08 Thread Xiangdong
Hello everyone, I have a question about the usage of SNESGetJacobian(). When I added the following three lines to the snes Monitor function in ex3 for viewing the Jacobian matrix: Mat Jmat; ierr = SNESGetJacobian(snes,&Jmat,NULL,NULL,NULL); CHKERRQ(ierr); ierr = MatView(Jamt, PETSC_VIEWER_STDOUT

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread Dharmendar Reddy
Hello wee-beng, What is the version of intel compiler you are using ? I use 13.1.0.146 Build 20130121, i have no issues using petsc.h90 in my fortran code. Reddy On Tue, Apr 8, 2014 at 7:15 AM, TAY wee-beng wrote: > Hi Barry, > > Thanks for the advice. It took me a wh

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread Jed Brown
TAY wee-beng writes: > Thanks for the advice. It took me a while to compile and build > successfully with gfortran due to the stricter rules and entirely > different options. Writing portable standards-compliant code pays off. > But the most problematic thing was that most clusters I work wit

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread TAY wee-beng
Hi Barry, Thanks for the advice. It took me a while to compile and build successfully with gfortran due to the stricter rules and entirely different options. But the most problematic thing was that most clusters I work with use old versions of gcc/gfortran. With the gcc/gfortran tied to the

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread Barry Smith
You should never get yourself in a position where you “have to” use a particular compiler. Strive to have portable makefiles that don’t depend on the compiler (with PETSc makefiles this is easy) and to have portable code that doesn’t depend on the compiler. Then switching between compilers t

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread TAY wee-beng
On 8/4/2014 7:39 PM, Jed Brown wrote: TAY wee-beng writes: My impression was intel is mostly faster. However, does it apply to gfortran too? Is it also faster for a lot of code than Intel fortran? I'll give it a go if it's so. However, I remember changing a no. of options to build and in the en

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread Jed Brown
TAY wee-beng writes: > My impression was intel is mostly faster. However, does it apply to > gfortran too? Is it also faster for a lot of code than Intel fortran? > I'll give it a go if it's so. However, I remember changing a no. of > options to build and in the end, it was slower. that's a few

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread Matthew Knepley
On Tue, Apr 8, 2014 at 6:26 AM, TAY wee-beng wrote: > On 8/4/2014 7:58 AM, Matthew Knepley wrote: > > On Mon, Apr 7, 2014 at 6:46 PM, TAY wee-beng wrote: > >> On 8/4/2014 12:40 AM, Matthew Knepley wrote: >> >> How about just including petsc.h90 so you get everything. >> >>Thanks, >> >>

Re: [petsc-users] Intel Internal compiler error: segmentation violation signal raised

2014-04-08 Thread TAY wee-beng
On 8/4/2014 7:58 AM, Matthew Knepley wrote: On Mon, Apr 7, 2014 at 6:46 PM, TAY wee-beng > wrote: On 8/4/2014 12:40 AM, Matthew Knepley wrote: How about just including petsc.h90 so you get everything. Thanks, Matt Sorry this is my 2nd emai