<div>Yes it ran successfully. I&#39;ve attached the output.</div>
<div>&nbsp;</div>
<div>thank you very much.<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/11/07, <b class="gmail_sendername">Satish Balay</b> &lt;<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Do PETSc examples work?<br><br>Send us the output from<br><br>make test<br><br>Staish<br><br>On Wed, 10 Jan 2007, Ben Tay wrote:
<br><br>&gt; Hi,<br>&gt;<br>&gt; I have a very simple fortran code. It compiles on a 32bit system with mkl<br>&gt; with no errors but on em64t, it gives &quot;undefined reference to ....&quot; error.<br>&gt;<br>&gt; It works when I compiled with the supplied blas/lapack. However if I use
<br>&gt; Intel mkl, it gives the error as stated above.<br>&gt;<br>&gt; My code is<br>&gt;<br>&gt; global.F<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; module global_data<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;implicit none<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;save<br>&gt;
<br>&gt; #include &quot;include/finclude/petsc.h&quot;<br>&gt; #include &quot;include/finclude/petscvec.h&quot;<br>&gt; #include &quot;include/finclude/petscmat.h&quot;<br>&gt; #include &quot;include/finclude/petscksp.h&quot;
<br>&gt; #include &quot;include/finclude/petscpc.h&quot;<br>&gt; #include &quot;include/finclude/petscmat.h90&quot;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer :: i,j,k<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vec&nbsp;&nbsp;&nbsp;&nbsp;xx,b_rhs,xx_uv,b_rhs_uv&nbsp;&nbsp; !&nbsp;&nbsp; /* solution vector, right hand
<br>&gt; side vector and work vector */<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mat&nbsp;&nbsp;&nbsp;&nbsp;A_mat,A_mat_uv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!&nbsp;&nbsp;/* sparse matrix */<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end module global_data<br>&gt;<br>&gt; main.f90<br>&gt;<br>&gt; program ns2d_c<br>&gt;
<br>&gt; use global_data<br>&gt;<br>&gt; implicit none<br>&gt;<br>&gt; integer :: ierr<br>&gt;<br>&gt; i=1<br>&gt;<br>&gt; call PetscInitialize(PETSC_NULL_CHARACTER,ierr)<br>&gt;<br>&gt; call MatCreateSeqAIJ(PETSC_COMM_SELF,9,9,9,PETSC_NULL_INTEGER,A_mat,ierr)
<br>&gt;<br>&gt; end program ns2d_c<br>&gt;<br>&gt;<br>&gt; The error msg is<br>&gt;<br>&gt; /tmp/ifort0JBYUf.o(.text+0x46): In function `ns2d_c&#39;:<br>&gt; /nfs/home/enduser/g0306332/test/main.F:11: undefined reference to
<br>&gt; `petscinitialize_&#39;<br>&gt; /tmp/ifort0JBYUf.o(.text+0xaf):/nfs/home/enduser/g0306332/test/main.F:13:<br>&gt; undefined reference to `matcreateseqaij_&#39;<br>&gt;<br>&gt; The compiling commands, which I rephrase from the &quot;make ex1f&quot; are
<br>&gt;<br>&gt; ifort -132 -fPIC -g -c<br>&gt; -I/nfs/lsftmp/g0306332/petsc-2.3.2-p8-I/nfs/lsftmp/g0306332/petsc-<br>&gt; 2.3.2-p8/bmake/l64-nompi-noshared<br>&gt; -I/nfs/lsftmp/g0306332/petsc-2.3.2-p8/include<br>&gt; -I/nfs/lsftmp/g0306332/petsc-
2.3.2-p8/include/mpiuni global.F<br>&gt;<br>&gt; ifort&nbsp;&nbsp;-fPIC -g<br>&gt; -Wl,-rpath,/nfs/lsftmp/g0306332/petsc-2.3.2-p8/lib/l64-nompi-noshared<br>&gt; -L/nfs/lsftmp/g0306332/petsc-2.3.2-p8/lib/l64-nompi-noshared -lpetscksp
<br>&gt; -lpetscdm -lpetscmat -lpetscvec -lpetsc<br>&gt; -Wl,-rpath,/nfs/lsftmp/g0306332/petsc-2.3.2-p8/lib/l64-nompi-noshared<br>&gt; -L/nfs/lsftmp/g0306332/petsc-2.3.2-p8/lib/l64-nompi-noshared -lmpiuni<br>&gt; -Wl,-rpath,/lsftmp/g0306332/inter/mkl/lib/em64t
<br>&gt; -L/lsftmp/g0306332/inter/mkl/lib/em64t -lmkl_lapack -lmkl_em64t -lguide<br>&gt; -lpthread -ldl -Wl,-rpath,/usr/local/intel/cce9.0/lib<br>&gt; -L/usr/local/intel/cce9.0/lib<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/
<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -limf<br>&gt; -lirc -lgcc_s -lirc_s -Wl,-rpath,&quot;/usr/local/intel/cce9.0/lib&quot;
<br>&gt; -Wl,-rpath,&quot;/usr/local/intel/cce9.0/lib&quot; -L&quot;/usr/local/intel/cce9.0/lib&quot;<br>&gt; -Wl,-rpath,&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/&quot;<br>&gt; -Wl,-rpath,&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/&quot;
<br>&gt; -L&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/&quot;<br>&gt; -Wl,-rpath,&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64&quot;<br>&gt; -Wl,-rpath,&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64&quot;
<br>&gt; -L&quot;/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64&quot;<br>&gt; -Wl,-rpath,/usr/local/intel/fc9.0/lib -L/usr/local/intel/fc9.0/lib -lifport<br>&gt; -lifcore -lm -Wl,-rpath,/usr/local/intel/cce9.0/lib
<br>&gt; -Wl,-rpath,/usr/local/intel/cce9.0/lib -L/usr/local/intel/cce9.0/lib<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/
<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lm&nbsp;&nbsp;-ldl
<br>&gt; -Wl,-rpath,/usr/local/intel/cce9.0/lib -L/usr/local/intel/cce9.0/lib<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/<br>&gt; -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64
<br>&gt; -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -limf<br>&gt; -lirc -lgcc_s -lirc_s -ldl&nbsp;&nbsp;-o a.out global.o&nbsp;&nbsp;main.f90<br>&gt;<br>&gt; I have used shared,static library. I wonder if it is a problem with mkl
<br>&gt; em64t or there&#39;s something wrong with my code/compilation.<br>&gt;<br>&gt;<br>&gt;<br>&gt; Thank you.<br>&gt;<br><br></blockquote></div><br>