[Trilinos-Users] building Trilinos with Intel 7.0

Tony Hammond hammonda@cae.wisc.edu
Fri, 7 Feb 2003 01:06:34 -0600 (CST)


I checked, and there is not an unmatched double quote in my build script.
The script would not execute if it had an unmatched double quote.  I guess
that I should have put more separation between the sections in my help
request.  The first two groups of output are the command line output of
configure and a snipit of the contents of packages/epetra/config.log
respectively.

There are two reasons I am using a build script.  The first is that it
makes it easier for me to modify the build environment that configure
sees.  The second is that I had to define the F77 environment variable to
build Trilinos using the Lahey Fortran compiler ( otherwise it used f77 ),
so I did the same when using the Intel compilers.

I've fished around some more, and the problem I initially reported seems
to be caused by searching for the compiler flag to use in order to get
verbose compiler output for the various stages of compilation.  With both
the GNU compiler collection and the Intel compilers this flag is -v.
the difference is that `gcc -v` produces this output:



[root@tritium Trilinos_build_intel]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)



while `icc -v` produces this output:



[root@tritium Trilinos_build_intel]# icc -v
ld  \
    /usr/lib/crt1.o \
    /usr/lib/crti.o \
    /opt/tritium/intel/compiler70/ia32/lib/crtxi.o \
    -dynamic-linker \
    /lib/ld-linux.so.2 \
    -u \
    ___get_intrinsics \
    -o \
    a.out \
    -rpath \
    /opt/tritium/intel/compiler70/ia32/lib \
    -Qy \
    -L/opt/tritium/intel/compiler70/ia32/lib \
    -L/usr/lib \
    -Bstatic \
    -limf \
    -Bdynamic \
    -lm \
    -Bstatic \
    -lirc \
    -Bstatic \
    -lcprts \
    -Bdynamic \
    -lcxa \
    -Bstatic \
    -lunwind \
    -Bdynamic \
    -lc \
    /opt/tritium/intel/compiler70/ia32/lib/crtxn.o \
    /usr/lib/crtn.o

/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'




The most noticeable difference I saw was the abundance of special
characters.  I modified the epetra configure script to not try -v when
looking for verbose compiler output.  Now the epetra configure script just
issues a warning where it was failing before, but chokes later on when
trying to find BLAS.  I reran the build processes using the Lahey Fortran
compiler and noticed that it uses --verbose to get compilation
information.  It also does not have any backslashes in its verbose output
like gcc.

My guess is that there is an embedded sed or perl script somewhere in the
epetra configure script that is not filtering out special characters
correctly.  This may explain the -L\ in the configure output and possibly
the mismatched double quotes.  Anyone have any thought on this?  I hope
that this discussion is not too off-topic for the user mailing list.


**************************************************************************
Tony Hammond                            University of Wisconsin at Madison
Computing Cluster Administrator         Department of Engineering Physics
Phone:  608-263-6577                    Room 522
Fax:  608-265-4546                      1500 Engineering Drive
Mobile:  608-239-8744                   Madison, WI 53706-1608
Email:  hammonda@cae.wisc.edu           Website:  http://www.cae.wisc.edu

On Thu, 6 Feb 2003, Willenbring, James M wrote:

