[petsc-users] Error during compiling my own code
Wee-Beng Tay
zonexo at gmail.com
Thu Apr 15 23:13:16 CDT 2010
Hi Matt,
Nope, not in the file I'm trying to compile. Everything seems fine before.
On Fri, Apr 16, 2010 at 12:09 PM, Matthew Knepley <knepley at gmail.com> wrote:
> It looks like you have conflicting definitions. Did you include "use mpi"?
>
> Matt
>
>
> On Thu, Apr 15, 2010 at 10:53 PM, Wee-Beng Tay <zonexo at gmail.com> wrote:
>
>> Hi Matt,
>>
>> I'm using petsc-3.1-p0. But it's now working. I only use 1 #include
>> "finclude/petsc.h" now.
>>
>> However when another of my f90 file has mpi command inside, I got the
>> error:
>>
>> /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]
>> INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
>> ---------------^
>> /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]
>> INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
>> ---------------------------^
>> /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]
>> INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR
>> ------------------------------------^
>>
>> What's happening now again?
>>
>> Thanks!
>>
>>
>>
>> On Fri, Apr 16, 2010 at 11:38 AM, Matthew Knepley <knepley at gmail.com>wrote:
>>
>>> If you are using petsc-dev, you only need petsc.h
>>>
>>> Matt
>>>
>>>
>>> On Thu, Apr 15, 2010 at 10:27 PM, Wee-Beng Tay <zonexo at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have successfully built the PETSc libraries no my linux system.
>>>>
>>>> make ex1f also works.
>>>>
>>>> However, when compiling my own code, I got the error:
>>>>
>>>> [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
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_1
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_2
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_FROBENIUS
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_INFINITY
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_MAX
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NORM_1_AND_2
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) NOT_SET_VALUES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) INSERT_VALUES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) ADD_VALUES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) MAX_VALUES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) SCATTER_FORWARD
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) SCATTER_REVERSE
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) SCATTER_FORWARD_LOCAL
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) SCATTER_REVERSE_LOCAL
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) SCATTER_LOCAL
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) VEC_IGNORE_OFF_PROC_ENTRIES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) VEC_IGNORE_NEGATIVE_INDICES
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) VECOP_VIEW
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) VECOP_LOADINTOVECTOR
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) MAT_FLUSH_ASSEMBLY
>>>> -----------------------------------------^
>>>> /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]
>>>> integer(kind=selected_int_kind(5)) MAT_FINAL_ASSEMBLY
>>>> -----------------------------------------^
>>>> /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
>>>>
>>>> I don't remember having this error in prev version of PETSc. May I know
>>>> what went wrong?
>>>>
>>>> The 1st few lines of my code are:
>>>>
>>>> module global_data
>>>>
>>>> implicit none
>>>>
>>>> save
>>>>
>>>> #include "finclude/petsc.h"
>>>> #include "finclude/petscvec.h"
>>>> #include "finclude/petscmat.h"
>>>> #include "finclude/petscksp.h"
>>>> #include "finclude/petscpc.h"
>>>> #include "finclude/petscsys.h"
>>>>
>>>>
>>>>
>>>> integer ::
>>>> size_x,size_y,Total_time_step,new_start,interval,gridgen,safe_int,OS,airfoil_no
>>>>
>>>> integer ::
>>>> steady,quasi_steady,Total_k,time,mom_solver,poisson_solver,start_time,motion
>>>>
>>>> !size_x must be in multiples of 37/32/36/40/55/41, !size_y must be
>>>> in multiples of 26/16/36
>>>>
>>>> !gridgen1 - 32x20, gridgen4 - 30x22, gridgen5 - 30x24
>>>>
>>>> real(8) :: CFL, Re, scheme, B, AA, BB,AB,
>>>> ld,air_centy,Pi,hy0,k0,freq,phase_ang,theta0,loc_rot
>>>>
>>>> real(8) :: time_sta,act_time,vel_h,vel_hn,inv_Re
>>>>
>>>> Thanks alot!
>>>>
>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their
>>> experiments is infinitely more interesting than any results to which their
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100416/8702923c/attachment-0001.htm>
More information about the petsc-users
mailing list