MatNullSpace with fortran data types
Hi, I am having trouble with MatNullSPace in fortran with fortran data types enabled. I don't mind if MatNullSpace is not a f90 data type, but right now, neither the old style MatNullSpace nsp nor the more f90-ish type(MatNullSpace) nsp seem to work. galerkin:PetscF90 bourdin$ make -f makefile.MatNullSpace MatNullSpace /opt/HPC/mpich2-1.4.1p1-intel11.1/bin/mpif90 -c -fPIC -g -I/opt/HPC/petsc-3.3/include -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/include -I/opt/HPC/petsc-3.3/include/sieve -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/cbind/include -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/forbind/include -I/opt/HPC/mpich2-1.4.1p1-intel11.1/include -o MatNullSpace.o MatNullSpace.F90 MatNullSpace.F90(18): error #6457: This derived type name has not been declared. [MATNULLSPACE] type(MatNullSpace) nsp -----------^ MatNullSpace.F90(34): error #6404: This name does not have a type, and must have an explicit type. [NSP] call MatNullSpaceCreate(PETSC_COMM_WORLD,PETSC_TRUE,0,PETSC_NULL_OBJECT,nsp,ierr) ------------------------------------------------------------------------------^ compilation aborted for MatNullSpace.F90 (code 1) make: [MatNullSpace.o] Error 1 (ignored) or galerkin:PetscF90 bourdin$ make -f makefile.MatNullSpace MatNullSpace /opt/HPC/mpich2-1.4.1p1-intel11.1/bin/mpif90 -c -fPIC -g -I/opt/HPC/petsc-3.3/include -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/include -I/opt/HPC/petsc-3.3/include/sieve -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/cbind/include -I/opt/HPC/petsc-3.3/Darwin-intel11.1-mef90-g/forbind/include -I/opt/HPC/mpich2-1.4.1p1-intel11.1/include -o MatNullSpace.o MatNullSpace.F90 MatNullSpace.F90(19): error #5082: Syntax error, found IDENTIFIER 'NSP' when expecting one of: ( % : . = => MatNullSpace nsp Peeking in include/finclude, it looks like the matching fortran data type has not been declared. I added it (and that of MatFDColoring) to include/finclude/ftn-customn/petscmatdef.h90, but I still get an error when trying to compile a trivial example. What am I missing? I am attaching an simple example and the incomplete patch I though would be enough to define the fortrasn data type for MatNullSpace. Blaise -- Department of Mathematics and Center for Computation & Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
participants (1)
-
Blaise Bourdin