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