Programming in *.f90 free format with PETSc

2007-08-09 Thread Ben Tay
Hi, when I changed my global.F to global.f90, I was told that PETSC_COMM_SELF, PETSC_NULL_INTEGER and PETSC_NULL_CHARACTER does not have a type. I declare MPI_Comm PETSC_COMM_SELF and it works So, what about the other 2? You mention to use integer NORM_MAX parameter NORM_MAX=3 What values

Conversion matrix from Ellpack-Itpack to CSR to PETSc format

2007-08-09 Thread Ben Tay
Hi, My original matrix is stored in Ellpack-Itpack format, which is used by the NSPCG solver. I have problems when I insert the values of the matrix into a PETSc matrix. I guessed I made some mistakes but I can't find where during debugging. So I intent to just convert from the Ellpack-Itpack

Programming in *.f90 free format with PETSc

2007-08-09 Thread Satish Balay
On Thu, 9 Aug 2007, Ben Tay wrote: Hi, when I changed my global.F to global.f90, Any perticular reason why you keep using .f90 suffix even though I've recommended using .F90 suffix [for preprocessed free form] a few times? I was told that PETSC_COMM_SELF, PETSC_NULL_INTEGER and

Conversion matrix from Ellpack-Itpack to CSR to PETSc format

2007-08-09 Thread Satish Balay
- make sure the input to MatCreateSeqAIJWithArrays() is correct as per the example in the manpage - run it in the debugger to determine the actual cause of the problem Satish On Thu, 9 Aug 2007, Ben Tay wrote: Hi, My original matrix is stored in Ellpack-Itpack format, which is used by

Programming in *.f90 free format with PETSc

2007-08-09 Thread Ben Tay
Hi, Guess I'm too used to typing .f90 ;-) I've changed it to .F90 before but perhaps at that time the error I got didn't disappear so I didn't bother after that. I'm working in windows so I thought the capital letter doesn't really matter. Moreover, .f90 also works with my ifort in

Programming in *.f90 free format with PETSc

2007-08-09 Thread Satish Balay
On Thu, 9 Aug 2007, Ben Tay wrote: Hi, Guess I'm too used to typing .f90 ;-) I've changed it to .F90 before but perhaps at that time the error I got didn't disappear so I didn't bother after that. I'm sorry - but you can't keep silently discarding the sugestions we make and keep

Programming in *.f90 free format with PETSc

2007-08-09 Thread Ben Tay
Hi Satish, I am sorry if I have made you angry. I may have missed out some important points which you tried to highlight. I was converting several of my .F fixed format files to .f90 (or .F90) free format and some files which don't need declaration of PETSc type variable worked while some

Problem with mpicxx

2007-08-09 Thread John R. Wicks
I would like to define a class with a matrix as an member: class Foo { public: Mat A; }; I would expect that when an instance of Foo is created, A should be initialized, just as it would be if it were declared as ordinary variable in C: int main (int argc,char **args) { Mat A; ...

Problem with mpicxx

2007-08-09 Thread Matthew Knepley
Mat is just a typedef for a pointer, so NULL initialization is correct. You should put a call to MatCreate() in the constructor if you want the object to be initialized. Thanks, Matt On 8/9/07, John R. Wicks jwicks at cs.brown.edu wrote: I would like to define a class with a matrix as an

Programming in *.f90 free format with PETSc

2007-08-09 Thread Satish Balay
However, doing this gave me more errors. Hence, I've followed another If you get errors with the recommended model - you sould report the erros [not silently try something else - and then report erros with this something else] I can't help you anymore unless you can report problems with a

Programming in *.f90 free format with PETSc

2007-08-09 Thread Satish Balay
On Fri, 10 Aug 2007, Ben Tay wrote: The strange thing is when I try to compile on my windows's visual fortran, it gives lots of error. The errors all point to mpif.h. Some errors are: d:\cygwin\codes\MPICH\SDK\include\mpif.h(1) : Error: Syntax error, found END-OF-STATEMENT when expecting