unable to compile

476 views
Skip to first unread message

Irikura, Karl K. Dr.

unread,
Mar 12, 2012, 4:57:40 PM3/12/12
to dirac...@googlegroups.com
Hi. I haven't been able to compile DIRAC on our cluster and wonder if I’m missing something basic. Here is a summary of what I've tried recently, with some help from a coworker. I'm trying to follow the directions at http://dirac.ups-tlse.fr/bast/dirac/doc/11/install.html . Please forgive my ignorance; I never use compilers, MPI, or make (except implicitly as a user).

I'll be grateful for any suggestions.

Best regards,

Karl



(1) Install cmake.

(2) ./setup --fc=mpif90 --cc=mpicc --int64 --build=/home/irikura/dirac11/bin
-failed
* CMake Error at cmake/Parallel.cmake:20 (message):
ERROR: MPI incompatible - mpi.mod compiled with different compiler (consult
the manual; if you know what you are doing you can disable this check using
./setup --nochecks)

(3) Starting with DIRAC-11.0.1-Source.tar.gz.
./setup --fc=pgf90 --cc=mpicc --int64 --build=/home/irikura/dirac11/bin
-looked OK.

(4) make
-failed at 1%
./gen_fortran_interface_h: error while loading shared libraries: libmpio.so.1: cannot open shared object file: No such file or directory
make[2]: *** [/home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h] Error 127
make[1]: *** [CMakeFiles/dirac.dir/all] Error 2
make: *** [all] Error 2

(5) compile a personal version of MPICH2 using pgf90 and gcc

(6) ./setup --fc=pgf90 --cc=mpicc --int64 --build=/home/irikura/dirac11/bin
-failed at 13%
PGF90-S-0155-Could not resolve generic procedure alloc (/home/irikura/dirac11/DIRAC-11.0.1-Source/dirac/numerical_operators.F90: 228)
PGF90-S-0155-Could not resolve generic procedure dealloc (/home/irikura/dirac11/DIRAC-11.0.1-Source/dirac/numerical_operators.F90: 292)
0 inform, 0 warnings, 2 severes, 0 fatal for numoper_oneelop_setmatrix_ps
make[3]: *** [CMakeFiles/dirac.dir/dirac/numerical_operators.F90.o] Error 2
make[2]: *** [CMakeFiles/dirac.dir/dirac/numerical_operators.F90.o.provides] Error 2
make[1]: *** [CMakeFiles/dirac.dir/all] Error 2
make: *** [all] Error 2

(7) recompile MPICH2 using gfortran and gcc, starting with
../mpich2-1.4.1p1/configure -prefix=/home/irikura/mpich2-install CC=gcc --disable-cxx F77=gfortran FC=gfortran

(8) ./setup --fc=mpif90 --cc=mpicc --int64 --build=/home/irikura/dirac11/bin
-failed
-- Found MPI_Fortran: /home/irikura/mpich2-install/lib/libmpichf90.a;/home/irikura/mpich2-install/lib/libmpichf90.a;/home/irikura/mpich2-install/lib/libmpich.a;/home/irikura/mpich2-install/lib/libopa.a;/home/irikura/mpich2-install/lib/libmpl.a;/usr/lib64/librt.so;/usr/lib64/libpthread.so
-- Performing Test MPI_COMPILER_MATCHES
-- Performing Test MPI_COMPILER_MATCHES - Failed

(9) recompile MPICH2 starting with
../mpich2-1.4.1p1/configure -prefix=/home/irikura/mpich2-install CC=gcc CXX=g++ F77=gfortran FC=gfortran

(10) ./setup --fc=mpif90 --cc=mpicc --int64 --build=/home/irikura/dirac11/bin (same as before)
-failed

(11) check log file; bombing over '-fbacktrace' flag. Edit 'cmake/FCompilers.cmake' to delete that flag. Try (10) again.
-failed
-- Performing Test MPI_COMPILER_MATCHES
-- Performing Test MPI_COMPILER_MATCHES - Success
-- Performing Test MPI_ITYPE_MATCHES
-- Performing Test MPI_ITYPE_MATCHES - Failed

(12) check another log file:
In file /home/irikura/dirac11/bin/CMakeFiles/CMakeTmp/src.f90:10
call mpi_comm_rank(mpi_comm_world, irank, ierr)
Error: Type/rank mismatch in argument 'v1' at (1)

(13) recompile MPICH2 trying for 8-byte integers as default, starting with
../mpich2-1.4.1p1/configure -prefix=/home/irikura/mpich2-install CC=gcc CXX=g++ F77=’gfortran –fdefault-integer-8’ FC=’gfortran –fdefault-integer-8’
-failed
Fortran and C integers must be same length, i.e. 4 bytes.

radovan bast

