<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Sorry I sent an email from the wrong email address. Anyway,
      here's the email:</p>
    <p>
    </p>
    <div class="moz-text-flowed" style="font-family: -moz-fixed;
      font-size: 14px;" lang="x-unicode">Hi,
      <br>
      <br>
      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:
      <br>
      <br>
      On Intel Fortran:
      <br>
      <br>
      Previously, I was using:
      <br>
      <br>
      #include "petsc/finclude/petsc.h90"
      <br>
      <br>
      in *.F90 when requires the use of PETSc
      <br>
      <br>
      I read in the change log that h90 is no longer there and so I
      replaced with #include "petsc/finclude/petsc.h"
      <br>
      <br>
      It worked. But I also have some *.F90 which do not use PETSc.
      However, they use some modules which uses PETSc.
      <br>
      <br>
      Now I can't compile them. The error is :
      <br>
      <br>
      math_routine.f90(3): error #7002: Error in opening the compiled
      module file.  Check INCLUDE paths.   [PETSC]
      <br>
      use mpi_subroutines
      <br>
      <br>
      mpi_subroutines is a module which uses PETSc, and it compiled w/o
      problem.
      <br>
      <br>
      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.
      <br>
      <br>
      May I know why this is so? It was not necessary before.
      <br>
      <br>
      Anyway, it managed to compile until it reached hypre.F90.
      <br>
      <br>
      Previously, due to some bugs, I have to compile hypre with the -r8
      option. Also, I have to use:
      <br>
      <br>
      integer(8) mpi_comm
      <br>
      <br>
      mpi_comm = MPI_COMM_WORLD
      <br>
      <br>
      to make my codes work with HYPRE.
      <br>
      <br>
      But now, compiling gives the error:
      <br>
      <br>
      hypre.F90(11): error #6401: The attributes of this name conflict
      with those made accessible by a USE statement.   [MPI_COMM]
      <br>
      integer(8) mpi_comm
      <br>
      --------------------------------------^
      <br>
      hypre.F90(84): error #6478: A type-name must not be used as a
      variable.   [MPI_COMM]
      <br>
          mpi_comm = MPI_COMM_WORLD
      <br>
      ----^
      <br>
      hypre.F90(84): error #6303: The assignment operation or the binary
      expression operation is invalid for the data types of the two
      operands.   [1140850688]
      <br>
          mpi_comm = MPI_COMM_WORLD
      <br>
      ---------------^
      <br>
      hypre.F90(100): error #6478: A type-name must not be used as a
      variable.   [MPI_COMM]
      <br>
              call HYPRE_StructGridCreate(mpi_comm, 3, grid_hypre, ierr)
      <br>
      ...
      <br>
      <br>
      What's actually happening? Why can't I compile now?
      <br>
      <br>
      On GNU gfortran:
      <br>
      <br>
      I tried to use similar tactics as above here. However, when
      compiling math_routine.F90, I got the error:
      <br>
      <br>
      math_routine.F90:1333:21:
      <br>
      <br>
       call subb(orig,vert1,tvec)
      <br>
                           1
      <br>
      Error: Invalid procedure argument at (1)
      <br>
      math_routine.F90:1339:18:
      <br>
      <br>
       qvec = cross_pdt2(tvec,edge1)
      <br>
                        1
      <br>
      Error: Invalid procedure argument at (1)
      <br>
      math_routine.F90:1345:21:
      <br>
      <br>
           uu = dot_product(tvec,pvec)
      <br>
                           1
      <br>
      Error: ‘vector_a’ argument of ‘dot_product’ intrinsic at (1) must
      be numeric or LOGICAL
      <br>
      math_routine.F90:1371:21:
      <br>
      <br>
           uu = dot_product(tvec,pvec)
      <br>
      <br>
      These errors were not present before. My variables are mostly
      vectors:
      <br>
      <br>
      real(8), intent(in) ::
      orig(3),infinity(3),vert1(3),vert2(3),vert3(3),normal(3)
      <br>
      <br>
      real(8) :: uu,vv,dir(3)
      <br>
      <br>
      real(8) ::
      edge1(3),edge2(3),tvec(3),pvec(3),qvec(3),det,inv_det,epsilon,d,t
      <br>
      <br>
      I wonder what happened?
      <br>
      <br>
      Please advice.
      <br>
      <br>
      <br>
    </div>
    <pre class="moz-signature" cols="72">-- 
Thank you very much.

Yours sincerely,

================================================
TAY Wee-Beng (Zheng Weiming) 郑伟明
Personal research webpage: <a class="moz-txt-link-freetext" href="http://tayweebeng.wixsite.com/website">http://tayweebeng.wixsite.com/website</a>
Youtube research showcase: <a class="moz-txt-link-freetext" href="https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA">https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA</a>
linkedin: <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/tay-weebeng">www.linkedin.com/in/tay-weebeng</a>
================================================</pre>
  </body>
</html>