Hello,<br>I am so sorry for that, but you are right. Thanks for your advice and I will pay more attention from now on. Thank you very much. <br>Weidong<br><br><div class="gmail_quote">On Tue, Mar 10, 2009 at 6:43 PM, Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
    The order that libraries are listed in a makefile IS IMPORTANT.<div class="im"><br>
<br>
DDLIBSTATIC := $(ADDLIBSTATIC) $(PETSC_LIBDIR)/libmpiuni.a $(PETSC_LIBDIR)/libpetsccontrib.a $(PETSC_LIBDIR)/libpetscksp.a $(PETSC_LIBDIR)/libpetscsnes.a $(PETSC_LIBDIR)/libpetscvec.a $(PETSC_LIBDIR)/libpetsc.a $(PETSC_LIBDIR)/libpetscdm.a $(PETSC_LIBDIR)/libpetscmat.a $(PETSC_LIBDIR)/libpetscts.a<br>

<br></div>
Here you have some crazy, nonsense ordering of the libraries. Whoever made this &quot;makefile&quot; doesn&#39;t have a clue about unix; you cannot just dump random strings of characters into files and expect to develop software! It requires some basic understanding of what you are doing.<br>
<font color="#888888">
<br>
<br>
   Barry</font><div><div></div><div class="h5"><br>
<br>
<br>
On Mar 10, 2009, at 11:56 AM, Wei-Dong Lian wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
Following are my makefile for link petsc. Before I configure with option fortrun compiler with gfortran, it generates the shared library, now in my computer with g77, so there is no shared library, I use the static library as below.<br>

Thanks for your information.<br>
Weidong<br>
<br>
****************************************************<br>
#FOR PETSC<br>
ifdef HAVE_PETSC<br>
DEFS := $(DEFS) -DHAVE_PETSC<br>
PETSC_DIR=$(DEVROOT)/Solver/petscSeq<br>
PETSC_ARCH=$(ARCHOS)<br>
PETSC_LIBDIR := $(PETSC_DIR)/$(PETSC_ARCH)/lib<br>
INCLUDES := $(INCLUDES) -I$(PETSC_DIR)/include -I$(PETSC_DIR)/include/mpiuni -I$(PETSC_DIR)/include/adic -I$(PETSC_DIR)/$(PETSC_ARCH)/include<br>
<br>
ADDLIB := $(ADDLIB) -llapack<br>
#ADDLIB := $(ADDLIB) -L$(PETSC_LIBDIR) -Wl,-rpath,$(PETSC_LIBDIR) -lpetsccontrib -lpetscksp -lpetscsnes -lpetscvec -lpetsc -lpetscdm -lpetscmat -lpetscts<br>
ADDLIBSTATIC := $(ADDLIBSTATIC) $(PETSC_LIBDIR)/libmpiuni.a $(PETSC_LIBDIR)/libpetsccontrib.a $(PETSC_LIBDIR)/libpetscksp.a $(PETSC_LIBDIR)/libpetscsnes.a $(PETSC_LIBDIR)/libpetscvec.a $(PETSC_LIBDIR)/libpetsc.a $(PETSC_LIBDIR)/libpetscdm.a $(PETSC_LIBDIR)/libpetscmat.a $(PETSC_LIBDIR)/libpetscts.a<br>

<br>
endif<br>
#End For PETSC<br>
*****************************************************************************************<br>
On Tue, Mar 10, 2009 at 5:34 PM, Wei-Dong Lian &lt;<a href="mailto:weidong.lian@gmail.com" target="_blank">weidong.lian@gmail.com</a>&gt; wrote:<br>
Hi,<br>
I did not use the PETSc makefiles. First I do not know where it located. Second, I have configured my makefile to link my programme, before it worked, that&#39;s in another computer, the difference lies in the fact that this time in the lib directory, there were not *.so library, but *.lib library. Maybe I think it is the problem.<br>

Thanks.<br>
Weidong<br>
<br>
<br>
On Tue, Mar 10, 2009 at 5:07 PM, Matthew Knepley &lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt; wrote:<br>
On Tue, Mar 10, 2009 at 10:59 AM, Wei-Dong Lian &lt;<a href="mailto:weidong.lian@gmail.com" target="_blank">weidong.lian@gmail.com</a>&gt; wrote:<br>
Hello everyone,<br>
<br>
I compiled the petsc-3.0.0-p3 with GCC 3.4.3 under linux 64. But the compiler gave me the following information, see result_1.<br>
I also ran the &quot;make test&quot; and it worked successfully, but when I linked petsc to compile my programme, it told me that information see results_2.<br>
Any suggestion will be appreciated.<br>
Thank you in advance.<br>
<br>
1) Any report like this should be sent to <a href="mailto:petsc-maint@mcs.anl.gov" target="_blank">petsc-maint@mcs.anl.gov</a> because we need configure.log and make*.log.<br>
<br>
2) The warning about -PIC comes about because we cannot parse the warning messages from your compiler. We can try to<br>
     add this in when we get the log.<br>
<br>
3) If &#39;make test&#39; works and your link does not, then you have constructed your link line incorrectly. Are you using the PETSc makefiles?<br>
<br>
  Matt<br>