unread,
Mar 12, 2012, 6:07:08 PM3/12/12
to dirac...@googlegroups.com
dear Karl,

my first and central question is: do you need 64bit integer support?
if you are not sure, then i would suggest that you don't need it.
if you later change your mind, you can reinstall DIRAC, but it is
easier without.

some of the problems that you experienced are due to mismatch between
MPI libraries (32bit integers) and DIRAC installation (64bit integers),
other problems are due to mismatch between MPI module files
and backend MPI compilers.

for instance step 7-8 and 9-10: your mpi is then clearly 32bit, whereas
you chose 64bit integers for DIRAC. DIRAC then stops the configuration
with MPI_ITYPE_MATCHES - Failed, and that's a good thing because
otherwise you could get unexpected results at runtime.

the steps that i recommend:

1) contact the cluster user support and ask them which is the best
performing MPI installation they offer (probably an MPI compiled with ifort
or pgf90).

2) if they don't know or there is nothing, then build your own
using:
$ ./configure --prefix=/home/irikura/mpich2-install CC=pgCC CXX=pgc++
F77=pgf90 FC=pgf90

(not sure about the actual names, please use portland group documentation
and MPICH2 documentation)

3) make sure your environment variables point to the correct MPI locations.

4) configure DIRAC:
$ ./setup --fc=mpif90 --cc=mpicc
$ cd build
$ make

this should then work. please let us know if not.

good luck!
radovan

Stefan Knecht

unread,
Mar 12, 2012, 6:38:11 PM3/12/12
to dirac...@googlegroups.com
Dear Karl,

in addition to what Radovan suggested let me add that your first try at step (2) was almost OK.
from experience we can recommend to not install Dirac with --int64 unless you really want to/need it (very unlikely), it causes
only trouble as you have experienced yourself.

To successfully proceed at step (2) do the following:
a. remove --int64
b. add --nochecks: we test for compatibility of integer sizes in MPI libraries and Dirac via some pre-defined functionality
for which we use the F90 module mpi.mod; if the compiler name stored in the module header of mpi.mod
is different from your actual compiler, a typical situation on a supercomputer, this won't work
but usually does not matter either. therefore you can safely skip it.
   
to summarize what seems to be required in your case to get things working out-of-the-box:
a. use a standard MPI library (32-bit Fortran integer == standard) like the one provided on your cluster or your own, new MPICH2.
b. ./setup without --int64
c. point to MPI-compiler wrapper for both Fortran and C-compilers, you cannot use pgf90 for Fortran and mpicc for C:
    --fc=mpif90 --cc=mpicc
d. add --nochecks

which gives:
./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin

btw, MPICH2 does not support and never will afaik 64-bit Fortran integer as default integer (this Fortran/C integer size mix is non-standard),
that's why step (13) failed.

hope this helps.

with best regards,

stefan
-- 
Stefan Knecht
Institut for Fysik, Kemi og Farmaci
Syddansk Universitet Odense
Campusvej 55
DK-5230 Odense M
Denmark

phone: +45 6550 3512   fax: +45 6615 8760
email: kne...@sdu.dk
web: http://www.theochem.uni-duesseldorf.de/users/stefan/

Irikura, Karl K. Dr.

unread,
Mar 13, 2012, 11:10:07 AM3/13/12
to dirac...@googlegroups.com

Dear Stefan and Radovan,

 

Thank you for your suggestions.  Unfortunately, it still isn’t working out for me.  I will have to set this aside for now, but when I return to the problem I will try on a different machine, one under my control. 

 

In case it’s helpful, I’ve appended my notes from this morning.

 

Best regards,

 

Karl

 

 
 
 
(3/13/2012)
 
Reply from DIRAC mailing list (Radovan Bast and Stefan Knecht):  they recommend compiling with 32-bit integers unless the 64-bit features are essential (probably they are not).  
 
Return to the original MPI (at the top of this file), without the 64-bit flag. 
 
./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin
Works (but says MPI2 is unavailable):
-- no MPI-2 support found, will try with MPI-1
-- default BLAS found
-- MKL LAPACK found
-- The Fortran compiler identification is GNU
-- The C compiler identification is GNU
-- Check for working Fortran compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90
-- Check for working Fortran compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90 supports Fortran 90
-- Checking whether /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90 supports Fortran 90 -- yes
-- Check for working C compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpicc
-- Check for working C compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found MPI_C: /usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpio.so;/usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpi.so;/usr/lib64/libdl.so 
-- Found MPI_Fortran: /usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpio.so;/usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpi.so;/usr/lib64/libdl.so 
-- Performing Test MPI_2_COMPATIBLE
-- Performing Test MPI_2_COMPATIBLE - Failed
-- The CXX compiler identification is GNU
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/irikura/dirac11/bin
 
