The first step in using Prometheus is to install PETSc and ParMetis (both using the same MPI implementation!). Note, you should use a C compiler to build ParMetis. Run their test suites to make sure that your installation is correct.
- Download Prometheus-1.8.x
- Unpack prometheus
- Setup the environment
- Edit the makefile
- Build prometheus.a
- Go to the users guide to start using Prometheus
After downloading you can unpack the library with:Setup the shell environmentgunzip Prometheus-1.8.x.tar.gz
tar -xvf Prometheus-1.8.x.tar
Set the path to your PETSc installation (eg, place "setenv PETSC_DIR=location of PETSc" in your .cshrc file, and type "source .cshrc" if you use C shell) and the PETSc architecture environmental variable in .cshrc or in your makefile, eg:makefile(s)### point to petsc directory
PETSC_DIR = /usr/local/apps/petsc-2.2.1### declare petsc arch, one of petsc-2.2,1/bmake/*
### just the name, not the full path
PETSC_ARCH = rs6000_sp
Edit "Prometheus-1.8.x/makefile.in" with the paths for ParMetis and Prometheus, eg:Build Prometheus# point to prometheus directory
BUILD_DIR = $(HOME)/Prometheus-1.8.0
# point to paremetis directory - see note below to build w/o parmetis
METISDIR = $(HOME)/ParMetis-3.1"Prometheus-1.8.x/makefile" overrides the PETSc (makefile) rules to keep the object files in same directory as the source and to set low optimazations for the .c file predicates.c:
Note, One can build Prometheus without ParMETIS by removing the "-DPROM_HAVE_METIS" entry in this makefile.
.C.o:
-${RM} $*.o
${CC} -c ${CFLAGS} ${FCONF} ${COPTFLAGS} -DPROM_USE_PETSC -DPROM_HAVE_METIS -DPROM_HAVE_PETSC -DPROM_NO_FEI $*.C -o $*.o# No high opt for predicates
.c.o:
-${RM} $*.o
cc -c -64 ${CFLAGS} -O ${FCONF} $*.c -o $*.oPrometheus has one C source file (predicates.c) - an exact arithmetic package for geometric predicates for the Delaunay meshing functions (these are not needed if the "algebraic" multigrid method is used) . These geometric predicates require that instructions are not reorder; the "-O" optimization parameter for most C compilers will insure this, however some compilers will require that "-g" option is used (eg, gcc on Linux). Any errors in the meshing routine (cors_tria.C) are most probably a result of this and the optimization flag (-O) will need to be modified (to -g).
In the Prometheus directory, build the library with typical PETSc syntax:make BOPT=O_c++
This should construct the Prometheus library (./lib/$(PETSC_ARCH)/prometheus.a).
Note, as Prometheus is a C++ code it must be built with "BOPT=?_c++", but as your application can be a C,C++, or FORTRAN code we do not use the standard PETSc directory structure (ie, ./lib/lib$(BOPT)/$(PETSC_ARCH)/)
26 November 2004