Skip to content

Initial pull request for PyTrilinos recipe#3361

Merged
isuruf merged 33 commits intoconda-forge:masterfrom
wfspotz:master
Aug 25, 2017
Merged

Initial pull request for PyTrilinos recipe#3361
isuruf merged 33 commits intoconda-forge:masterfrom
wfspotz:master

Conversation

@wfspotz
Copy link
Copy Markdown
Contributor

@wfspotz wfspotz commented Jul 25, 2017

No description provided.

@conda-forge-linter
Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pytrilinos) and found it was in an excellent condition.

@isuruf
Copy link
Copy Markdown
Member

isuruf commented Jul 26, 2017

This has both pytrilinos and trilinos libraries. Is it possible to split them into 2 packages, one with all the C/C++ libraries and the other with the python libraries?

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Jul 26, 2017 via email

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Jul 26, 2017

@isuruf Is your question in response to the timeout on Travis?

@isuruf
Copy link
Copy Markdown
Member

isuruf commented Jul 26, 2017

timeout can be fixed by removing numpy x.x and using just numpy 1.7 in build and numpy>=1.7 in run. See conda-forge/conda-forge.github.io#415

@isuruf
Copy link
Copy Markdown
Member

isuruf commented Jul 26, 2017

I suggested splitting because the C/C++ libraries will be tied to python and pull in python to an environment when all you want is the C/C++ library. Also if you are working in a python3 environment and only want the C/C++ library, you can't install it because pytrilinos is python2 only.

@isuruf
Copy link
Copy Markdown
Member

isuruf commented Jul 26, 2017

That said, for the first iteration, we can have it as it is.

Comment thread recipes/pytrilinos/meta.yaml Outdated
url: http://trilinos.csbsju.edu/download/files/trilinos-{{ version }}-Source.tar.gz
sha256: {{ sha256 }}
patches:
- patch.txt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the file extension to .patch? Also can you explain in a comment above why this patch is needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch is needed because my build system was calling a script I had written with the shebang line

#! ${PYTHON_EXECUTABLE}

which expands out to the 256+ character path for python, but the Linux environment for conda-forge limits the shebang line to 80 characters. The fix was to run the script by specifying the python executable on the command line rather than depending on the shebang. This fix required modifying several CMakeLists.txt files.

Comment thread recipes/pytrilinos/meta.yaml Outdated

build:
number: 0
skip: true # [win]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to win or py3k

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy enough...

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Jul 26, 2017

On Linux, the recipe succeeds until it gets to the testing portion of build.sh, where I call ctest and all the tests fail. I am trying to figure out how to debug this. What I would like to do is something like

ctest
RESULT=$?
if [ $RESULT -ne 0 ]; then
    cat Testing/Temporary/LastTest.log
    exit $RESULT
fi

but I am afraid that the script will end when I get to ctest and the RESULT=$? line will never be executed.

-D BUILD_SHARED_LIBS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH=$PREFIX \
-D MPI_EXEC:FILEPATH=$PREFIX/bin/mpiexec \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try adding, -D MPI_EXEC_PRE_NUMPROCS_FLAGS=--allow-run-as-root

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how will this help?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests fail with the message below because we are running as root in the docker container,

--------------------------------------------------------------------------
mpiexec has detected an attempt to run as root.
Running at root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.

You can override this protection by adding the --allow-run-as-root
option to your cmd line. However, we reiterate our strong advice
against doing so - please do so at your own risk.
--------------------------------------------------------------------------

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add -D MPI_EXEC_MAX_NUMPROCS=$CPU_COUNT to limit the number of processes that are used in travis-ci.

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Aug 2, 2017

@isuruf Any idea what

--------------------------------------------------------------------------
The value of the MCA parameter "plm_rsh_agent" was set to a path
that could not be found:

  plm_rsh_agent: ssh : rsh

Please either unset the parameter, or check that the path is correct
--------------------------------------------------------------------------

from CircleCI is referring to?

@isuruf
Copy link
Copy Markdown
Member

isuruf commented Aug 3, 2017

Docker image doesn't have ssh installed, this suggests a workaround, open-mpi/ompi#1838 (comment)

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Aug 8, 2017

@isuruf I'm stumped. I can't figure out how to get around the MCA parameter error. The suggested workaround doesn't help.

wfspotz and others added 16 commits August 9, 2017 07:57
Build script for Mac OS X and Linux that builds PyTrilinos and all Trilinos packages supported by PyTrilinos.
Three changes: (1) skip for win OR python 3; (2) refer to new patch filename; (3) change from numpy x.x to numpy 1.7 in build section and >=1.7 in run section.
This change to calling ctest will output test results when there is a failure, to help with debugging.
The CPU limit is preventing tests I want to run and debug from
running. Note that all of these MPI tests are relatively small on a
small number of MPI nodes. Oversubscribing -- say, a 4 processor job
on 2 physical procesors -- is inefficient, but still tests what I want
tested.
@isuruf
Copy link
Copy Markdown
Member

isuruf commented Aug 9, 2017

I rebased and pushed a fix

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Aug 11, 2017

@isuruf Progress! The pre-install tests I run in build.sh (i.e., via ctest) are now working, and our error is now with the post-install tests implemented by your new run_test.py:

A requested component was not found, or was unable to be opened.  This
means that this component is either not installed or is unable to be
used on your system (e.g., sometimes this means that shared libraries
that the component requires are unable to be found/loaded).  Note that
Open MPI stopped checking at the first component that it did not find.

Host:      Traviss-Mac-9.local
Framework: pml
Component: isolated

This is true on both Circle-CI and Travis-CI. The os.environ["OMPI_MCA_pml"]="isolated" command doesn't appear to be having the intended effect.

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Aug 23, 2017

@isuruf How does run_test.py get run? Is there a different way to set the MCA option?

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Aug 24, 2017

@isuruf So what is happening with Travis-CI now? The job log is empty.

@isuruf isuruf merged commit 5ea4756 into conda-forge:master Aug 25, 2017
@isuruf
Copy link
Copy Markdown
Member

isuruf commented Aug 25, 2017

@wfspotz, thanks for your contribution. A feedstock (https://github.com/conda-forge/pytrilinos-feedstock) will be created soon.

@wfspotz
Copy link
Copy Markdown
Contributor Author

wfspotz commented Sep 3, 2017

The feedstock page says that the Linux build is failing. I finally got it to report the output of the build phase to me. Everything looks okay, but at the very end, I see this:

anaconda_upload is not set.  Not uploading wheels: []
+ test -f /home/circleci/test/build_artefacts/conda-forge-build-done
+ exit 1
Exited with code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants