Queenbee

Build PETSC-dev

  • ~/.soft:
+gcc-4.3.2
+openmpi-1.3.4-gcc-4.3.2
@default
  • configure

PETSC_DIR=`pwd` config/configure.py <options>

  • ~/.bashrc
export PETSC_ARCH=linux-gnu-cxx-opt
export PETSC_DIR=/home/rupesh/petsc-dev-aict-old
  • . ~/.bashrc or log out and back in

[rupesh@qb3 petsc-dev]$ make

  • The build the fcpu code: make

PETSc 3.1

wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.1-p0.tar.gz

Old way not working

  • PETSC_DIR=`pwd` config/configure.py —with-clanguage=cxx —with-sieve=1 —download-chaco —with-shared=0 -with-opt-sieve=1 —with-debugging=no —with-mpi-shared=0 —download-f-blas-lapack=1 —download-boost=1
  • make PETSC_DIR=/home/rupesh/petsc-3.1-p0 PETSC_ARCH=linux-gnu-cxx-opt all
Compilers:
  C Compiler:         mpicc  -Wall -Wwrite-strings -Wno-strict-aliasing -g3
  Fortran Compiler:   mpif77  -Wall -Wno-unused-variable -g
Linkers:
  Static linker:   /usr/bin/ar cr
MPI:
  Includes: -I/usr/local/packages/openmpi/1.3.4/gcc-4.3.2/include
X11:
  Includes: -I/usr/X11R6/include
  Library:  -L/usr/X11R6/lib64 -lX11
BLAS/LAPACK: -llapack -lblas
PETSc:
  PETSC_ARCH: linux-gnu-cxx-opt
  PETSC_DIR: /home/rupesh/petsc-3.1-p0
  Clanguage: C
  Memory alignment: 16
  Scalar type: real
  Precision: double
  shared libraries: disabled
  dynamic libraries: disabled

It seems that it does not work to include the sieve and C++. It has changed its options slightly.

Slight changes to get it working

PETSC_DIR=`pwd` ./configure —with-clanguage=C++ —with-sieve=1 —with-opt-sieve=1 —download-chaco=1 —download-boost=1 —with-shared=0 —with-debugging=no —with-mpi-shared=0 —download-f-blas-lapack=1

This one seems to work:

Compilers:
  C Compiler:         mpicc  -Wall -Wwrite-strings -Wno-strict-aliasing -O 
  C++ Compiler:       mpicxx  -Wall -Wwrite-strings -Wno-strict-aliasing -O   
  Fortran Compiler:   mpif77  -Wall -Wno-unused-variable -O  
Linkers:
  Static linker:   /usr/bin/ar cr
MPI:
  Includes: -I/usr/local/packages/openmpi/1.3.4/gcc-4.3.2/include
X11:
  Includes: -I/usr/X11R6/include
  Library:  -L/usr/X11R6/lib64 -lX11
BLAS/LAPACK: -Wl,-rpath,/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -lflapack -Wl,-rpath,/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -lfblas
Sieve:
  Includes: -I/home/rupesh/petsc-3.1-p0/include/sieve
Boost:
  Includes: -I/home/rupesh/petsc-3.1-p0/externalpackages/Boost/ -I/usr/local/packages/openmpi/1.3.4/gcc-4.3.2/include
Chaco:
  Library:  -Wl,-rpath,/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -lchaco
PETSc:
  PETSC_ARCH: linux-gnu-cxx-opt
  PETSC_DIR: /home/rupesh/petsc-3.1-p0
  Clanguage: Cxx
  Memory alignment: 16
  Scalar type: real
  Precision: double
  shared libraries: disabled
  dynamic libraries: disabled
xxx=========================================================================xxx
   Configure stage complete. Now build PETSc libraries with:
   make PETSC_DIR=/home/rupesh/petsc-3.1-p0 PETSC_ARCH=linux-gnu-cxx-opt all
xxx=========================================================================xxx

Sieve Examples

  • cd /home/guntaka/src/petsc-dev/src/dm/mesh/examples/tutorials

bratu: not working

To build it, we need the Python CXX package, FIAT and Generator.

Not working

watson: should work

make watson

It compiles waston.cxx to waston.o but failed to link. Same problem as fcpu.

unitTests: should work

  • cd src/dm/mesh/examples/tests
  • make unitTests

This should always work if cppunit is installed.
To install cppunit

export CPLUS_INCLUDE_PATH=$HOME/include

  • vi makefile

unitTests: stl1.o sifter1.o sieve1.o isieve1.o section1.o isection1.o imesh1.o distribution1.o idistribution1.o unitTests.o chkopts
-${CLINKER} -o unitTests stl1.o sifter1.o sieve1.o isieve1.o section1.o isection1.o imesh1.o distribution1.o idistribution1.o unitTests.o ${PETSC_DM_LIB} -lcppunit -L$HOME/lib