> (Trilinos-Users note I forgot to CC the list into my reply - you might wish
> to wait for another response before tackling the problem.  My response
> centered around a stray ", and some alternative ways to pass options.)
>
> Tony,
> By the way, I know of no one who as compiled Trilinos using Intel compilers.
> We have talked about it, and will try to get to it.  If you get a script
> that works, please send it our way.
>
> Thanks.
>
> Jim
>
> -----Original Message-----
> From: Tony Hammond
> To: trilinos-users@software.sandia.gov
> Sent: 2/6/2003 2:42 PM
> Subject: [Trilinos-Users] building Trilinos with Intel 7.0
>
> I have a quick question.  Has anyone been able to build Trilinos with
> Intel's compilers ( icc and ifc ) version 7.0.  I keep getting an error
> that looks like this:
>
> checking for Fortran 77 libraries...
> -L/opt/tritium/intel/compiler70/ia32/lib -L/opt/tritium/blas.intel/lib
> -L/opt/tritium/lapack.intel/lib -L/opt/tritium/mpich.intel/lib -lm
> -lblas
> -llapack -lmpich" -L\ -lmpich -L/usr/lib -lintrins -lIEPCF90 -lF90 -limf
> -lirc -lcxa -lunwind
> checking for dummy main to link with Fortran 77 libraries... unknown
> configure: error: linking to Fortran libraries from C fails
> configure: error: /bin/sh '../../../Trilinos/packages/epetra/configure'
> failed for packages/epetra
>
> Inside of packages/epetra/config.log is:
>
> configure:5888: icc -o conftest -O1 -tpp6 -xiM -mp -prec_div -pc64
> -I/opt/tritium/mpich.intel/include
> -L/opt/tritium/intel/compiler70/ia32/lib -L/opt/tritium/blas.intel/lib
> -L/opt/tritium/lapack.intel/lib -L/opt/tritium/mpich.intel/lib
> conftest.c
> -lm -lblas -llapack -lmpich  -L/opt/tritium/intel/compiler70/ia32/lib
> -L/opt/tritium/blas.intel/lib -L/opt/tritium/lapack.intel/lib
> -L/opt/tritium/mpich.intel/lib -lm -lblas -llapack -lmpich" -L\ -lmpich
> -L/usr/lib -lintrins -lIEPCF90 -lF90 -limf -lirc -lcxa -lunwind >&5
> ld: cannot find -lmpich"
>
> I am building Trilinos using a bourne shell script:
>
> -*-*-*-*-*-*-
> #!/bin/sh
>
> # Make sure that the build environment is set up properly
> . /etc/profile.d/iccvars.sh
> . /etc/profile.d/ifcvars.sh
>
> export CC="icc"
> export CXX="icc"
> export F77="ifc"
> export CPPFLAGS="-I/opt/tritium/mpich.intel/include"
> export CFLAGS="-O1 -tpp6 -xiM -mp -prec_div -pc64"
> export CXXFLAGS="-O1 -tpp6 -xiM -mp -prec_div -pc64"
> export FFLAGS="-O1 -tpp6 -xiM -mp -prec_div -pc64 -132"
> export LDFLAGS="-L/opt/tritium/intel/compiler70/ia32/lib
> -L/opt/tritium/blas.intel/lib -L/opt/tritium/lapack.intel/lib
> -L/opt/tritium/mpich.intel/lib"
> export LIBS="-lm -lblas -llapack -lmpich"
>
> ../Trilinos/configure --prefix=/opt/tritium/Trilinos-3.0.intel
> --with-mpi-cc=icc --with-mpi-cxx=icc --with-mpi-f77=ifc
> --enable-referencey12m && make && make install
> -*-*-*-*-*-*-
>
> I think that configure is choking because it cannot find libmpich.a.
> This is due to the -L\ that crept into the ac_cv_flibs variable.  Has
> anyone been able to build Trilinos with the Intel compilers?  If so how
> did you build it.  I have gotten Trilinos to build using the GNU C and
> C++
> compilers combined with the Lahey Fortran 95 compiler and a build script
> very similar to that above.  I think that the problem is an interaction
> between the configure script and Intel's compilers.  Any comments on
> what
> may be wrong would be very much appreciated.
>
>
> ************************************************************************
> **
> Tony Hammond                            University of Wisconsin at
> Madison
> Computing Cluster Administrator         Department of Engineering
> Physics
> Phone:  608-263-6577                    Room 522
> Fax:  608-265-4546                      1500 Engineering Drive
> Mobile:  608-239-8744                   Madison, WI 53706-1608
> Email:  hammonda@cae.wisc.edu           Website:
> http://www.cae.wisc.edu
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users@software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>