‘make’ fails:
Scanning dependencies of target gen_fortran_interface_h
[  1%] Building C object CMakeFiles/gen_fortran_interface_h.dir/utils/gen_fortran_interface_h.c.o
Linking C executable gen_fortran_interface_h
[  1%] Built target gen_fortran_interface_h
[  1%] Generating /home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h
./gen_fortran_interface_h: error while loading shared libraries: libmpio.so.1: cannot open shared object file: No such file or directory
make[2]: *** [/home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h] Error 127
make[1]: *** [CMakeFiles/dirac.dir/all] Error 2
make: *** [all] Error 2
 
I see above (after ./setup) it looks like 64-bit MPI.  So try it again with the –int64 included again. 
./setup --fc=mpif90 --cc=mpicc --nochecks --int64 --build=/home/irikura/dirac11/bin
 
‘make’ fails again, output looks same:
Scanning dependencies of target gen_fortran_interface_h
[  1%] Building C object CMakeFiles/gen_fortran_interface_h.dir/utils/gen_fortran_interface_h.c.o
Linking C executable gen_fortran_interface_h
[  1%] Built target gen_fortran_interface_h
[  1%] Generating /home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h
./gen_fortran_interface_h: error while loading shared libraries: libmpio.so.1: cannot open shared object file: No such file or directory
make[2]: *** [/home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h] Error 127
make[1]: *** [CMakeFiles/dirac.dir/all] Error 2
make: *** [all] Error 2
 
I look in /usr/local/hpmpi.2.03.01.00-20090402r and find the “missing” file:
./lib/linux_ia32/libmpio.so
./lib/linux_ia32/libmpio.so.1
./lib/linux_amd64/libmpio.so
./lib/linux_amd64/libmpio.so.1
./MPICH2.0/lib/linux_ia32/libmpio.so.2
./MPICH2.0/lib/linux_ia32/libmpio.so
./MPICH2.0/lib/linux_ia32/libmpio.so.1
./MPICH2.0/lib/linux_amd64/libmpio.so.2
./MPICH2.0/lib/linux_amd64/libmpio.so
./MPICH2.0/lib/linux_amd64/libmpio.so.1
 
Compile my own MPICH2 again, but use 32-bit integers. 
../mpich2-1.4.1p1/configure -prefix=/home/irikura/mpich2-install CC=gcc CXX=g++ F77=gfortran FC=gfortran | & tee c.txt
make; make install; both look OK. 
 
Returning to DIRAC:
./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin
Works but again says no MPI2.  Also still has “64” in path names, suggesting 64-bit. 
-- no MPI-2 support found, will try with MPI-1
-- default BLAS found
-- MKL LAPACK found
-- The Fortran compiler identification is GNU
-- The C compiler identification is GNU
-- Check for working Fortran compiler: /home/irikura/mpich2-install/bin/mpif90
-- Check for working Fortran compiler: /home/irikura/mpich2-install/bin/mpif90  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /home/irikura/mpich2-install/bin/mpif90 supports Fortran 90
-- Checking whether /home/irikura/mpich2-install/bin/mpif90 supports Fortran 90 -- yes
-- Check for working C compiler: /home/irikura/mpich2-install/bin/mpicc
-- Check for working C compiler: /home/irikura/mpich2-install/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found MPI_C: /home/irikura/mpich2-install/lib/libmpich.a;/home/irikura/mpich2-install/lib/libopa.a;/home/irikura/mpich2-install/lib/libmpl.a;/usr/lib64/librt.so;/usr/lib64/libpthread.so 
-- Found MPI_Fortran: /home/irikura/mpich2-install/lib/libmpichf90.a;/home/irikura/mpich2-install/lib/libmpichf90.a;/home/irikura/mpich2-install/lib/libmpich.a;/home/irikura/mpich2-install/lib/libopa.a;/home/irikura/mpich2-install/lib/libmpl.a;/usr/lib64/librt.so;/usr/lib64/libpthread.so 
-- Performing Test MPI_2_COMPATIBLE
-- Performing Test MPI_2_COMPATIBLE - Failed
-- The CXX compiler identification is GNU
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/irikura/dirac11/bin
 
Try “make” again. Fails:
Scanning dependencies of target gen_fortran_interface_h
[  1%] Building C object CMakeFiles/gen_fortran_interface_h.dir/utils/gen_fortran_interface_h.c.o
Linking C executable gen_fortran_interface_h
[  1%] Built target gen_fortran_interface_h
[  1%] Generating /home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h
Scanning dependencies of target dirac
[  1%] Building Fortran object CMakeFiles/dirac.dir/gp/character_processing.F90.o
cc1: error: unrecognized command line option "-fbacktrace"
make[3]: *** [CMakeFiles/dirac.dir/gp/character_processing.F90.o] Error 1
make[2]: *** [CMakeFiles/dirac.dir/gp/character_processing.F90.o.provides] Error 2
make[1]: *** [CMakeFiles/dirac.dir/all] Error 2
make: *** [all] Error 2
 
