The problem solved<br><br>THANK YOU SO MUCH :)<br><br>Waad<br><br><b><i>Satish Balay <balay@mcs.anl.gov></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> sorry - forgot the attachment<br><br>satish<br><br>On Sun, 19 Aug 2007, Satish Balay wrote:<br><br>> What do you have for:<br>> <br>> nm -ao mvec.o <br>> <br>> Also - sugest using the attached makefile.<br>> <br>> Satish<br>> <br>> <br>> On Sun, 19 Aug 2007, Waad Subber wrote:<br>> <br>> > Thanks for response<br>> > I removed the lines and I got the following output after executing the make file:<br>> > <br>> > gfortran -c -fPIC -Wall -Wno-unused-variable -g -I/home/waad/soft/petsc-2.3.3-p4 -I/home/waad/soft/petsc-2.3.3-p4/bmake/linux-gnu-c-debug -I/home/waad/soft/petsc-2.3.3-p4/include -I/home/waad/mpich2-install/include -o pro.o pro.F<br>> > gfortran -fPIC -Wall
-Wno-unused-variable -g -o exe pro.o -Wl,-rpath,/home/waad/soft/petsc-2.3.3-p4/lib/linux-gnu-c-debug -L/home/waad/soft/petsc-2.3.3-p4/lib/linux-gnu-c-debug -lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc -L/usr/lib64 -lX11 -Wl,-rpath,/home/waad/mpich2-install/lib -L/home/waad/mpich2-install/lib -lmpich -lpthread -llapack -lblas -lm -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -Wl,-rpath,/lib/../lib64 -L/lib/../lib64 -Wl,-rpath,/usr/lib/../lib64 -L/usr/lib/../lib64 -ldl -lgcc_s -lgfortranbegin -lgfortran -lm -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -Wl,-rpath,/lib/../lib64 -Wl,-rpath,/usr/lib/../lib64 -lm -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2<br>> >
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -Wl,-rpath,/lib/../lib64 -L/lib/../lib64 -Wl,-rpath,/usr/lib/../lib64 -L/usr/lib/../lib64 -ldl -lgcc_s -ldl <br>> > pro.o: In function `MAIN__':<br>> > /home/waad/petsc_test/example1/solvetest/pro.F:38: undefined reference to `mvec_'<br>> > collect2: ld returned 1 exit status<br>> > make: [exe] Error 1 (ignored)<br>> > /bin/rm -f -f pro.o<br>> > <br>> > <br>> > <br>> > Barry Smith <bsmith@mcs.anl.gov> wrote: <br>> > <br>> > Not sure what the problem is, but <br>> > you should remove the lines<br>> > > mvec.o: mvec.F <br>> > > mpif90 -c mvec.F <br>> > you do not need them.<br>> > <br>> >
Please send ALL the output when you run make exe after the change.<br>> > <br>> > Barry<br>> > <br>> > <br>> > <br>> > On Sun, 19 Aug 2007, Waad Subber wrote:<br>> > <br>> > > Hello everyone<br>> > > <br>> > > I am calling a subroutine from my main program, and when I compile the code I get an error message (undefined reference to 'mvec_') referring to the call statement in the main program. I have defined the subroutine as external in the main program using (external mvec), but the problem still unsolved ..! <br>> > > <br>> > > The makefile looks like:<br>> > > <br>> > > OBJS= mvec.o<br>> > > CFLAGS = <br>> > > FFLAGS = <br>> > > CPPFLAGS =<br>> > > FPPFLAGS =<br>> > > <br>> > > <br>> > > include ${PETSC_DIR}/bmake/common/base<br>> > > <br>> > > all:
$(OBJS)<br>> > > <br>> > > mvec.o: mvec.F<br>> > > mpif90 -c mvec.F<br>> > > <br>> > > exe: pro.o $(OBJS) <br>> > > -${FLINKER} -o exe pro.o $(OBJS) ${PETSC_LIB}<br>> > > ${RM} -f pro.o<br>> > > <br>> > > include ${PETSC_DIR}/bmake/common/test<br>> > > <br>> > > Can any one help me with this issue please ...!<br>> > > <br>> > > Thanks<br>> > > <br>> > > Waad<br>> > > <br>> > > <br>> > > ---------------------------------<br>> > > Park yourself in front of a world of choices in alternative vehicles.<br>> > > Visit the Yahoo! Auto Green Center.<br>> > <br>> > <br>> > <br>> > <br>> > ---------------------------------<br>> > Be a better Heartthrob. Get better relationship answers from someone who knows.<br>> > Yahoo! Answers - Check
it out. <br>> <br>> <br>CFLAGS = <br>FFLAGS = <br>CPPFLAGS =<br>FPPFLAGS =<br>CLEANFILES = exe<br><br>include ${PETSC_DIR}/bmake/common/base<br><br>OBJS = pro.o mvec.o<br><br>all: exe<br><br>exe: ${OBJS}<br> -${FLINKER} -o exe ${OBJS} ${PETSC_LIB}<br><br>include ${PETSC_DIR}/bmake/common/test<br><br></bsmith@mcs.anl.gov></blockquote><br><p> 
<hr size=1>Yahoo! oneSearch: Finally, <a href="http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC"> mobile search
that gives answers</a>, not web links.