Skip to content

Commit

Permalink
use setup.py (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: Neil Wu <[email protected]>
  • Loading branch information
Josh Anibal and ewu63 authored Jun 16, 2020
1 parent 75c690f commit 7892630
Show file tree
Hide file tree
Showing 150 changed files with 583 additions and 73 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install:
# We thrown away the existing repo in Docker, and copy the new one in-place
- docker exec -it app /bin/bash -c "rm -rf $DOCKER_WORKING_DIR && cp -r $DOCKER_MOUNT_DIR $DOCKER_WORKING_DIR"
# Download input files for regression testing
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/python && wget http://mdolab.engin.umich.edu/sites/default/files/mdolabwebsite/repos/idwarp/input_files.tar.gz && tar -xzf input_files.tar.gz"
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && wget http://mdolab.engin.umich.edu/sites/default/files/mdolabwebsite/repos/idwarp/input_files.tar.gz && tar -xzf input_files.tar.gz"
# Copy over the correct config file and modify as needed
- if [[ "$DOCKER_TAG" == "py3-centos7-impi" ]]; then
docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && cp config/defaults/config.LINUX_INTEL_OPENMPI.mk config/config.mk";
Expand All @@ -47,12 +47,14 @@ install:

# Compile real and complex builds
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make && make -f Makefile_CS PETSC_ARCH=complex-opt-\$COMPILERS-\$PETSCVERSION"
# Install Python interface
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && pip install ."

script:
# Real tests
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/python/reg_tests && python run_reg_tests.py -nodiff"
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/reg_tests && python run_reg_tests.py -nodiff"
# Complex tests
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/python/reg_tests && export PETSC_ARCH=complex-opt-\$COMPILERS-\$PETSCVERSION && python run_reg_tests_cs.py -nodiff"
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/reg_tests && export PETSC_ARCH=complex-opt-\$COMPILERS-\$PETSCVERSION && python run_reg_tests_cs.py -nodiff"


after_script:
Expand Down
4 changes: 0 additions & 4 deletions __init__.py

This file was deleted.

57 changes: 14 additions & 43 deletions doc/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

Building
--------
IDWarp depends on the follow libraries:
- CGNS Library
- PETSc
- MPI

All the core computations in :ref:`IDWarp` are coded in Fortran. It
is therefore necessary to build this library before using
:ref:`IDWarp`.
See the MDO Lab installation guide `here <http://mdolab.engin.umich.edu/docs/installInstructions/install3rdPartyPackages.html>`_ for the supported versions and installation instructions.

To see a list of architectures that :ref:`IDWarp` has been known to
All the core computations in IDWarp are coded in Fortran.
It is therefore necessary to build this library before using IDWarp.

To see a list of architectures that IDWarp has been known to
compile on run::

make

from the root directory.
Expand All @@ -28,44 +33,10 @@ the screen (near the end)::
If you don't see this, it will be necessary modify the configure
options in the config file.

Now open ``config/config.mk`` which should look like::

# ----------------------------------------------------------------------
# Config file for Gfortran with OpenMPI
# ----------------------------------------------------------------------

# ------- Define a possible parallel make ------------------------------
PMAKE = make -j 4

# ------- Define the MPI Compilers--------------------------------------
FF90 = mpif90
CC = mpicc

# ------- Define CGNS Inlcude and linker flags -------------------------
CGNS_INCLUDE_FLAGS=-I$(HOME)/packages/cgnslib_3.2.1/src
CGNS_LINKER_FLAGS=-L$(HOME)/packages/cgnslib_3.2.1/src -lcgns

# ------- Define Compiler Flags ----------------------------------------
FF90_GEN_FLAGS = -fPIC
CC_GEN_FLAGS = -fPIC

FF90_OPT_FLAGS = -fPIC -fdefault-real-8 -O2
CC_OPT_FLAGS = -O2

# ------- Define Linker Flags ------------------------------------------
LINKER_FLAGS =

# ------- Define Petsc Info --- Should not need to modify this -----
include ${PETSC_DIR}/lib/petsc/conf/variables # PETSc 3.6+
#include ${PETSC_DIR}/conf/variables # PETSc 3.5
PETSC_INCLUDE_FLAGS=${PETSC_CC_INCLUDES} -I$(PETSC_DIR)
PETSC_LINKER_FLAGS=${PETSC_LIB}

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py

It will most likely be necessary to modify the ``CGNS_INCLUDE_FLAGS``
and the ``CGNS_LINKER_FLAGS`` variables. After changes to the
configuration file, run ``make clean`` before attempting a new build.

Lastly, to build the Python interface, go to the root directory and type::

pip install .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions idwarp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__version__ = '2.2.0'

from .UnstructuredMesh import USMesh
from .MultiUnstructuredMesh import MultiUSMesh
from .UnstructuredMesh_C import USMesh_C
from .MultiUnstructuredMesh_C import MultiUSMesh_C
File renamed without changes.
1 change: 0 additions & 1 deletion python/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions python/examples/AhmedBodyCoarse/FFD/bodyFittedFFD.fmt

This file was deleted.

11 changes: 0 additions & 11 deletions python/examples/AhmedBodyCoarse/FFD/globalFFD.fmt

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 7892630

Please sign in to comment.