I was previously using PETSc 3.7.6 on different clusters with both Intel
Fortran and GNU Fortran. After upgrading, I met some problems when
trying to compile:

On Intel Fortran:

Previously, I was using:

#include "petsc/finclude/petsc.h90"

in *.F90 when requires the use of PETSc

I read in the change log that h90 is no longer there and so I replaced
with #include "petsc/finclude/petsc.h"

It worked. But I also have some *.F90 which do not use PETSc. However,
they use some modules which uses PETSc.

Now I can't compile them. The error is :

math_routine.f90(3): error #7002: Error in opening the compiled module
file.  Check INCLUDE paths.   [PETSC]
use mpi_subroutines

mpi_subroutines is a module which uses PETSc, and it compiled w/o problem.

The solution is that I have to compile e.g.  math_routine.F90 as if they
use PETSc, by including PETSc include and lib files.

May I know why this is so? It was not necessary before.

Anyway, it managed to compile until it reached hypre.F90.

Previously, due to some bugs, I have to compile hypre with the -r8
option. Also, I have to use:

integer(8) mpi_comm

mpi_comm = MPI_COMM_WORLD

to make my codes work with HYPRE.

But now, compiling gives the error:

hypre.F90(11): error #6401: The attributes of this name conflict with
those made accessible by a USE statement.   [MPI_COMM]
integer(8) mpi_comm
hypre.F90(84): error #6478: A type-name must not be used as a
variable.   [MPI_COMM]
    mpi_comm = MPI_COMM_WORLD
hypre.F90(84): error #6303: The assignment operation or the binary
expression operation is invalid for the data types of the two
operands.   [1140850688]
    mpi_comm = MPI_COMM_WORLD
hypre.F90(100): error #6478: A type-name must not be used as a
variable.   [MPI_COMM]
        call HYPRE_StructGridCreate(mpi_comm, 3, grid_hypre, ierr)

What's actually happening? Why can't I compile now?

On GNU gfortran:

I tried to use similar tactics as above here. However, when compiling
math_routine.F90, I got the error:


 call subb(orig,vert1,tvec)
Error: Invalid procedure argument at (1)

 qvec = cross_pdt2(tvec,edge1)
Error: Invalid procedure argument at (1)

     uu = dot_product(tvec,pvec)
Error: ‘vector_a’ argument of ‘dot_product’ intrinsic at (1) must be
numeric or LOGICAL

     uu = dot_product(tvec,pvec)

These errors were not present before. My variables are mostly vectors:

real(8), intent(in) ::

real(8) :: uu,vv,dir(3)

real(8) :: edge1(3),edge2(3),tvec(3),pvec(3),qvec(3),det,inv_det,epsilon,d,t

I wonder what happened?

Please advice.

Thank you very much.

Yours sincerely,

TAY Wee-Beng 郑伟明
Research Scientist
Experimental AeroScience Group
Temasek Laboratories
National University of Singapore
T-Lab Building
5A, Engineering Drive 1, #02-02
Singapore 117411
Phone: +65 65167330
E-mail: tslta...@nus.edu.sg
Personal research webpage: http://tayweebeng.wixsite.com/website
Youtube research showcase: 
linkedin: www.linkedin.com/in/tay-weebeng


Important: This email is confidential and may be privileged. If you are not the 
intended recipient, please delete it and notify us immediately; you should not 
copy or use it for any purpose, nor disclose its contents to any other person. 
Thank you.

Reply via email to