FEAP User Forum
FEAP => Installation => Topic started by: Camilo Valencia on April 07, 2015, 01:17:29 PM
-
Dear all,
I am trying to install Arpack in feap 8.3.
Before building feap, I am typing 'make install' in packages/arpack and packages/arpack/archive to produce arpacklib.a and archivelib.a files respectively. Then I go back and build feap without any errors. But when I use the ARPAck command, feap reports: No procedure or command named arpa exists.
Could you please guide me to fix this problem?
Regards,
Camilo
-
make sure the two lines referencing ARPACK are UNcommented in makefile.in
-
I checked my makefile.in and it does not include any reference to ARPACK. Could you indicate me the two lines I have to include?
-
Sorry those were the instructions for version 8.4. In version 8.3, after you have made the two *.a archives, you need to add references to them in main/makefile.
-
Could you please guide me with those references? I need the lines I have to include and their locations in main/makefile.
Thank you in advance.
-
In main/makefile look for
$(FF) -o feap $(OBJECTS) $(ARFEAP) \
and change it to
$(FF) -o feap $(OBJECTS) ../packages/arpack/arpacklib.a ../packages/arpack/archive/archivelib.a $(ARFEAP) \
-
I made the changes and recompiled feap. The output message was:
-> Feap Archive updated <-
(cd main; make feap)
make[1]: Entering directory `/home/cvalen20/ver83SH/main'
gfortran -c -O3 -ftree-vectorize -Wall -I/home/cvalen20/ver83SH/include -I/home/cvalen20/ver83SH/include/integer8 feap83.f -o feap83.o
ranlib /home/cvalen20/ver83SH/Feap8_3.a
gfortran -o feap feap83.o ../packages/arpack/arpacklib.a ../packages/arpack/archive/archivelib.a /home/cvalen20/ver83SH/Feap8_3.a \
-L/usr/X11R6/lib64 -lX11 -lm
make[1]: Leaving directory `/home/cvalen20/ver83SH/main'
-> Feap executable made <-
I think it looks ok. But when the ARPAck command is used, feap continues reporting: No procedure or command named arpa exists.
-
On some rare occasions, the compiler the does not properly link the code and thus does not see the umacro that defines arpa.
Short of updating your compiler (which may or may not fix the problem), the easiest thing to do is to delete the dummy umacro
from your Feap8_3.a file. Look in packages/arpack and find the number XX of the umacrXX.f file being used. Then at the top-level
directory remove it:
ar dv Feap8_3.a umacrXX.o
where XX is the appropriate number for your version of the code. Next 'cd main' and 'make'
-
It seems feap needs all umacr*.o objects. I removed the dummy umacr0.o (packages/arpack contains umacr0.f ) from Feap8_3.a and the following output message was produced:
/home/cvalen20/ver83SH/Feap8_3.a(umaclib.o): In function `umaclib_':
umaclib.f:(.text+0xc9): undefined reference to `umacr0_'
collect2: error: ld returned 1 exit status
make: *** [feap] Error 1
-
No, just think about it. You remove umacr0.o from Feap8_3.a. But you have it in arpacklib.a or at least you should. Thus there should be no problem.
Either you did not include umacr0.o in your arpacklib.a or your link line is incorrect. Please check both.
-
I typed 'ar tv arpacklib.a' and I see the following:
rw-rw-r-- 1000/1000 12080 Apr 21 15:39 2015 arfeaps.o
rw-rw-r-- 1000/1000 4672 Apr 21 15:39 2015 aropk.o
rw-rw-r-- 1000/1000 2576 Apr 21 15:39 2015 aropm.o
rw-rw-r-- 1000/1000 1616 Apr 21 15:39 2015 pamult.o
rw-rw-r-- 1000/1000 3000 Apr 21 15:39 2015 primul.o
rw-rw-r-- 1000/1000 13200 Apr 21 15:39 2015 umacr0.o
umacr0.o is correctly linked to arpacklib.a I think. And my link line to arpack in main/makefile is:
$(FF) -o feap $(OBJECTS) ../packages/arpack/arpacklib.a ../packages/arpack/archive/archivelib.a $(ARFEAP) \
$(LDOPTIONS)
-
I needed to include the lapack and blas files when I built the code.
I also did a make clean on all the directories before doing the final build. That ensures that everything is clean. I did not remove any files. I did the final build in the /main directory using the attached makefile (note if you have the blas and lapack routines elsewhere you do not need them).
Test with attached file: Itest
-
Camilo,
Your *.a looks fine. Thus it seems that the linker is not behaving.
Here is another option: remove the references to arpacklib.a and archivelib.a from your link line. Then at the top of the makefile where $(OBJECTS) is defined,
add ../packages/arpack/arfeaps.o etc. as well as the files from ../packages/arpack/archive (make sure the *.o files exist as the makefiles may blast them after building the *.a files).
Also can you post the output of "gfortran -v" and "uname -a".
-
I tried the option that Prof. Taylor proposed and the result was the same: arpa command does not exist.
The second option proposed by FEAP_Admin gave me a lot of linking errors. For example:
feap83.o: In function `main':
feap83.f:(.text.startup+0x145): undefined reference to `pstart_'
feap83.f:(.text.startup+0x14c): undefined reference to `pmessage_'
feap83.f:(.text.startup+0x153): undefined reference to `pcontr_'
../packages/arpack/archive/dgetv0.o: In function `dgetv0_':
dgetv0.f:(.text+0x139): undefined reference to `dgemv_'
dgetv0.f:(.text+0x1b2): undefined reference to `dgemv_'
dgetv0.f:(.text+0x38f): undefined reference to `dcopy_'
dgetv0.f:(.text+0x43e): undefined reference to `ddot_'
dgetv0.f:(.text+0x48f): undefined reference to `dcopy_'
dgetv0.f:(.text+0x4bb): undefined reference to `dnrm2_'
dgetv0.f:(.text+0x607): undefined reference to `dcopy_'
dgetv0.f:(.text+0x71c): undefined reference to `ddot_'
dgetv0.f:(.text+0x770): undefined reference to `dlarnv_'
dgetv0.f:(.text+0x793): undefined reference to `dnrm2_'
dgetv0.f:(.text+0x7da): undefined reference to `dcopy_'
And the same kind of errors for each *.o file in packages/arfeap and packages/arfeap/archive
Additionally, the output for 'gfortran -v' is:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
and 'uname -a' gives:
Linux HP-eafit 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Thank you for your help.
-
Looks like you are missing blas and/or lapack. Please link with the blas and lapack libraries -lblas -llapack. I'm very surprised that it linked before.
-
Sorry, as you said, I did not include the references to blas and lapack. I included them and now arpack works perfectly.
Thank you for your kindly help.