Using Existing Packages and Intel Compilers

add to ~/.soft

+intel-cc-11.1
+intel-fc-11.1
+lapack-3.2-intel-11.1-mvapich2-1.4
+mvapich2-1.4-intel-11.1
+boost-1.37.0-intel-11.1

./configure —with-clanguage=C++ —with-sieve=1 —with-opt-sieve=1 —download-chaco=1 —with-shared=0 —with-debugging=no —with-mpi-shared=0 —with-boost=1 —with-boost-dir=/usr/local/packages/boost/1.37.0/intel-11.1/

Output:

Compilers:
  C Compiler:         mpicc  -O
  C++ Compiler:       mpicxx  -O
  Fortran Compiler:   mpif90  -O
Linkers:
  Static linker:   /usr/bin/ar cr
MPI:
  Includes: -I/usr/local/packages/mvapich2/1.4/intel-11.1/include
X11:
  Includes: -I/usr/X11R6/include
  Library:  -L/usr/X11R6/lib64 -lX11
BLAS/LAPACK: -llapack -lblas
Sieve:
  Includes: -I/home/rupesh/petsc-3.1-p0/include/sieve
Boost:
  Includes: -I/usr/local/packages/boost/1.37.0/intel-11.1/ -I/usr/local/packages/mvapich2/1.4/intel-11.1/include
Chaco:
  Library:  -Wl,-rpath,/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-3.1-p0/linux-gnu-cxx-opt/lib -lchaco
PETSc:
  PETSC_ARCH: linux-gnu-cxx-opt
  PETSC_DIR: /home/rupesh/petsc-3.1-p0
  Clanguage: Cxx
  Memory alignment: 16
  Scalar type: real
  Precision: double
  shared libraries: disabled
  dynamic libraries: disabled
xxx=========================================================================xxx
   Configure stage complete. Now build PETSc libraries with:
   make PETSC_DIR=/home/rupesh/petsc-3.1-p0 PETSC_ARCH=linux-gnu-cxx-opt all
xxx=========================================================================xxx

old ACIT built petsc-dev

Copied from

cluster.srv.uablerta.ca@/home/sjin1/software/src/petsc-dev-opt-g++

Preparation:

  • sjin1@opteron-cluster src $ cp -a petsc-dev-opt-g++/ ~/scratch/petsc-dev-aict-old
  • PETSC_DIR=`pwd` make allclean
  • rm -fR externalpackages/ inux-gnu-cxx-*
  • tar -czf petsc-dev-aict-old.tar.gz petsc-dev-aict-old/: the resulting file is 114MB.
  • scp petsc-dev-aict-old.tar.gz lsu:~/

Build this package on qb:

PETSC_DIR=`pwd` config/configure.py —with-clanguage=cxx —with-sieve=1 —download-chaco —with-shared=0 -with-opt-sieve=1 —with-debugging=no —with-mpi-shared=0 —download-f-blas-lapack=1 —download-boost=1

output

Compilers:                                                                                                                 
  C Compiler:         mpicc  -Wall -Wwrite-strings -Wno-strict-aliasing -O 
  C++ Compiler:       mpicxx  -Wall -Wwrite-strings -Wno-strict-aliasing -O   
  Fortran Compiler:   mpif77  -Wall -Wno-unused-variable -O  
Linkers:
  Static linker:   /usr/bin/ar cr
PETSc:
  **
  ** Before running "make" your PETSC_ARCH must be specified with:
  **  ** setenv PETSC_ARCH linux-gnu-cxx-opt (csh/tcsh)
  **  ** PETSC_ARCH=linux-gnu-cxx-opt; export PETSC_ARCH (sh/bash)
  **
  PETSC_DIR: /home/rupesh/petsc-dev-aict-old
  **
  ** Now build and test the libraries with "make all test"
  **
  Clanguage: Cxx
  Scalar type:real
MPI:
  Includes: -I/usr/local/packages/openmpi/1.3.4/gcc-4.3.2/include
X11:
  Includes: ['-I/usr/X11R6/include']
  Library: ['-L/usr/X11R6/lib64 -lX11']
  PETSc shared libraries: disabled
  PETSc dynamic libraries: disabled
BLAS/LAPACK: -Wl,-rpath,/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -lflapack -Wl,-rpath,/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -lfblas
c2html:
Sieve:
  Includes: -I/home/rupesh/petsc-dev-aict-old/include/sieve
Boost:
  Includes: -I/home/rupesh/petsc-dev-aict-old/externalpackages/Boost/ -I/usr/local/packages/openmpi/1.3.4/gcc-4.3.2/include
sowing:
Chaco:
  Library:  -Wl,-rpath,/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -L/home/rupesh/petsc-dev-aict-old/linux-gnu-cxx-opt/lib -lchaco

Mecurial Version

References

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License