As yesterday, edit the file cmake/FCompilers.cmake to remove that flag and try “make” again.
Fails at 4%.  Here are the first few lines:
In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:251
               real(kind=kreal), allocatable :: data(:)
                                                   1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
 In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:258
               integer(kind=kint), allocatable :: data(:)
                                                     1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
 
Maybe I have to change some environment variables to get 32-bit defaults. Default on Raritan is pgi compiler, lam-mpi, and 64-bit. Add this to .cshrc:
setenv PREFERRED_FORTRAN gnu
setenv PREFERRED_MPI mpich
setenv PREFERRED_ARCH 32
source /usr/local/etc/mpi_fort_env.csh
 
Don’t use the personal MPICH2, just try DIRAC:
Fails: can’t get mpif90 to work. Try it again with 64-bit specified in the .cshrc. No, same error:
  No Fortran 90 compiler specified when mpif90 was created,
  or configuration file does not specify a compiler.
 
Change ‘gnu’ to ‘pgi’ and ‘64’ back to ‘32’ in .cshrc, try dirac setup again. Now the C compiler doesn’t work. Change ‘32’ to ‘64’ and try again with –int64 flag. Dirac “make” dies at 5%:
PGF90-S-0038-Symbol, mpi_in_place, has not been explicitly declared (/home/irikura/dirac11/DIRAC-11.0.1-Source/xcint/src/xc_mpi.F90)
  0 inform,   0 warnings,   1 severes, 0 fatal for xc_mpi_reduce_i0
PGF90-S-0038-Symbol, mpi_in_place, has not been explicitly declared (/home/irikura/dirac11/DIRAC-11.0.1-Source/xcint/src/xc_mpi.F90)
  0 inform,   0 warnings,   1 severes, 0 fatal for xc_mpi_reduce_i1
 
Try without the –int64 flag (despite ‘64’ in .cshrc). Dies again at 5% with same messages. 
 
Change ‘mpich’ to ‘lam’ in .cshrc (now all the Raritan defaults) and try again, first with the –int64 flag. Fails with new error:
CMake Error at /home/irikura/cmake-2.8.7-Linux-i386/share/cmake-2.8/Modules/CMakeDetermineFortranCompiler.cmake:31 (MESSAGE):
  Could not find compiler set in environment variable FC:
  mpif90.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Fortran_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Fortran_COMPILER
CMake Error: Could not find cmake module file:/home/irikura/dirac11/bin/CMakeFiles/CMakeFortranCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/home/irikura/dirac11/bin/CMakeFiles/CMakeCCompiler.cmake
CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
 
Set .cshrc to ‘32’ and ‘gnu’ again, and re-compile MPICH2. For dirac:
./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin
Looks OK (did find MPI2 support using this personal MPICH2). 
 
“make”:
Fails at 4%.  First few lines:
In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:251
               real(kind=kreal), allocatable :: data(:)
                                                   1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
 In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:258
               integer(kind=kint), allocatable :: data(:)
                                                     1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)
 

ueks...@gmail.com

unread,
Mar 13, 2012, 11:14:02 AM3/13/12
to dirac...@googlegroups.com
Dear Karl,
can you find the gen_fortran_interface_h executable and run 'ldd' on
it? The former is a small
utility program that is compiled and run as part of the Dirac build
process. So do this

find . -name gen_fortran_interface_h (this will print out the
path to the program)
ldd the_path_find_gave_you

this should print information about the libraries it cannot
find/match. Send us the output.

Regards,
Ulf Ekstrom, Oslo University

Irikura, Karl K. Dr.

unread,
Mar 13, 2012, 11:42:54 AM3/13/12
to dirac...@googlegroups.com
Dear Ulf,

Thank you for your interest. Here is the output:

[irikura@raritan ~/dirac11]$ which ldd
/usr/bin/ldd
[irikura@raritan ~/dirac11]$ find . -name ldd
[irikura@raritan ~/dirac11]$ ldd ./bin/gen_fortran_interface_h
linux-vdso.so.1 => (0x00007fffb83bb000)
libmpio.so.1 => not found
libmpi.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00002b6b0b530000)
libc.so.6 => /lib64/libc.so.6 (0x00002b6b0b734000)
/lib64/ld-linux-x86-64.so.2 (0x00002b6b0b312000)

I hope this is meaningful. When I look in /lib64 I don't find any libmpi* (find . -name "libmpi*" -print). Neither in /lib.

