Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Kkwiek/pyfmi #650

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions assimulo/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%PYTHON% setup.py install
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion assimulo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ fi
${PYTHON} setup.py install \
--lapack-home=${PREFIX}/lib \
--blas-home=${BLAS_LIB_PATH} \
--sundials-home=${PREFIX}/lib || exit 1;
--sundials-home=${PREFIX} || exit 1;
4 changes: 3 additions & 1 deletion assimulo/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package:
version: 2.8

build:
number: 0
number: 1

source:
fn: Assimulo-2.8.zip
Expand All @@ -20,6 +20,7 @@ requirements:
- matplotlib
- lapack
- sundials
- nose

run:
- python
Expand All @@ -29,6 +30,7 @@ requirements:
- matplotlib
- lapack
- sundials
- nose

test:
imports:
Expand Down
6 changes: 6 additions & 0 deletions assimulo/run_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from assimulo.examples.cvode_basic import run_example as run_example1
from assimulo.examples.ida_basic_backward import run_example as run_example2

run_example1(with_plots=False)
run_example2(with_plots=False)

15 changes: 15 additions & 0 deletions lapack/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

mkdir build
if errorlevel 1 exit 1

cd build
if errorlevel 1 exit 1

cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DLAPACKE=ON -DCMake_GNUtoMS=ON ..
if errorlevel 1 exit 1

make -j2
if errorlevel 1 exit 1

make install
if errorlevel 1 exit 1
4 changes: 2 additions & 2 deletions lapack/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mkdir build
cd build
mkdir build || exit 1;
cd build || exit 1;

# CMAKE_INSTALL_LIBDIR="lib" suppresses CentOS default of lib64 (conda expects lib)

Expand Down
5 changes: 3 additions & 2 deletions lapack/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ source:
sha1: 7e993de16d80d52b22b6093465eeb90c93c7a2e7

build:
number: 1
number: 2

requirements:
build:
- cmake
- gcc
#https://github.com/conda/conda-recipes/issues/510
- gcc [not linux32|win]

run:
- libgcc
Expand Down
3 changes: 2 additions & 1 deletion python/pyfmi/bld.bat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
%PYTHON% setup.py install --fmil-home=%PREFIX%\lib || exit 1
%PYTHON% setup.py install --fmil-home=%PREFIX%\lib
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion python/pyfmi/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

$PYTHON setup.py install --fmil-home=${PREFIX}/ || exit 1;
${PYTHON} setup.py install --fmil-home=${PREFIX}/ || exit 1;
2 changes: 1 addition & 1 deletion python/pyfmi/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package:
version: 2.2

build:
number: 0
number: 1

source:
fn: PyFMI-2.2.zip
Expand Down
4 changes: 4 additions & 0 deletions python/pyfmi/run_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pyfmi.examples.fmi_bouncing_ball
from pyfmi.examples.log_analysis import Analyze

pyfmi.examples.fmi_bouncing_ball.run_demo(with_plots=False)
12 changes: 12 additions & 0 deletions sundials/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mkdir build
if errorlevel 1 exit 1

cd build
if errorlevel 1 exit 1

cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL="1" -DBUILD_STATIC_LIBS:BOOL="0" -DEXAMPLES_ENABLE:BOOL="0" -DEXAMPLES_INSTALL:BOOL="0" -DLAPACK_ENABLE:BOOL="1" -DOPENMP_ENABLE:BOOL="0" ..
if errorlevel 1 exit 1

make install
if errorlevel 1 exit 1

18 changes: 15 additions & 3 deletions sundials/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/sh
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL="1" -DBUILD_STATIC_LIBS:BOOL="0" -DEXAMPLES_ENABLE:BOOL="0" -DEXAMPLES_INSTALL:BOOL="0" -DLAPACK_ENABLE:BOOL="1" -DOPENMP_ENABLE:BOOL="0" ..
make install

mkdir build || exit 1;
cd build || exit 1;

cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_SHARED_LIBS:BOOL="1" \
-DBUILD_STATIC_LIBS:BOOL="0" \
-DEXAMPLES_ENABLE:BOOL="0" \
-DEXAMPLES_INSTALL:BOOL="0" \
-DLAPACK_ENABLE:BOOL="1" \
-DOPENMP_ENABLE:BOOL="0" \
.. || exit 1;

make install || exit 1;
36 changes: 20 additions & 16 deletions sundials/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
package:
name: sundials
version: "2.6.2"
name: sundials
version: "2.6.2"

source:
fn: sundials-2.6.2.tar.gz
# Downloading directly from llnl server requires online registration. Hence we use fedoras mirror:
url: http://pkgs.fedoraproject.org/repo/pkgs/sundials/sundials-2.6.2.tar.gz/3deeb0ede9f514184c6bd83ecab77d95/sundials-2.6.2.tar.gz
md5: 3deeb0ede9f514184c6bd83ecab77d95
fn: sundials-2.6.2.tar.gz
# Downloading directly from llnl server requires online registration. Hence we use fedoras mirror:
url: http://pkgs.fedoraproject.org/repo/pkgs/sundials/sundials-2.6.2.tar.gz/3deeb0ede9f514184c6bd83ecab77d95/sundials-2.6.2.tar.gz
md5: 3deeb0ede9f514184c6bd83ecab77d95

build:
number: 2

# Note that lapack is not a hard requirement, but currently build.sh enables a lapack build.
requirements:
run:
- lapack
build:
- cmake
- lapack
run:
- lapack

build:
- cmake
- lapack

test:
files:
- cvRoberts_dns.c
files:
- cvRoberts_dns.c

about:
home: http://computation.llnl.gov/casc/sundials/main.html
license: BSD
summary: 'SUit of Nonlinear and DIfferential/ALgebraic equation Solvers'
home: http://computation.llnl.gov/casc/sundials/main.html
license: BSD
summary: 'SUit of Nonlinear and DIfferential/ALgebraic equation Solvers'
12 changes: 10 additions & 2 deletions sundials/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/bin/sh
gcc -I${PREFIX}/include -L${PREFIX}/lib -o cvRoberts_dns cvRoberts_dns.c -lm -lsundials_cvode -llapack -lsundials_nvecserial
./cvRoberts_dns

gcc -I${PREFIX}/include \
-L${PREFIX}/lib \
-o cvRoberts_dns cvRoberts_dns.c \
-lm \
-lsundials_cvode \
-llapack \
-lsundials_nvecserial || exit 1;

./cvRoberts_dns || exit 1;