-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
223 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
os: | ||
- linux | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
language: generic | ||
|
||
services: | ||
- docker | ||
env: | ||
global: | ||
- REPO_NAME=cgnsutilities | ||
- DOCKER_WORKING_DIR=/home/mdolabuser/repos/$REPO_NAME | ||
- DOCKER_MOUNT_DIR=/home/mdolabuser/travis/$REPO_NAME | ||
jobs: | ||
- DOCKER_TAG=py2-latest | ||
- DOCKER_TAG=py3-stable | ||
- DOCKER_TAG=py3-latest | ||
- DOCKER_TAG=py3-impi | ||
- DOCKER_TAG=py3-centos7-impi | ||
|
||
before_install: | ||
- docker pull mdolab/public:$DOCKER_TAG | ||
# run Docker, key is we mount the current Travis directory into Docker to access content of repo | ||
- docker run -t -d | ||
--name app | ||
--mount "type=bind,src=$(pwd),target=$DOCKER_MOUNT_DIR" | ||
mdolab/public:$DOCKER_TAG | ||
/bin/bash | ||
|
||
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" | ||
# Copy over the correct config file and modify as needed | ||
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && cp config.mk.info config.mk"; | ||
- if [[ "$DOCKER_TAG" == "py2"* ]]; then | ||
docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && sed -i 's/python3-config/python-config/g' config.mk"; | ||
elif [[ "$DOCKER_TAG" == "py3-centos7-impi" ]]; then | ||
docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && sed -i 's/gfortran/ifort/g' config.mk && sed -i 's/gcc/icc/g' config.mk"; | ||
fi | ||
# Compile | ||
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make && pip install ." | ||
|
||
script: | ||
# There are no tests for cgnsutilities | ||
# we just check that we can run the command line script here | ||
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd \$HOME && cgns_utils -h" | ||
|
||
after_script: | ||
- docker rm -f app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# cgnsUtilities | ||
|
||
This repository contains a single program called `cgns_utils` that | ||
provides many useful functions for working with cgns grids. | ||
|
||
## Installation Instructions | ||
|
||
First, copy the default configuration file to the required name: | ||
|
||
cp config.mk.info config.mk | ||
|
||
Open and edit the config file. | ||
You many have to adjust the `CGNS_INCLUDE_FLAGS` and `CGNS_LINKER_FLAGS` to match your installation of the CGNS library. | ||
You may also specify the c-compiler with the `CC` variable and the flags for the c-compiler with `CFLAGS`. | ||
The C-compiler is only used for the compiler `f2py` wrapper. | ||
The Fortran compiler may be specified with the `FC` variable and the corresponding flags with the `FFLAGS` variable. | ||
It has been tested with both Intel and GNU Fortran compilers. | ||
|
||
To compile, simply type | ||
|
||
make | ||
|
||
If all goes well, you will see | ||
|
||
Testing if module libcgns_utils can be imported... | ||
Module libcgns_utils was successfully imported. | ||
|
||
which indicates a successful compilation. | ||
|
||
To install, type | ||
|
||
pip install . | ||
|
||
or optionally with the `--user` flag if you are not using a virtual environment. | ||
A console script called `cgns_utils` is provided, which should be installed automatically and available without modifying your `$PATH`. | ||
|
||
## Usage | ||
|
||
All of the `cgnsUtilties` functionality is accessible through the `cgns_utils` command. | ||
To see a list of the available sub-commands, type | ||
|
||
cgns_utils -h | ||
|
||
To get further help for a sub-command, type for example: | ||
|
||
cgns_utils scale -h | ||
|
||
## License | ||
|
||
Copyright 2020 MDO Lab. See the LICENSE file for details |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "2.2.0" |
Oops, something went wrong.