petsc for 64 bits

Sanjay Govindjee sanjay at ce.berkeley.edu
Wed Jul 30 09:02:00 CDT 2008


Dear Carlos,

I happen to have written this bit of code for FEAP.  If configured 
properly it works just fine
with PETSc on a 64-bit machine.  For example my configure line for PETSc 
on a 64-bit cluster looks like:

./config/configure.py  --with-batch=1 --download-parmetis=1 
--download-prometheus=1 --download-spooles=1 --download-hypre=1 
--download-blacs=1 --download-scalapack=1 --download-mumps=1  
--with-debugging=0 --with-mpi-dir=$MPI_ROOT --with-mpi-shared=0

Note that you do not have to tell PETSc anything special.  With FEAP you 
must follow the instructions
in the installation manual which in particular ask that you use the 
include/integer8 include files as opposed to the include/integer4 ones.  
Other than that there is nothing special that you need to do yourself.

-sg


Matthew Knepley wrote:
> 1) On a 64-bit architecture, ONLY pointers are 64 bits, not integers.
>
> 2) The option --with-64-bit-indices is for people with extremely long
>     arrays, not for 64 bit machines.
>
> 3) On a 64 bit machine, PETSc will automatically switch to long pointers
>     if the 64 bit compilers are used.
>
> 4) I suspect the problem is that when you compile FEAP, It explicitly
>     manipulates the size of an integer, and does not tell us. The correct
>     way to interact with PETSc is to use PetscInt, which is always the
>     right size.
>
>     Matt
>
> On Wed, Jul 30, 2008 at 3:08 AM, Carlos A. Catania (AKA Harpo)
> <harpomaxx at gmail.com> wrote:
>   
>> Hello,
>> Perhaps this is not the right place to ask this question because I am using
>> PETSC as a library inside a third-part software. I am using feap[1] which
>> uses PETSC and also Metis for parallel execution support.
>>
>> I have a question related to petsc under 64bits. Feap is written in
>> Fortran and uses 8 bytes integer data type. As far I know this is the normal
>> behavior for AMD 64bit arch (perhaps this is not true). However when
>> feap invokes PETSC libraries,
>> a segfault error messages is shown. I read a little bit about it and
>> the problems seems to be that Petsc uses 4 bytes integers (normal
>> behaviour for IA32 arch) and there
>> are some problems with pointer references which cause the segfault error
>> message.
>>
>> Reading petsc documentation I found an option to compile petsc with 64
>> bit integer support --with-64-bit-indices=1. I tried it but when compiling
>> several  incompatibles error messages are shown. Moreover when I
>> run the test I got a lot of errors like:
>>
>> -------------------------------------------------------------
>> Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 MPI
>> processes
>> See
>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html
>> [1]PETSC ERROR: --------------------- Error Message
>> ------------------------------------
>> [1]PETSC ERROR: Null argument, when expecting valid pointer!
>> [1]PETSC ERROR: Null Object: Parameter # 1!
>> [1]PETSC ERROR:
>> ------------------------------------------------------------------------
>> [1]PETSC ERROR: Petsc Release Version 2.3.3, Patch 3, Fri Jun 15
>> 16:51:25 CDT 2007 HG revision: f051789beadcd36f77fb6111d20225e26ed7cc0d
>> [1]PETSC ERROR: See docs/changes/index.html for recent updates.
>> [1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
>> [1]PETSC ERROR: See docs/index.html for manual pages.
>> [1]PETSC ERROR:
>> ------------------------------------------------------------------------
>>
>>
>> So my question is if it is posible to compile petsc with  64bits
>> integer support?
>> Besides --with-64-bit-indices option, is there another option I should
>> add to get petsc tests work?
>>
>> My configuration is:
>> AMD 64
>> petsc version 2.3.3-p3
>> Intel C an Fortran compilers v 9.1
>> MPICH2 1.0.7
>>
>> I configured petsc with this options:
>> /config/configure.py PETSC_ARCH=GNU/Linux-gnu-amd64 CC=icc FC=ifort
>> --with-mpi-dir=/opt/mpich2/  --download-f-blas-lapack=1 --with-fc=ifort
>> --with-64-bit-indices=1
>>
>> Thanks in advance
>>
>> [1] Feap:http://www.ce.berkeley.edu/~rlt/feap/
>> --
>> Carlos A. Catania (AKA Harpo+)
>> [FP] F152 8D50 6939 E21A 7A90  CDD4 AEE4 FA48 DF70 4D68
>>
>>
>>     
>
>
>
>   

-- 
-----------------------------------------------
Sanjay Govindjee, PhD, PE
Professor of Civil Engineering
and Chancellor's Professor

709 Davis Hall
Structural Engineering, Mechanics and Materials
Department of Civil Engineering
University of California
Berkeley, CA 94720-1710

Voice:  +1 510 642 6060
FAX:    +1 510 643 8928
s_g at berkeley.edu
http://www.ce.berkeley.edu/~sanjay
-----------------------------------------------




More information about the petsc-users mailing list