Hi Matt,<br><br>I&#39;m using petsc-3.1-p0. But it&#39;s now working. I only use 1 #include &quot;finclude/petsc.h&quot; now.<br><br>However when another of my f90 file has mpi command inside, I got the error:<br><br>/app1/mvapich2/current/include/mpif.h(9): error #6401: The attributes of this name conflict with those made accessible by a USE statement.   [MPI_SOURCE]<br>
       INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR<br>---------------^<br>/app1/mvapich2/current/include/mpif.h(9): error #6401: The attributes of this name conflict with those made accessible by a USE statement.   [MPI_TAG]<br>
       INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR<br>---------------------------^<br>/app1/mvapich2/current/include/mpif.h(9): error #6401: The attributes of this name conflict with those made accessible by a USE statement.   [MPI_ERROR]<br>
       INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR<br>------------------------------------^<br><br>What&#39;s happening now again?<br><br>Thanks!<br><br><br><div class="gmail_quote">On Fri, Apr 16, 2010 at 11:38 AM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">If you are using petsc-dev, you only need petsc.h<div><br></div><div>   Matt<div><div></div>
<div class="h5"><br><br><div class="gmail_quote">On Thu, Apr 15, 2010 at 10:27 PM, Wee-Beng Tay <span dir="ltr">&lt;<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>I have successfully built the PETSc libraries no my linux system.<br><br>make ex1f also works.<br>
<br>However, when compiling my own code, I got the error:<br>
<br>[atlas5-c01]$ /app1/mvapich2/current/bin/mpif90 -c  -O3   -I/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/include -I/home/svu/g0306332/codes/petsc-3.1-p0/include -I/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/include -I/app1/mvapich2/1.4/include -I/app1/mvapich2/current/include   -I/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/include -I/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/include -I/app1/mvapich2/1.4/include -I/app1/mvapich2/current/include    -o global.o global.F -132<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(10): error #6418: This name has already been assigned a data type.   [NORM_1]<br>      integer(kind=selected_int_kind(5)) NORM_1<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(11): error #6418: This name has already been assigned a data type.   [NORM_2]<br>      integer(kind=selected_int_kind(5)) NORM_2<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(12): error #6418: This name has already been assigned a data type.   [NORM_FROBENIUS]<br>      integer(kind=selected_int_kind(5)) NORM_FROBENIUS<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(13): error #6418: This name has already been assigned a data type.   [NORM_INFINITY]<br>      integer(kind=selected_int_kind(5)) NORM_INFINITY<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(14): error #6418: This name has already been assigned a data type.   [NORM_MAX]<br>      integer(kind=selected_int_kind(5)) NORM_MAX<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(15): error #6418: This name has already been assigned a data type.   [NORM_1_AND_2]<br>      integer(kind=selected_int_kind(5)) NORM_1_AND_2<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(22): error #6418: This name has already been assigned a data type.   [NOT_SET_VALUES]<br>      integer(kind=selected_int_kind(5)) NOT_SET_VALUES<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(23): error #6418: This name has already been assigned a data type.   [INSERT_VALUES]<br>      integer(kind=selected_int_kind(5)) INSERT_VALUES<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(24): error #6418: This name has already been assigned a data type.   [ADD_VALUES]<br>      integer(kind=selected_int_kind(5)) ADD_VALUES<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(25): error #6418: This name has already been assigned a data type.   [MAX_VALUES]<br>      integer(kind=selected_int_kind(5)) MAX_VALUES<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(32): error #6418: This name has already been assigned a data type.   [SCATTER_FORWARD]<br>      integer(kind=selected_int_kind(5)) SCATTER_FORWARD<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(33): error #6418: This name has already been assigned a data type.   [SCATTER_REVERSE]<br>      integer(kind=selected_int_kind(5)) SCATTER_REVERSE<br>-----------------------------------------^<br>


/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(34): error #6418: This name has already been assigned a data type.   [SCATTER_FORWARD_LOCAL]<br>      integer(kind=selected_int_kind(5)) SCATTER_FORWARD_LOCAL<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(35): error #6418: This name has already been assigned a data type.   [SCATTER_REVERSE_LOCAL]<br>      integer(kind=selected_int_kind(5)) SCATTER_REVERSE_LOCAL<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(36): error #6418: This name has already been assigned a data type.   [SCATTER_LOCAL]<br>      integer(kind=selected_int_kind(5)) SCATTER_LOCAL<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(44): error #6418: This name has already been assigned a data type.   [VEC_IGNORE_OFF_PROC_ENTRIES]<br>      integer(kind=selected_int_kind(5)) VEC_IGNORE_OFF_PROC_ENTRIES<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(45): error #6418: This name has already been assigned a data type.   [VEC_IGNORE_NEGATIVE_INDICES]<br>      integer(kind=selected_int_kind(5)) VEC_IGNORE_NEGATIVE_INDICES<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(53): error #6418: This name has already been assigned a data type.   [VECOP_VIEW]<br>      integer(kind=selected_int_kind(5)) VECOP_VIEW<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscvec.h(54): error #6418: This name has already been assigned a data type.   [VECOP_LOADINTOVECTOR]<br>      integer(kind=selected_int_kind(5)) VECOP_LOADINTOVECTOR<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscmat.h(10): error #6418: This name has already been assigned a data type.   [MAT_FLUSH_ASSEMBLY]<br>      integer(kind=selected_int_kind(5)) MAT_FLUSH_ASSEMBLY<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscmat.h(11): error #6418: This name has already been assigned a data type.   [MAT_FINAL_ASSEMBLY]<br>      integer(kind=selected_int_kind(5)) MAT_FINAL_ASSEMBLY<br>


-----------------------------------------^<br>/home/svu/g0306332/codes/petsc-3.1-p0/include/finclude/petscmat.h(17): error #6418: This name has already been assigned a data type.   [MAT_FACTO<br><br>I don&#39;t remember having this error in prev version of PETSc. May I know what went wrong?<br>


<br>The 1st few lines of my code are:<br><br>    module global_data<br><br>    implicit none<br><br>    save<br><br>#include &quot;finclude/petsc.h&quot;<br>#include &quot;finclude/petscvec.h&quot;<br>#include &quot;finclude/petscmat.h&quot;<br>


#include &quot;finclude/petscksp.h&quot;<br>#include &quot;finclude/petscpc.h&quot;<br>#include &quot;finclude/petscsys.h&quot;<br><br><br><br>    integer :: size_x,size_y,Total_time_step,new_start,interval,gridgen,safe_int,OS,airfoil_no<br>


    <br>    integer :: steady,quasi_steady,Total_k,time,mom_solver,poisson_solver,start_time,motion<br><br>    !size_x must be in multiples of 37/32/36/40/55/41, !size_y must be in multiples of 26/16/36<br><br>    !gridgen1 - 32x20, gridgen4 - 30x22, gridgen5 - 30x24<br>


<br>    real(8) :: CFL, Re, scheme, B, AA, BB,AB, ld,air_centy,Pi,hy0,k0,freq,phase_ang,theta0,loc_rot<br><br>    real(8) :: time_sta,act_time,vel_h,vel_hn,inv_Re<br><br>Thanks alot!<br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>

</div>
</blockquote></div><br>