[petsc-users] Compiling problem after upgrading to PETSc 3.8.3
Smith, Barry F.
bsmith at mcs.anl.gov
Tue Feb 20 08:35:09 CST 2018
Please run a clean compile of everything and cut and paste all the output. This will make it much easier to debug than trying to understand your snippets of what is going wrong.
> On Feb 20, 2018, at 1:56 AM, TAY Wee Beng <tsltaywb at nus.edu.sg> wrote:
>
> Hi,
>
> 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:
>
> math_routine.F90:1333:21:
>
> call subb(orig,vert1,tvec)
> 1
> Error: Invalid procedure argument at (1)
> math_routine.F90:1339:18:
>
> qvec = cross_pdt2(tvec,edge1)
> 1
> Error: Invalid procedure argument at (1)
> math_routine.F90:1345:21:
>
> uu = dot_product(tvec,pvec)
> 1
> Error: ‘vector_a’ argument of ‘dot_product’ intrinsic at (1) must be
> numeric or LOGICAL
> math_routine.F90:1371:21:
>
> uu = dot_product(tvec,pvec)
>
> These errors were not present before. My variables are mostly vectors:
>
> real(8), intent(in) ::
> orig(3),infinity(3),vert1(3),vert2(3),vert3(3),normal(3)
>
> 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: tsltaywb at nus.edu.sg
> http://www.temasek-labs.nus.edu.sg/program/program_aeroexperimental_tsltaywb.php
> Personal research webpage: http://tayweebeng.wixsite.com/website
> Youtube research showcase: https://www.youtube.com/channel/UC72ZHtvQNMpNs2uRTSToiLA
> 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.
More information about the petsc-users
mailing list