[petsc-dev] backport setup.py to release-3.1

Barry Smith bsmith at mcs.anl.gov
Fri Sep 17 14:50:59 CDT 2010


  So far the usual arch disaster; and don't tell me I should set an environment variable before hand; that is completely insane. What it needs to do is find out the size of the pointer by compiling with mpicc and then automatically setting the right flags to just build for that arch. Is that possible?

   It is now working on petsc, I'll send any problems that come up.

   Just send this back to me so everyone doesn't have to see these emails.


   Barry


[bsmith-laptop:~] barrysmith% pip install --install-option=--user petsc slepc
Downloading/unpacking petsc
  Running setup.py egg_info for package petsc
Downloading/unpacking slepc
  Running setup.py egg_info for package slepc
    deleting pip-egg-info/slepc.egg-info/requires.txt
Downloading/unpacking mpi4py>=1.2.2 (from petsc)
  Running setup.py egg_info for package mpi4py
Installing collected packages: mpi4py, petsc, slepc
  Running setup.py install for mpi4py
    MPI C compiler:    /usr/bin/mpicc
    MPI C++ compiler:  /usr/bin/mpicxx
    MPI linker:        /usr/bin/mpicc
    checking for MPI compile and link ...
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _configtest.c -o _configtest.o
    /usr/bin/mpicc _configtest.o -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest
    building 'mpi4py.MPI' extension
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/MPI.c -o build/temp.macosx-10.6-universal-2.6/src/MPI.o
    /usr/bin/mpicc -Wl,-F. -bundle -undefined dynamic_lookup build/temp.macosx-10.6-universal-2.6/src/MPI.o -o build/lib.macosx-10.6-universal-2.6/mpi4py/MPI.so
    checking for MPE availability ...
    checking for header 'mpe.h' ...
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _configtest.c -o _configtest.o
    _configtest.c:3:17: error: mpe.h: No such file or directory
    failure.
    removing: _configtest.c _configtest.o
    failure.
    building 'mpi4py.MPE' extension
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/MPE.c -o build/temp.macosx-10.6-universal-2.6/src/MPE.o
    /usr/bin/mpicc -Wl,-F. -bundle -undefined dynamic_lookup build/temp.macosx-10.6-universal-2.6/src/MPE.o -o build/lib.macosx-10.6-universal-2.6/mpi4py/MPE.so
    checking for dlopen availability ...
    checking for header 'dlfcn.h' ...
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _configtest.c -o _configtest.o
    success!
    removing: _configtest.c _configtest.o
    succes!
    checking for library 'dl' ...
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _configtest.c -o _configtest.o
    /usr/bin/mpicc _configtest.o -ldl -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest
    building 'mpi4py.dl' extension
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DHAVE_DLFCN_H=1 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/dynload.c -o build/temp.macosx-10.6-universal-2.6/src/dynload.o
    /usr/bin/mpicc -Wl,-F. -bundle -undefined dynamic_lookup build/temp.macosx-10.6-universal-2.6/src/dynload.o -ldl -o build/lib.macosx-10.6-universal-2.6/mpi4py/dl.so
    MPI C compiler:    /usr/bin/mpicc
    MPI C++ compiler:  /usr/bin/mpicxx
    MPI linker:        /usr/bin/mpicc
    building 'python2.6-mpi' executable
    /usr/bin/mpicc -pipe -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/python.c -o build/temp.macosx-10.6-universal-2.6/src/python.o
    /usr/bin/mpicc -u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.6/Python build/temp.macosx-10.6-universal-2.6/src/python.o -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -o build/exe.macosx-10.6-universal-2.6/python2.6-mpi -Wl,-F. -arch i386 -arch ppc -arch x86_64 -ldl
    ld: warning: in build/temp.macosx-10.6-universal-2.6/src/python.o, file was built for unsupported file format which is not the architecture being linked (i386)
    Undefined symbols for architecture i386:
      "_main", referenced from:
          start in crt1.10.6.o
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    ld: warning: in build/temp.macosx-10.6-universal-2.6/src/python.o, file was built for unsupported file format which is not the architecture being linked (ppc)
    Undefined symbols for architecture ppc:
      "_main", referenced from:
          start in crt1.10.5.o
    ld: symbol(s) not found for architecture ppc
    collect2: ld returned 1 exit status
    lipo: can't open input file: /var/folders/M4/M4PTePd3FM4rLBeN0lPCkE+++TI/-Tmp-//ccDN9LNj.out (No such file or directory)
    warning: build_exe: building extension "python2.6-mpi" failed
    warning: build_exe: command '/usr/bin/mpicc' failed with exit status 1
    /usr/bin/python -O /var/folders/M4/M4PTePd3FM4rLBeN0lPCkE+++TI/-Tmp-/tmp6r1BGz.py
    removing /var/folders/M4/M4PTePd3FM4rLBeN0lPCkE+++TI/-Tmp-/tmp6r1BGz.py
  Running setup.py install for petsc
    PETSc: configure


On Sep 17, 2010, at 1:49 PM, Lisandro Dalcin wrote:

> On 17 September 2010 14:54, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> 
>>  Sorry, didn't work. Please find attached the .pip/pip.log file
>> 
> 
> My fault, I gave you wrong flags. Let's try something more robust (as
> you have Python 2.6, it should work:)
> 
> pip install --install-option=--user petsc slepc
> 
> 
> Then the stuff whould be installed in
> ~/.local/lib/python2.6/site-packages, you should have 'petsc' and
> 'slepc' subdirectories, plus some *egg-info subdirectories.
> 
> Next, go to a petsc4py-dev clone, hg pull -u, and :
> 
> unset PETSC_DIR PETSC_ARCH
> python setup.py build
> python setup.py install --user # install to to ~/.local/...
> make test
> 
> 
> -- 
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169




More information about the petsc-dev mailing list