If I omit the --int64 flag to ./setup, the result is similar:
[irikura@raritan ~/dirac11]$ ldd `find . -name gen_fortran_interface_h`
linux-vdso.so.1 => (0x00007fffd73d6000)
libmpio.so.1 => not found
libmpi.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00002b161a438000)
libc.so.6 => /lib64/libc.so.6 (0x00002b161a63c000)
/lib64/ld-linux-x86-64.so.2 (0x00002b161a21a000)

Maybe the environment variables are relevant?

[irikura@raritan ~/dirac11]$ printenv
USER=irikura
LOGNAME=irikura
HOME=/home/irikura
PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/jdk/jre/bin:/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/ant/bin:/usr/local/lahey/bin:/usr/local/pgi/linux86-64/current/bin:/opt/dell/srvadmin/bin:/usr/local/maui/bin:/usr/local/maui/sbin:/home/irikura/bin:/home/irikura/DIRAC11:/home/irikura/cmake-2.8.7-Linux-i386/bin:/usr/local/hpmpi.2.03.01.00-20090402r/bin:/usr/X11R6/bin:/home/irikura/bin:/home/irikura/DIRAC11:/home/irikura/cmake-2.8.7-Linux-i386/bin:/usr/local/hpmpi.2.03.01.00-20090402r/bin
MAIL=/var/spool/mail/irikura
SHELL=/bin/csh
SSH_CLIENT=129.6.178.29 54616 22
SSH_CONNECTION=129.6.178.29 54616 129.6.23.202 22
DISPLAY=localhost:14.0
HOSTTYPE=x86_64-linux
VENDOR=unknown
OSTYPE=linux
MACHTYPE=x86_64
SHLVL=1
PWD=/home/irikura/dirac11
GROUP=div632
HOST=raritan.nist.gov
ANTHOME=/usr/local/ant
JAVA_HOME=/usr/local/jdk
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
G_BROKEN_FILENAMES=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
JDKHOME=/usr/local/jdk
MANPATH=/usr/local/jdk/man:/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/local/share/man:/itl/links/generic/man:/usr/local/intel/flin/man:/usr/local/intel/idb/man:/usr/local/mpich/man:/usr/local/lahey/man:/usr/local/pgi/linux86-64/current/man:/usr/local/maui/share/man
KDEDIR=/usr
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LAHEYHOME=/usr/local/lahey
PDSH_RCMD_TYPE=ssh
PGI=/usr/local/pgi
LM_LICENSE_FILE=/usr/local/pgi/license.dat
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QTLIB=/usr/lib64/qt-3.3/lib
MATH_ROOT=/opt/intel/mkl
TERM=xterm
WINDOWID=8388646
XTERM_VERSION=XTerm(215)
XTERM_SHELL=/bin/csh
REMOTEHOST=localhost.localdomain
HOSTNAME=raritan.nist.gov
INPUTRC=/etc/inputrc

Best regards,

Karl

ueks...@gmail.com

unread,
Mar 13, 2012, 11:46:16 AM3/13/12
to dirac...@googlegroups.com
On Tue, Mar 13, 2012 at 4:42 PM, Irikura, Karl K. Dr.
<karl.i...@nist.gov> wrote:
> Dear Ulf,
>
> Thank you for your interest.  Here is the output:

You can try to set LD_LIBRARY_PATH to point to the directory where you
think the right libmpi.so is. For example

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/your/library

Ulf

radovan bast

unread,
Mar 13, 2012, 11:50:14 AM3/13/12
to dirac...@googlegroups.com, ueks...@gmail.com
also in your case please don't try with --int64.
although the MPI libraries are 64bit they are most
probably not built for 64bit integers (it can be confusing
but these are two different things).

radovan

Stefan Knecht

unread,
Mar 13, 2012, 11:52:39 AM3/13/12
to dirac...@googlegroups.com
Dear Karl,

thanks for the output and the print of your environment variables. You are indeed missing
LD_LIBRARY_PATH
in your environment variables which is needed for linking to the proper (MPI) libraries. That's probably why
the MPI2-Test (No MPI-2 found, try MPI-1...) failed in the first place as well as the inclusion of
gen_fortran_interface_h
Could you try and set the LD_LIBRARY_PATH such that it points to the /lib directory of your MPI package, e.g.,
export LD_LIBRARY_PATH="/usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/"

with best regards,

stefan


On 13.03.2012 16:42, Irikura, Karl K. Dr. wrote:
Dear Ulf,

Thank you for your interest.  Here is the output:

[irikura@raritan ~/dirac11]$ which 
d
/usr/bin/ldd
[irikura@raritan ~/dirac11]$ find . -name ldd
[irikura@raritan ~/dirac11]$ ldd ./bin/gen_fortran_interface_h
        linux-vdso.so.1 =>  (0x00007fffb83bb000)
        libmpio.so.1 => not found
        libmpi.so.1 => not found
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b6b0b530000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b6b0b734000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b6b0b312000)

