[petsc-users] VecGetArrayReadF90 with gfortran

Satish Balay balay at mcs.anl.gov
Fri Mar 23 11:27:50 CDT 2018


I'm attaching the modified code - that appears to work fine for me. My changes are:

1. use .F90 suffix - so the compiler does the f90 freeform/preprocessing automatically
2. remove slepc references and use petsc only
3. compile with a petsc formatted makefile
4. replace complex with real*8 - thats compatible with PetscScalar

So perhaps you can modify your version of test code - to be closer to
this one [or vice versa] to see what is triggering the difference in
behavior.

Satish

On Fri, 23 Mar 2018, Samuel Lanthaler wrote:

> Hi all,
> 
> I am having trouble using the function VecGetArrayReadF90 under gfortran. I
> have created a minimal example and put it in the attachment. Basically, it
> appears that the input pointer is empty upon return from
> VecGetArrayReadF90. The code runs fine, when compiled with ifort, so I
> don't know what's going on.
> 
> I am attaching the code and makefile that I used, as well as the command
> line output that I can see. Though the errors are just to do with the fact
> that the output pointer is empty, so the command line output is not all
> that helpful...
> 
> Thanks in advance for your help!
> Sam
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ex1f.F90
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180323/6e6cbe2c/attachment.ksh>
-------------- next part --------------
CFLAGS	         =
FFLAGS	         =
CPPFLAGS         =
FPPFLAGS         =

include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules

ex1f: ex1f.o  chkopts
	-${FLINKER} -o ex1f ex1f.o  ${PETSC_KSP_LIB}
	${RM} ex1f.o
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: out.log
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180323/6e6cbe2c/attachment-0001.ksh>


More information about the petsc-users mailing list