1. Lisandro Dalcin
  2. tao4py
  3. Issues
Issue #1 resolved


created an issue

I'm trying to install tao4py on OSX. I installed PETSc 3.4.2 and TAO 2.2. I set PETSC_DIR=/usr/local/Cellar/petsc/3.4.2, PETSC_ARCH=arch-darwin-c-opt and TAO_DIR=/usr/local/Cellar/tao/2.2.

tao4py complains that my PETSC_ARCH is invalid, and discards it. It then proceeds to look for libtao in $TAO_DIR/lib. However, libtao is found under $TAO_DIR/$PETSC_ARCH/lib:

libtao.a          libtao.dylib      libtao.dylib.dSYM

and PETSC_ARCH has been determined by PETSc itself. So I don't see how it is "invalid".

Here's the log:

$ pip install hg+https://bitbucket.org/dalcinl/tao4py
Downloading/unpacking hg+https://bitbucket.org/dalcinl/tao4py
  Cloning hg https://bitbucket.org/dalcinl/tao4py to /var/folders/5f/2xxztxbx2gb961387014r1fw0000gn/T/pip-OHUegW-build
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
  Running setup.py egg_info for package from hg+https://bitbucket.org/dalcinl/tao4py

    invalid PETSC_ARCH: arch-darwin-c-opt (ignored)
Requirement already satisfied (use --upgrade to upgrade): petsc4py>=3.3.1 in ./lib/python2.7/site-packages (from tao4py==2.1.1)
Requirement already satisfied (use --upgrade to upgrade): Cython>=0.15 in ./lib/python2.7/site-packages (from tao4py==2.1.1)
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python2.7/site-packages (from petsc4py>=3.3.1->tao4py==2.1.1)
Installing collected packages: tao4py
  Running setup.py install for tao4py
    invalid PETSC_ARCH: arch-darwin-c-opt (ignored)

etc... and then:

    ld: warning: directory not found for option '-L/usr/local/Cellar/tao/2.2/lib'
    ld: warning: directory not found for option '-L/usr/local/Cellar/tao/2.2/lib'
    ld: library not found for -ltao
    collect2: ld returned 1 exit status
    error: command 'mpicc' failed with exit status 1

So why is tao4py rejecting my PETSC_ARCH??? petsc4py doesn't complain about it.


Comments (7)

  1. Dominique reporter

    I don't. I followed closely the PETSc installation directions and they say the following:

    ./configure --prefix=/tmp/petsc_install
    make PETSC_DIR=$PWD PETSC_ARCH=arch-darwin-c-opt all
    make PETSC_DIR=$PWD PETSC_ARCH=arch-darwin-c-opt install

    Then it says:

    Install complete. It is useable with PETSC_DIR=/tmp/petsc_install [and no more PETSC_ARCH].


    $ ls /tmp/petsc_install/
    bin     conf    include lib     share

    So there is a $PETSC_DIR but no $PETSC_DIR/$PETSC_ARCH. The value of $PETSC_ARCH is in one of the files under $PETSC_DIR/conf. That's all I get when I follow the instructions.

  2. Lisandro Dalcin repo owner

    I see, the problem here is that you do not have $PETSC_DIR/$PETSC_ARCH, but you have $TAO_DIR/$PETSC_ARCH. You should "make install" in TAO, in such a way that $PETSC_ARCH is no longer required. Can you try this? What TAO version are you using?

  3. Log in to comment