I hope this is meaningful.  When I look in /lib64 I don't find any libmpi* (find . -name "libmpi*" -print).  Neither in /lib.  

If I omit the --int64 flag to ./setup, the result is similar:
[irikura@raritan ~/dirac11]$ ldd `find . -name gen_fortran_interface_h`
        linux-vdso.so.1 =>  (0x00007fffd73d6000)
        libmpio.so.1 => not found
        libmpi.so.1 => not found
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b161a438000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b161a63c000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b161a21a000)

Maybe the environment variables are relevant? 

[irikura@raritan ~/dirac11]$ printenv
USER=irikura
LOGNAME=irikura
HOME=/home/irikura
PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/jdk/jre/bin:/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/ant/bin:/usr/local/lahey/bin:/usr/local/pgi/linux86-64/current/bin:/opt/dell/srvadmin/bin:/usr/local/maui/bin:/usr/local/maui/sbin:/home/irikura/bin:/home/irikura/DIRAC11:/home/irikura/cmake-2.8.7-Linux-i386/bin:/usr/local/hpmpi.2.03.01.00-20090402r/bin:/usr/X11R6/bin:/home/irikura/bin:/home/irikura/DIRAC11:/home/irikura/cmake-2.8.7-Linux-i386/bin:/usr/local/hpmpi.2.03.01.00-20090402r/bin
MAIL=/var/spool/mail/irikura
SHELL=/bin/csh
SSH_CLIENT=129.6.178.29 54616 22
SSH_CONNECTION=129.6.178.29 54616 129.6.23.202 22
DISPLAY=localhost:14.0
HOSTTYPE=x86_64-linux
VENDOR=unknown
OSTYPE=linux
MACHTYPE=x86_64
SHLVL=1
PWD=/home/irikura/dirac11
GROUP=div632
HOST=raritan.nist.gov

Irikura, Karl K. Dr.

unread,
Mar 13, 2012, 12:02:54 PM3/13/12
to dirac...@googlegroups.com

Thanks, all!  Now it is up to 4%:

 

setenv LD_LIBRARY_PATH /usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64

 

Now try:

./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin

Output:

“make”:

Scanning dependencies of target gen_fortran_interface_h

[  1%] Building C object CMakeFiles/gen_fortran_interface_h.dir/utils/gen_fortran_interface_h.c.o

Linking C executable gen_fortran_interface_h

[  1%] Built target gen_fortran_interface_h

[  1%] Generating /home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h

Scanning dependencies of target dirac

[  1%] Building Fortran object CMakeFiles/dirac.dir/gp/character_processing.F90.o

cc1: error: unrecognized command line option "-fbacktrace"

make[3]: *** [CMakeFiles/dirac.dir/gp/character_processing.F90.o] Error 1

make[2]: *** [CMakeFiles/dirac.dir/gp/character_processing.F90.o.provides] Error 2

make[1]: *** [CMakeFiles/dirac.dir/all] Error 2

make: *** [all] Error 2

 

Edit cmake/FCompilers.cmake again to remove the offending flag.

Now:

-- MPI-2 support found

-- default BLAS found

-- MKL LAPACK found

-- The Fortran compiler identification is GNU

-- The C compiler identification is GNU

-- Check for working Fortran compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90

-- Check for working Fortran compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90  -- works

-- Detecting Fortran compiler ABI info

-- Detecting Fortran compiler ABI info - done

-- Checking whether /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90 supports Fortran 90

-- Checking whether /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpif90 supports Fortran 90 -- yes

-- Check for working C compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpicc

-- Check for working C compiler: /usr/local/hpmpi.2.03.01.00-20090402r/bin/mpicc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Found MPI_C: /usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpio.so;/usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpi.so;/usr/lib64/libdl.so

-- Found MPI_Fortran: /usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpio.so;/usr/local/hpmpi.2.03.01.00-20090402r/lib/linux_amd64/libhpmpi.so;/usr/lib64/libdl.so

-- Performing Test MPI_2_COMPATIBLE

-- Performing Test MPI_2_COMPATIBLE - Success

-- The CXX compiler identification is GNU

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Configuring done

-- Generating done

-- Build files have been written to: /home/irikura/dirac11/bin

 

“make”

Failed at 4%.  Here’s the top of the output:

Scanning dependencies of target gen_fortran_interface_h

[  1%] Building C object CMakeFiles/gen_fortran_interface_h.dir/utils/gen_fortran_interface_h.c.o

Linking C executable gen_fortran_interface_h

[  1%] Built target gen_fortran_interface_h

[  1%] Generating /home/irikura/dirac11/DIRAC-11.0.1-Source/include/fortran_interface.h

Scanning dependencies of target dirac

[  1%] Building Fortran object CMakeFiles/dirac.dir/gp/character_processing.F90.o