<br>
<br>
Weidong<br>
<br>
$$$$$$$$$$$$$$$$$$$$$Result_1$$$$$$$$$$$$$$$$$$$$$$$$$$$$$<br>
/ftn-custom<br>
g++: option « -PIC » non reconnue<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/explicit<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/explicit/euler<br>
g++: option « -PIC » non reconnue<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/explicit/rk<br>
g++: option « -PIC » non reconnue<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/explicit/rk/ftn-auto<br>
g++: option « -PIC » non reconnue<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/implicit<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/implicit/beuler<br>
g++: option « -PIC » non reconnue<br>
libfast in: /usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/ts/impls/implicit/cn<br>
<br>
#####################################results_2################################<br>
/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x2aaf): In function `DAGetWireBasketInterpolation(_p_DA*, _p_Mat*, MatReuse, _p_Mat**)&#39;:<br>
/usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/dm/da/utils/daint.c:201: undefined reference to `PetscTableCreate(int, _n_PetscTable**)&#39;<br>
/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x2b3d):/usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/dm/da/utils/daint.c:203: undefined reference to `PetscTableAddCount(_n_PetscTable*, int)&#39;<br>

/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x2ba1):/usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/dm/da/utils/daint.c:205: undefined reference to `PetscTableGetCount(_n_PetscTable*, int*)&#39;<br>

/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x2d24):/usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/dm/da/utils/daint.c:209: undefined reference to `PetscTableFind(_n_PetscTable*, int, int*)&#39;<br>

/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x2d8d):/usr/local/temp/lian/Develop/latest/Solver/petscSeq/src/dm/da/utils/daint.c:212: undefined reference to `PetscTableDestroy(_n_PetscTable*)&#39;<br>

/usr/local/temp/lian/Develop/Solver/petscSeq/x86_64_linux/lib/libpetscdm.a(daint.o)(.text+0x5adf): In function `DAGetFaceInterpolation(_p_DA*, _p_Mat*, MatReuse, _p_Mat**)&#39;:<br>
#####################################################################################<br>
<br>
<br>
My configuration of petsc:<br>
&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;<br>

<br>
                            Pushing language C<br>
                            Popping language C<br>
                            Pushing language Cxx<br>
                            Popping language Cxx<br>
                            Pushing language FC<br>
                            Popping language FC<br>
sh: /bin/sh /usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/BuildSystem/config/packages/config.gue<br>
ss<br>
Executing: /bin/sh /usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/BuildSystem/config/packages/con<br>
fig.guess<br>
sh: x86_64-unknown-linux-gnu<br>
<br>
sh: /bin/sh /usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/BuildSystem/config/packages/config.sub<br>
 x86_64-unknown-linux-gnu<br>
<br>
Executing: /bin/sh /usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/BuildSystem/config/packages/con<br>
fig.sub x86_64-unknown-linux-gnu<br>
<br>
sh: x86_64-unknown-linux-gnu<br>
<br>
<br>
================================================================================<br>
================================================================================<br>
Starting Configure Run at Tue Mar 10 16:23:30 2009<br>
Configure Options: --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --with-cc=gcc --with-fc=g77 --with-cx<br>
x=g++ --with-mpi=0 --with-x=0 --with-clanguage=cxx --with-shared=1 --with-dynamic=1<br>
Working directory: /usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3<br>
Machine uname:<br>
(&#39;Linux&#39;, &#39;frioul&#39;, &#39;2.6.9-22.ELsmp&#39;, &#39;#1 SMP Sat Oct 8 21:32:36 BST 2005&#39;, &#39;x86_64&#39;)<br>
Python version:<br>
2.3.4 (#1, Feb 17 2005, 21:01:10)<br>
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)]<br>
================================================================================<br>
        Pushing language C<br>
        Popping language C<br>
        Pushing language Cxx<br>
        Popping language Cxx<br>
        Pushing language FC<br>
        Popping language FC<br>
================================================================================<br>
TEST configureExternalPackagesDir from config.framework(/usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/c<br>
onfig/BuildSystem/config/framework.py:815)<br>
TESTING: configureExternalPackagesDir from config.framework(config/BuildSystem/config/framework.py:815)<br>
================================================================================<br>
TEST configureLibrary from PETSc.packages.NetCDF(/usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/P<br>
ETSc/packages/NetCDF.py:10)<br>
TESTING: configureLibrary from PETSc.packages.NetCDF(config/PETSc/packages/NetCDF.py:10)<br>
  Find a NetCDF installation and check if it can work with PETSc<br>
================================================================================<br>
TEST configureLibrary from PETSc.packages.PVODE(/usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/config/PE<br>
TSc/packages/PVODE.py:10)<br>
TESTING: configureLibrary from PETSc.packages.PVODE(config/PETSc/packages/PVODE.py:10)<br>
  Find a PVODE installation and check if it can work with PETSc<br>
================================================================================<br>
TEST configureDebuggers from PETSc.utilities.debuggers(/usr/local/temp/lian/Develop/latest/Solver/OpenSource/petsc-3.0.0-p3/co<br>
nfig/PETSc/utilities/debuggers.py:22)<br>
TESTING: configureDebuggers from PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22)<br>
  Find a default debugger and determine its arguments<br>
<br>
<br>
<br>
<br>
-- <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>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>