Skip to content

Commit dd101d8

Browse files
Josh Anibalewu63
andauthored
use setup (#17)
* use setup * added files back * bump version numbers * Update install.rst * Update setup.py * Update .travis.yml Co-authored-by: Neil Wu <neilwu0626@gmail.com>
1 parent 65988cc commit dd101d8

33 files changed

Lines changed: 1610 additions & 87 deletions

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ install:
4343
fi
4444
fi
4545
# Compile
46-
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make"
46+
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make && pip install ."
47+
4748
# the version of testflo is too new, we downgrade to the last version that supports py2
4849
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && pip install testflo==1.3.5 "
4950

5051
script:
5152
# We need to source the mdolab bashrc before running anything
5253
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && testflo . -v -n 1"
5354
# check that new CGNS files have been generated
54-
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/python/examples && ls -l */*.cgns"
55+
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/examples && ls -l */*.cgns"
5556

5657
after_script:
5758
- docker rm -f app

__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/install.rst

Lines changed: 11 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -10,99 +10,28 @@ Prerequisites
1010
"heavy lifting". The following external components are required for
1111
pyHyp:
1212

13+
- CGNS Libarary
14+
- PETSc
1315

14-
1. `CGNS Library <http://cgns.sourceforge.net>`_
15-
16-
The CGNS library is used to provide output CGNS functionality for
17-
pyHyp. The latest CGNS version 3.1 is recommended, but the older
18-
version 2.5.x may also be used. The After downloading, untar::
19-
20-
$ tar -xzf cgnslib_3.1.4-2.tar.gz
21-
22-
.. NOTE:: cmake and ccmake are required for building the CGNS
23-
library.
24-
25-
Enter cgnslib_3.1.4 and type::
26-
27-
$ cmake .
28-
29-
By default, the CGNS library does not include the Fortran bindings
30-
that are required for `pyHyp`. This needs to be enabled using the
31-
cmake configure utility, `ccmake`.::
32-
33-
$ ccamke .
34-
35-
A "GUI" appears and toggle ENABLE_FORTRAN by pressing [enter]. Type
36-
'c' to reconfigure and 'g' to generate and exit. Then build the
37-
library using::
38-
39-
$ make
40-
41-
If you are compiling on machine without root access, you're done.
42-
If you are on a local machine with root access, it is usually
43-
easiest to 'install' into the default directory using::
44-
45-
$ sudo make install
46-
47-
.. NOTE:: It is also suggested that the BUILD_CGNSTOOLS option be
48-
used in the configuration, but this is optional.
49-
50-
2. `PETSc <http://www.mcs.anl.gov/petsc/index.html>`_
51-
52-
Download the latest tarball and extract::
53-
54-
$ tar -xzf petsc-3.4.1.tar.gz
55-
56-
PETSc must be first configured. There are a wide variety of
57-
options. The only ones that is strictly necessary are
58-
--with-shared-libraries and --with-fortran-interfaces. However, it is
59-
recommend the following options are used since some are required for
60-
pyWarp. To compile without debugging use: --with-debugging=no. It is
61-
HIGHLY recommended to use debugging until ready to perform production
62-
runs. In that case, you should compile with a separate architecture
63-
for the optimized build. In this case use '--PETSC_ARCH=real-opt' for
64-
example::
65-
66-
$ ./configure --with-shared-libraries --download-superlu_dist=yes --download-parmetis=yes --download-metis=yes --with-fortran-interfaces=1 --with-debuggig=yes --with-scalar-type=real --PETSC_ARCH=real-debug
67-
68-
After the configuration step, PETSc must be built. This is
69-
accomplished with the command provided at the end of the configure
70-
script. It will look something like below::
71-
72-
$ make PETSC_DIR=/home/gaetan/Downloads/petsc-3.4.1 PETSC_ARCH=real-debug all
73-
74-
The last step is to add PETSC_DIR and PETSC_ARCH entries to your
75-
.bashrc file. This is essential. It should look something like
76-
this: (Make sure the CORRECT directory is used!)::
77-
78-
export PETSC_ARCH=real-debug
79-
export PETSC_DIR=/home/user/packages/petsc-3.4.1
80-
81-
Make sure the .bashrc file is sourced before pyHyp is compiled using::
82-
83-
$ source ~/.bashrc
84-
85-
Or simply open a new terminal before compiling pyHyp.
86-
87-
See the documentation of each of these packages for further
88-
information.
16+
See the MDO Lab installation guide `here <http://mdolab.engin.umich.edu/docs/installInstructions/install3rdPartyPackages.html>`_ for the supported versions and installation instructions.
8917

9018
.. NOTE:: A working MPI is not strictly required. However, in most
9119
cases PETSc should be configured with MPI.
9220

9321
Compilation
9422
------------
23+
``pyHyp`` follows the standard MDO Lab build procedure.
24+
To start, first clone the repo. For stability we recommend checking out a tagged release.
9525

96-
`pyHyp` follows the standard MDO Lab build procedure.
97-
To start, find a configuration file close to your current setup in::
26+
Next, find a configuration file close to your current setup in::
9827

9928
$ config/defaults
10029

10130
and copy it to ''config/config.mk''. For example::
10231

10332
$ cp config/defaults/config.LINUX_GFORTRAN.mk config/config.mk
10433

105-
If you are a beginner user installing the packages on a linux desktop,
34+
If you are a beginner user installing the packages on a Linux desktop,
10635
you should use the ``config.LINUX_GFORTRAN.mk`` versions of the configuration
10736
files. The ``config.LINUX_INTEL.mk`` versions are usually used on clusters.
10837

@@ -116,10 +45,10 @@ the screen (near the end)::
11645
Testing if module hyp can be imported...
11746
Module hyp was successfully imported.
11847

119-
Finally, add the directory containing the pyhyp folder to the
120-
$PYTHONPATH variable in your bashrc file::
48+
Finally, install the Python interface with::
49+
50+
pip install .
12151

122-
export $PYTHONPATH:/path/to/folder/containing/pyhyp/
12352

12453
.. _pyhyp_theory:
12554

@@ -136,4 +65,4 @@ After you run some of the files, you will get a message like this::
13665
*** Your MPI job will now abort.
13766
[MDO-John:7977] Local abort after MPI_FINALIZE completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!
13867
139-
Despite its scary look, this is a non-issue and means that the script successfully finished.
68+
Despite its scary look, this is a non-issue and means that the script successfully finished.

0 commit comments

Comments
 (0)