[  1%] Building Fortran object CMakeFiles/dirac.dir/dirac/dirac_cfg.F90.o

[  1%] Building Fortran object CMakeFiles/dirac.dir/matrix_operations/matrix_module.F90.o

[  2%] Building Fortran object CMakeFiles/dirac.dir/matrix_operations/matrix_stat.F90.o

[  2%] Building Fortran object CMakeFiles/dirac.dir/matrix_operations/matrix_operations.F90.o

[  2%] Building Fortran object CMakeFiles/dirac.dir/matrix_operations/matrix_genop.F90.o

[  3%] Building Fortran object CMakeFiles/dirac.dir/matrix_operations/matrix_defop.F90.o

[  3%] Building Fortran object CMakeFiles/dirac.dir/gp/memory_parameters.F90.o

[  3%] Building Fortran object CMakeFiles/dirac.dir/gp/memory_control.F90.o

[  3%] Building Fortran object CMakeFiles/dirac.dir/gp/memory_tracker.F90.o

[  4%] Building Fortran object CMakeFiles/dirac.dir/gp/memory_track_if.F90.o

[  4%] Building Fortran object CMakeFiles/dirac.dir/gp/memory_errorhandler.F90.o

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:251

               real(kind=kreal), allocatable :: data(:)

                                                   1

Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:258

               integer(kind=kint), allocatable :: data(:)

                                                     1

Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:281

               real(kind=kreal), allocatable :: data(:,:)

                                                   1

Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:288

               integer(kind=kint), allocatable :: data(:,:)

                                                     1

Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:312

               real(kind=kreal), allocatable :: data(:,:,:)

                                                   1

Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)

In file /home/irikura/dirac11/DIRAC-11.0.1-Source/gp/memory_errorhandler.F90:319

 

 

Best regards,

Karl

ueks...@gmail.com

unread,
Mar 13, 2012, 12:05:44 PM3/13/12
to dirac...@googlegroups.com
Karl, what version of GCC are you using? Check with gcc -v.

Ulf

Irikura, Karl K. Dr.

unread,
Mar 13, 2012, 12:07:16 PM3/13/12
to dirac...@googlegroups.com
Hi Ulf. It gives a lot of output:

[irikura@raritan bin]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)

Thanks,

Karl

-----Original Message-----
From: dirac...@googlegroups.com [mailto:dirac...@googlegroups.com] On Behalf Of ueks...@gmail.com
Sent: Tuesday, March 13, 2012 12:06 PM
To: dirac...@googlegroups.com
Subject: Re: unable to compile

Stefan Knecht

unread,
Mar 13, 2012, 12:24:46 PM3/13/12
to dirac...@googlegroups.com
Dear Karl,

your gcc (and most likely gfortran) compiler is pretty old, this could
be the reason for the observed conflict.
Could you try to change the fortran compiler behind your mpif90
(currently gfortran) by making an alias for mpif90

alias mpif90 'mpif90 -f90=pgf90'

By doing so, you should activate pgf90 as your backend compiler for
Fortran and this hopefully solves your problems.

with best regards,

stefan

Irikura, Karl K. Dr.

unread,
Mar 13, 2012, 12:37:26 PM3/13/12
to dirac...@googlegroups.com
Dear Stefan,

Thank you again. I tried your suggestion, but maybe it did not have the required effect; the error looks the same.

Best regards,
Karl


Add "alias mpif90 'mpif90 -f90=pgf90' " to .cshrc. Logout, login.

[irikura@raritan bin]$ alias mpif90
mpif90 -f90=pgf90

./setup --fc=mpif90 --cc=mpicc --nochecks --build=/home/irikura/dirac11/bin

"make"

Stefan Knecht

unread,
Mar 13, 2012, 12:52:05 PM3/13/12
to dirac...@googlegroups.com
Dear Karl,

On 13.03.2012 17:37, Irikura, Karl K. Dr. wrote:
> Dear Stefan,
>
> Thank you again. I tried your suggestion, but maybe it did not have the required effect; the error looks the same.

yes, unfortunately cmake uses a different way of detecting the fortran
compiler behind mpif90
than i hoped for (or this flag does not work with HP-MPI). maybe some
cmake-wizard comments here?
would it be otherwise possible for you to download a pre-build gfortran
binary (e.g. 64-bit (this does not imply 64-bit INTEGER) 4.6 or 4.7) and
test with this one?

http://gcc.gnu.org/wiki/GFortranBinaries#GNU.2BAC8-Linux

if you set the $PATH and $LD_LIBRARY_PATH to point to the local gfortran
before the generic one installed on your platform
mpif90 should pick this one.

for example:

setenv PATH path_to_my_gfortran/bin:${PATH}
setenv LD_LIBRARY_PATH path_to_my_gfortran:${LD_LIBRARY_PATH}

