[mvapich-discuss] How do I build -O0?
Pavan Balaji
balaji at mcs.anl.gov
Tue Dec 1 15:23:33 EST 2009
Use the --disable-fast configure option or --enable-fast=O0.
-- Pavan
On 12/01/2009 01:42 PM, Adam Moody wrote:
> Hello MVAPICH team,
> I'm trying to get a "-g -O0" build of MVAPICH2-1.4 so that I see correct
> line numbers in the MPI source under a debugger like TotalView. I'm
> using the following settings, which I think should work based on the
> help info in the configure command:
> #!/bin/bash
> export PREFIX=`pwd`
> export CC=gcc
> export CXX=g++
> export F77=gfortran
> export F90=gfortran
> export MPICH2LIB_CFLAGS="-g -O0"
> export MPICH2LIB_CXXFLAGS="-g -O0"
> export MPICH2LIB_FFLAGS="-g -O0"
> export MPICH2LIB_F90FLAGS="-g -O0"
> export CONFIG_FLAGS="--disable-fast --enable-g=dbg
> --enable-error-checking=runtime --enable-error-messages=all
> --enable-nmpi-as-mpi"
> ./configure \
> --prefix=$PREFIX \
> --enable-sharedlibs=gcc \
> --enable-f77 --enable-f90 --enable-cxx \
> $CONFIG_FLAGS \
> --enable-debuginfo \
> --with-pmi=slurm --with-pm=no \
> --with-rdma=gen2 --with-ib-include=/usr/include
> --with-ib-lib=/usr/lib64 \
> --enable-registration-cache --enable-limic2 \
> --enable-romio --with-file-system=lustre+nfs+ufs \
> --disable-mpe --without-mpe
>
> I'm building the MVAPICH2-1.4 tarball from:
> http://mvapich.cse.ohio-state.edu/download/mvapich2/mvapich2-1.4.tgz
>
> It seems to do the correct thing with --enable-g=dbg and
> MPICH2LIB_CFLAGS as an extra "-g -g -O0" gets appended to the CFLAGS,
> but there is this leading "-g -O2" that I can't get rid of (see below):
>
> === configuring in channels/mrail
> (/usr/global/tools/mpi/checkouts/llnl/mvapich2-1.4-r3536/mvapich2-1.4/src/mpid/ch3/channels/mrail)^M
>
> configure: running /bin/sh ./configure --disable-option-checking
> '--prefix=/usr/global/tools/mpi/checkouts/llnl/mvapich2-1.4-r3536/mvapich2-1.4'
> '--enable-sharedlibs=gcc' '--enable-f77' '--enable-f90' '--enable-cxx'
> '--disable-fast' '--enable-g=dbg' '--enable-error-checking=runtime'
> '--enable-error-messages=all' '--enable-nmpi-as-mpi'
> '--enable-debuginfo' '--with-pmi=slurm' '--with-pm=no'
> '--with-rdma=gen2' '--with-ib-include=/usr/include'
> '--with-ib-lib=/usr/lib64' '--enable-registration-cache'
> '--enable-limic2' '--enable-romio' '--with-file-system=lustre+nfs+ufs'
> '--disable-mpe' '--without-mpe' 'CC=gcc' 'F77=gfortran' 'F90=gfortran'
> 'CXX=g++' 'MPICH2LIB_CFLAGS=-g -O0' 'MPICH2LIB_CXXFLAGS=-g -O0'
> 'MPICH2LIB_FFLAGS=-g -O0' 'MPICH2LIB_F90FLAGS=-g -O0'
> '--enable-header-caching' 'CFLAGS=-g -O2 -g -g -O0' 'LIBS=-lpthread '
> 'CPPFLAGS=-I/usr/include ' --cache-file=/dev/null --srcdir=.
>
> I think I could perhaps set CFLAGS explicitly to "-g -O0", but this then
> forces "-g -O0" into the MPI wrapper scripts like mpicc, which I don't
> want. I'd just like the MPI library itself to build with -O0, not the
> application code. Is there a way to do this? I can't seem to find the
> right flag or environment variable.
> Thanks,
> -Adam
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mvapich-discuss
mailing list