Skip to content

Commit

Permalink
Merge pull request #13 from jacobwilliams/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jacobwilliams authored Sep 17, 2019
2 parents 210ff46 + cc69210 commit a008f7a
Show file tree
Hide file tree
Showing 11 changed files with 520 additions and 111 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ script:
- ./bin/slsqp_test
- ./bin/slsqp_test_2
- ./bin/slsqp_test_3
- ./bin/slsqp_test_71

after_success:
- git config --global user.name "TRAVIS-CI-for-$(git --no-pager show -s --format='%cn' $TRAVIS_COMMIT)"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Modern Fortran Edition of the SLSQP Optimizer
https://github.com/jacobwilliams/slsqp

Copyright (c) 2016-2018, Jacob Williams
Copyright (c) 2016-2019, Jacob Williams
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is

To generate the documentation using [ford](https://github.com/cmacmackin/ford), run: ```FoBis.py rule --execute makedoc -f slsqp.fobis```

To run the test programs, run: ```FoBis.py rule --execute tests -f slsqp.fobis```

### Development

[![Build Status](https://img.shields.io/travis/jacobwilliams/slsqp/master.svg?style=plastic)](https://travis-ci.org/jacobwilliams/slsqp)
Expand Down
52 changes: 52 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

#
# Simple build script.
#
# Requires: FoBiS and Ford
#

MODCODE='slsqp_module.f90' # module file name
LIBOUT='libslsqp.a' # name of library
DOCDIR='./doc/' # build directory for documentation
SRCDIR='./src/' # library source directory
TESTSRCDIR='./src/tests/' # unit test source directory
BINDIR='./bin/' # build directory for unit tests
LIBDIR='./lib/' # build directory for library
FORDMD='slsqp.md' # FORD config file name

#compiler flags:

#FCOMPILER='gnu' #Set compiler to gfortran
#FCOMPILERFLAGS='-c -O2 -std=f2008'

FCOMPILER='intel' #Set compiler to ifort
FCOMPILERFLAGS='-c -O2'

#build using FoBiS:

if hash FoBiS.py 2>/dev/null; then

echo "Building library..."

FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors

echo "Building test programs..."

FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${TESTSRCDIR} -dmod ./ -dobj ./ -colors -libs ${LIBDIR}${LIBOUT} --include ${LIBDIR}

else
echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
fi

# build the documentation using FORD:

if hash ford 2>/dev/null; then

echo "Building documentation..."

ford ${FORDMD}

else
echo "Ford not found! Cannot build documentation. Install using: sudo pip install ford"
fi
13 changes: 13 additions & 0 deletions slsqp.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.trimAutoWhitespace": true
}
}
12 changes: 12 additions & 0 deletions slsqp.fobis
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,15 @@ template = template-tests
[rule-makedoc]
help = Rule for building documentation from source files
rule_1 = ford $FORD_FILE

[rule-tests]
help = Rule for running the test programs
rule_1 = (cd bin
GLOBIGNORE='*.*'
ls slsqp_test_* | sed 's/^\([^0-9]*\)\([0-9]*\)/\1 \2/' | sort -k2,2n | tr -d ' ' |
while read TEST; do
echo ""
echo "Running ${TEST}"
"./${TEST}"
done)

Loading

0 comments on commit a008f7a

Please sign in to comment.