Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenMDAO/openmdao
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinSGray committed Nov 10, 2017
2 parents b340cea + f8a3d42 commit 815f357
Show file tree
Hide file tree
Showing 22 changed files with 2,904 additions and 199 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ install:
# keeping numpy pinned at 1.12 because pySNOPT dies with 1.13 because numpy broke callback
- conda install --yes python=$PY numpy==1.12 scipy nose sphinx mock swig

# trying a manual install of pyoptsparse
# install pyoptsparse
- wget https://bitbucket.org/mdolab/pyoptsparse/get/tip.zip;
- unzip tip.zip;
- cd mdolab-pyoptsparse*;
Expand Down Expand Up @@ -112,9 +112,9 @@ deploy:
skip_cleanup: true
script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
if [ "$MPI" ] && [ "$PY" = "3.4" ]; then
if [ "$MPI" ] && [ "$PY" = "3.6" ]; then
rsync -r --delete-after -v _build/html/* [email protected]:webapps/twodocversions/latest;
fi
fi
on:
branch: master
branch: master
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
OpenMDAO Naming/Legacy OpenMDAO
-------------------------------

PLEASE NOTE: Until recently, this repository was named OpenMDAO/blue. If you had cloned that repository, please update
PLEASE NOTE: Until recently, this repository was named OpenMDAO/blue. If you had cloned that repository, please update
your repository name and remotes to reflect these changes.

The OpenMDAO 1.7.3 codebase repo has been renamed to OpenMDAO1, and it resides
The OpenMDAO 1.7.3 codebase repo has been renamed to OpenMDAO1, and it resides
at https://github.com/OpenMDAO/OpenMDAO1

The OpenMDAO 2.0.x code has taken the name OpenMDAO,
The OpenMDAO 2.0.x code has taken the name OpenMDAO,
and it resides at https://github.com/OpenMDAO/OpenMDAO.

Installation of 2.0.x code will now work with `pip install openmdao`.
Expand Down Expand Up @@ -47,8 +47,8 @@ make sure you pull these updates often.
Features of OpenMDAO 1.7.x Not Yet in 2.x
-----------------------------------------

Be aware that this is an Alpha.
Not all the features of 1.7.x exist in 2.x yet.
Be aware that this is an Alpha.
Not all the features of 1.7.x exist in 2.x yet.

Here is a list of things that have not yet been fully developed in 2.x:

Expand All @@ -61,6 +61,7 @@ Here is a list of things that have not yet been fully developed in 2.x:
* Active-set constraint calculation disabling
* Brent Solver
* CaseRecording using CSV, HDF5, and dump recorders (SqliteRecorder and WebRecorder are currently supported)
* 'auto' selection of mode based on sizes of design variables and responses

Installation Instructions:
--------------------------
Expand All @@ -86,4 +87,3 @@ Documentation Building Instructions:
This will build the docs into `openmdao/docs/_build/html`.

Then, just open `openmdao/docs/_build/html/index.html` in a browser to begin.

9 changes: 5 additions & 4 deletions openmdao/components/external_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self):
self.return_code = 0 # Return code from the command
self.stdin = self.DEV_NULL
self.stdout = None
self.stderr = "error.out"
self.stderr = "external_code_error.out"

def check_config(self, logger):
"""
Expand All @@ -101,11 +101,12 @@ def check_config(self, logger):
logger.error("The command to be executed, '%s', "
"cannot be found" % program_to_execute)

# Check for missing input files
# Check for missing input files. This just generates a warning during
# setup, since these files may be generated later during execution.
missing = self._check_for_files(self.options['external_input_files'])
if missing:
logger.error("The following input files are missing at setup "
" time: %s" % missing)
logger.warning("The following input files are missing at setup "
"time: %s" % missing)

def compute(self, inputs, outputs):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
import time
import argparse


def main():
""" Just an external program for testing ExternalCode. """
"""
A standalone program for testing ExternalCode.
Writes "test data" to the specified output file after an optional delay.
Optionally writes the value of the environment variable "TEST_ENV_VAR"
to the file.
"""

parser = argparse.ArgumentParser()
parser.add_argument("output_filename")
parser.add_argument("-e", "--write_test_env_var", help="Write the value of TEST_ENV_VAR to the file",
action="store_true", default=False)
parser.add_argument("-e", "--write_test_env_var",
help="Write the value of TEST_ENV_VAR to the file",
action="store_true", default=False)
parser.add_argument("-d", "--delay", type=float,
help="time in seconds to delay")
help="time in seconds to delay")

args = parser.parse_args()

Expand All @@ -26,6 +34,6 @@ def main():

return 0


if __name__ == '__main__':
main()

22 changes: 22 additions & 0 deletions openmdao/components/tests/extcode_paraboloid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python
#
# usage: extcode_paraboloid.py input_filename output_filename
#
# Read the values of `x` and `y` from input file
# and write the value of `f_xy` to output file.

if __name__ == '__main__':
import sys

input_filename = sys.argv[1]
output_filename = sys.argv[2]

with open(input_filename, 'r') as input_file:
file_contents = input_file.readlines()

x, y = [float(f) for f in file_contents]

f_xy = (x-3.0)**2 + x*y + (y+4.0)**2 - 3.0

with open(output_filename, 'w') as output_file:
output_file.write('%f\n' % f_xy)
18 changes: 0 additions & 18 deletions openmdao/components/tests/external_code_feature_sample.py

This file was deleted.

Loading

0 comments on commit 815f357

Please sign in to comment.