in any case, if you try with your own MPICH2-version you can switch the
fortran compiler behind mpif90 via an environment variable which
has to work for cmake:

setenv MPICH_F90 'pgf90'

with best regards,

stefan

radovan bast

unread,
Mar 13, 2012, 1:02:04 PM3/13/12
to dirac...@googlegroups.com, Stefan Knecht
On Tue, 13 Mar 2012 17:52:05 +0100, Stefan Knecht <kne...@sdu.dk> wrote:

> Dear Karl,
>
> On 13.03.2012 17:37, Irikura, Karl K. Dr. wrote:
>> Dear Stefan,
>>
>> Thank you again. I tried your suggestion, but maybe it did not have
>> the required effect; the error looks the same.
> yes, unfortunately cmake uses a different way of detecting the fortran
> compiler behind mpif90
> than i hoped for (or this flag does not work with HP-MPI). maybe some
> cmake-wizard comments here?

you should be able to set the backend compiler like this (please possibly
adapt to csh syntax):

export OMPI_FC=pgf90
export OMPI_F77=pgf90
export OMPI_CC=pgCC (not 100% sure about the pgCC name)

./setup --fc=mpif90 --cc=mpicc ...
should then pick up the PG compilers

i keep my fingers crossed,
radovan

Stefan Knecht

unread,
Mar 13, 2012, 1:09:24 PM3/13/12
to dirac...@googlegroups.com
On 13.03.2012 18:02, radovan bast wrote:
> On Tue, 13 Mar 2012 17:52:05 +0100, Stefan Knecht<kne...@sdu.dk> wrote:
>
>> Dear Karl,
>>
>> On 13.03.2012 17:37, Irikura, Karl K. Dr. wrote:
>>> Dear Stefan,
>>>
>>> Thank you again. I tried your suggestion, but maybe it did not have
>>> the required effect; the error looks the same.
>> yes, unfortunately cmake uses a different way of detecting the fortran
>> compiler behind mpif90
>> than i hoped for (or this flag does not work with HP-MPI). maybe some
>> cmake-wizard comments here?
> you should be able to set the backend compiler like this (please possibly
> adapt to csh syntax):
hi,

> export OMPI_FC=pgf90
> export OMPI_F77=pgf90
> export OMPI_CC=pgCC (not 100% sure about the pgCC name)

i fear this won't work, ompi_* are environment variables for OpenMPI.
MPICH2, e.g. uses MPICH_F90 instead of OMPI_FC...

with best regards,

stefan

>
> ./setup --fc=mpif90 --cc=mpicc ...
> should then pick up the PG compilers
>
> i keep my fingers crossed,
> radovan

radovan bast

unread,
Mar 13, 2012, 1:12:11 PM3/13/12
to dirac...@googlegroups.com, Stefan Knecht
On Tue, 13 Mar 2012 18:09:24 +0100, Stefan Knecht <kne...@sdu.dk> wrote:

> On 13.03.2012 18:02, radovan bast wrote:
>> On Tue, 13 Mar 2012 17:52:05 +0100, Stefan Knecht<kne...@sdu.dk> wrote:
>>
>>> Dear Karl,
>>>
>>> On 13.03.2012 17:37, Irikura, Karl K. Dr. wrote:
>>>> Dear Stefan,
>>>>
>>>> Thank you again. I tried your suggestion, but maybe it did not have
>>>> the required effect; the error looks the same.
>>> yes, unfortunately cmake uses a different way of detecting the fortran
>>> compiler behind mpif90
>>> than i hoped for (or this flag does not work with HP-MPI). maybe some
>>> cmake-wizard comments here?
>> you should be able to set the backend compiler like this (please
>> possibly
>> adapt to csh syntax):
> hi,
>
>> export OMPI_FC=pgf90
>> export OMPI_F77=pgf90
>> export OMPI_CC=pgCC (not 100% sure about the pgCC name)
> i fear this won't work, ompi_* are environment variables for OpenMPI.
> MPICH2, e.g. uses MPICH_F90 instead of OMPI_FC...

oops sorry, forgot it was not OpenMPI. i tested it for OpenMPI
where cmake picked up the right backend compiler. as Stefan suggests
there exist corresponding MPICH_... env variables.

radovan

Stefan Knecht

unread,
Mar 13, 2012, 1:20:23 PM3/13/12
to dirac-users
hi,

(did some google-research). here is what should work for HP-MPI (your
default MPI on the cluster):

COMPILER VARIABLE
mpicc <--> MPI_CC: setenv MPI_CC 'pgcc'
mpiCC <--> MPI_CXX
mpif77 <--> MPI_F77: setenv MPI_F77 'pgf90'
mpif90 <--> MPI_F90: setenv MPI_F90 'pgf90'

with best regards,

stefan

Reply all
Reply to author
Forward
0 new messages