[petsc-users] Solving Poisson equation with multigrid
Satish Balay
balay at mcs.anl.gov
Thu Jun 6 19:20:52 CDT 2013
On Thu, 6 Jun 2013, Michele Rosso wrote:
> Thanks Satish, now the compilation goes smooth, despite a warning during the
> configuration step:
>
> ===============================================================================
> Warning: PETSC_ARCH from environment does not match command-line
> or name of script.
> Warning: Using from command-line or name of script:
> arch-test-cray, ignoring environment: interlagos
> ===============================================================================
>
> I still have a problem though: when I compile my code the following warning
> is issued:
>
> /u/sciteam/mrosso/LIBS/petsc-3.4.0/arch-test-cray/lib/libpetsc.a(dlimpl.o): In
> function `PetscDLOpen':
> /mnt/a/u/sciteam/mrosso/LIBS/petsc-3.4.0/src/sys/dll/dlimpl.c:109: warning:
> Using 'dlopen' in statically linked applications requires at runtime the
> shared libraries from the glibc version used for linking
> /u/sciteam/mrosso/LIBS/petsc-3.4.0/arch-test-cray/lib/libpetsc.a(send.o): In
> function `PetscOpenSocket':
> /mnt/a/u/sciteam/mrosso/LIBS/petsc-3.4.0/src/sys/classes/viewer/impls/socket/send.c:97:
> warning: Using 'gethostbyname' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
>
> and the run stops because of the following error:
>
> libhugetlbfs: ERROR: RTLD_NEXT used in code not dynamically loaded
Do you get this error with PETSc examples as well?
http://www.nersc.gov/users/computational-systems/hopper/running-jobs/trouble-shooting/
says:
>>>
Make sure to load the craype-hugepages2m module.
<<<
Satish
>
> Thanks again for your help.
>
> Michele
>
> > On Thu, 6 Jun 2013, Michele Rosso wrote:
> >
> > > Hi Satish,
> > >
> > > I tried what you suggested:
> > >
> > > #!/usr/bin/python
> > > if __name__ == '__main__':
> > > import sys
> > > import os
> > > sys.path.insert(0, os.path.abspath('config'))
> > > import configure
> > > configure_options = [
> > > 'PETSC_DIR=/u/sciteam/mrosso/LIBS/petsc-3.4.0',
> > > '--with-cc=cc',
> > > '--with-clib-autodetect=0',
> > > '--with-cxx=CC',
> > > '--with-cxxlib-autodetect=0',
> > > '--with-fc=ftn',
> > > '--with-fortranlib-autodetect=0',
> > > '--with-x=0',
> > > '--with-debgging=0',
> > > '--COPTFLAGS=-O3',
> > > '--FOPTFLAGS=-O3',
> > > 'FFLAGS=-F -em',
> > > 'LIBS=-L/opt/cray/cce/8.1.7/CC/x86-64/lib/x86-64/ -lcray-c++ -rts
> > you have an extra space here ^ It
> > should be -lcray-c++-rt
> >
> > Satish
> >
> >
> > > -lcraystdc++ -lsupc++ -lgcc_eh',
> > > 'PETSC_ARCH=arch-test-cray',
> > > ]
> > > configure.petsc_configure(configure_options)
> > >
> > > but now I receive another error:
> > >
> > > "C compiler you provided with -with-cc=cc does not work"
> > >
> > > I attached the log file. Thanks for your help.
> > >
> > > Michele
> > >
> > >
> > > On 06/05/2013 02:15 PM, Satish Balay wrote:
> > > > Sorry my configure cmd file was from an older test case for c++.
> > > >
> > > > Do you need c++ build of PETSc? If not - suggest removing
> > > > --with-clanguage=C++ option.
> > > >
> > > > [Majority of use cases should not need --with-clanguage=C++ - even if
> > > > user code is using PETSc from C++]
> > > >
> > > > If c++ is needed - you can try adding: CXXCPPFLAGS='-h gnu'
> > > >
> > > > Satish
> > > >
> > > > On Wed, 5 Jun 2013, Michele Rosso wrote:
> > > >
> > > > > Thank you Satish for your help.
> > > > > I followed you instructions, but I am getting some errors during the
> > > > > compilation.
> > > > > I attached the python script I used to configure PETSc, and the logs
> > > > > for
> > > > > both
> > > > > configure and make.
> > > > >
> > > > >
> > > > > Michele
> > > > >
> > > > > On 05/31/2013 05:08 PM, Satish Balay wrote:
> > > > > > The following is my configure command to build PETSc on a cray with
> > > > > > cray compilers:
> > > > > >
> > > > > > $ cat reconfigure-arch-test-cray.py
> > > > > > #!/usr/bin/python
> > > > > > if __name__ == '__main__':
> > > > > > import sys
> > > > > > import os
> > > > > > sys.path.insert(0, os.path.abspath('config'))
> > > > > > import configure
> > > > > > configure_options = [
> > > > > > '--with-cc=cc',
> > > > > > '--with-clanguage=C++',
> > > > > > '--with-clib-autodetect=0',
> > > > > > '--with-cxx=CC',
> > > > > > '--with-cxxlib-autodetect=0',
> > > > > > '--with-fc=ftn',
> > > > > > '--with-fortranlib-autodetect=0',
> > > > > > '--with-x=0',
> > > > > > 'FFLAGS=-F -em',
> > > > > > 'LIBS=-L/opt/cray/cce/8.1.4/CC/x86-64/lib/x86-64/
> > > > > > -lcray-c++-rts
> > > > > > -lcraystdc++ -lsupc++ -lgcc_eh',
> > > > > > 'PETSC_ARCH=arch-test-cray',
> > > > > > ]
> > > > > > configure.petsc_configure(configure_options)
> > > > > > <<<<<<<<<
> > > > > >
> > > > > > And you might have to look for the recommended optimization flags -
> > > > > > and
> > > > > > use
> > > > > > with:
> > > > > > --with-debgging=0 COPTFLAGS= FOPTFLAGS= CXXOPTFLAGS= etc.
> > > > > >
> > > > > > And on BlueWaters - you would have to remove the following lines
> > > > > > from
> > > > > > PETSC_ARCH/include/petscconf.h [before runing 'make all' to build
> > > > > > the
> > > > > > libraries]
> > > > > >
> > > > > > #ifndef PETSC_HAVE_GETPWUID
> > > > > > #define PETSC_HAVE_GETPWUID 1
> > > > > > #endif
> > > > > > <<<<<
> > > > > >
> > > > > > Satish
> > > > > >
> > > > > > On Fri, 31 May 2013, Michele Rosso wrote:
> > > > > >
> > > > > > > Thanks, but I'd rather use Cray since only a small part of my code
> > > > > > > relies
> > > > > > > on
> > > > > > > PETSc and, as suggested by the BW staff,
> > > > > > > Cray-compiled code performs generally better on Cray system.
> > > > > > >
> > > > > > > Michele
> > > > > > >
> > > > > > > On 05/31/2013 02:57 PM, Jed Brown wrote:
> > > > > > > > Michele Rosso <mrosso at uci.edu> writes:
> > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I confirm that
> > > > > > > > >
> > > > > > > > > -pc_type gamg -pc_mg_cycle_type v
> > > > > > > > > -pc_gamg_agg_nsmooths 1
> > > > > > > > >
> > > > > > > > > produces the correct shift in PETSc 3.4.
> > > > > > > > > So my problem is solved. I will upgrade to 3.4 in my
> > > > > > > > > productive
> > > > > > > > > machine installation.
> > > > > > > > > It is a Cray machine (Blue Waters). Assuming I want to use the
> > > > > > > > > Cray
> > > > > > > > > compiler, which options should I use for ./configure
> > > > > > > > > for the installation.
> > > > > > > > Or the Intel compiler or GCC. PETSc should run at similar speed
> > > > > > > > with
> > > > > > > > any. IIRC, Cray recommends the Intel compiler on their machines
> > > > > > > > with
> > > > > > > > Intel CPUs. There are examples in config/examples/.
> > > > > > > >
> > >
>
>
More information about the petsc-users
mailing list