Skip to content

Commit c51e79d

Browse files
committed
build only FVSolver for CMake and CI/CD
1 parent 0bfa63c commit c51e79d

File tree

3 files changed

+26
-171
lines changed

3 files changed

+26
-171
lines changed

.github/workflows/cd.yml

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,7 @@ jobs:
225225
-DCMAKE_C_COMPILER="clang.exe" \
226226
-DCMAKE_CXX_COMPILER="clang++.exe" \
227227
-DOPTION_TARGET_MESSAGING=OFF \
228-
-DOPTION_TARGET_PARALLEL=OFF \
229-
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
230-
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
231-
-DOPTION_TARGET_SMOLDYN_SOLVER=ON \
232228
-DOPTION_TARGET_FV_SOLVER=ON \
233-
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
234-
-DOPTION_TARGET_NFSIM_SOLVER=ON \
235-
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF \
236-
-DOPTION_TARGET_SUNDIALS_SOLVER=ON \
237-
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
238229
-DOPTION_TARGET_DOCS=OFF \
239230
-B . -S ..
240231
@@ -254,14 +245,6 @@ jobs:
254245
echo "------ running FiniteVolume_x64 ------"
255246
./bin/FiniteVolume_x64 || true
256247
echo
257-
echo "------ running NFsim_x64 ------"
258-
./bin/NFsim_x64 || true
259-
echo "------ running SundialsSolverStandalone_x64 ------"
260-
./bin/SundialsSolverStandalone_x64 || true
261-
echo "------ running VCellStoch_x64 ------"
262-
./bin/VCellStoch_x64 || true
263-
echo "------ running smoldyn_x64 ------"
264-
./bin/smoldyn_x64 || true
265248
echo "------ running testzip ------"
266249
./bin/testzip || true
267250
echo "------ running ziptool ------"
@@ -293,16 +276,7 @@ jobs:
293276
cmake \
294277
-G Ninja \
295278
-DOPTION_TARGET_MESSAGING=OFF \
296-
-DOPTION_TARGET_PARALLEL=OFF \
297-
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
298-
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
299-
-DOPTION_TARGET_SMOLDYN_SOLVER=ON \
300279
-DOPTION_TARGET_FV_SOLVER=ON \
301-
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
302-
-DOPTION_TARGET_NFSIM_SOLVER=ON \
303-
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=ON \
304-
-DOPTION_TARGET_SUNDIALS_SOLVER=ON \
305-
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
306280
-B . -S ..
307281
308282
ninja
@@ -320,14 +294,6 @@ jobs:
320294
echo "------ running FiniteVolume_x64 ------"
321295
./bin/FiniteVolume_x64 || true
322296
echo
323-
echo "------ running NFsim_x64 ------"
324-
./bin/NFsim_x64 || true
325-
echo "------ running SundialsSolverStandalone_x64 ------"
326-
./bin/SundialsSolverStandalone_x64 || true
327-
echo "------ running VCellStoch_x64 ------"
328-
./bin/VCellStoch_x64 || true
329-
echo "------ running smoldyn_x64 ------"
330-
./bin/smoldyn_x64 || true
331297
echo "------ running testzip ------"
332298
./bin/testzip || true
333299
echo "------ running ziptool ------"
@@ -340,27 +306,27 @@ jobs:
340306
run: |
341307
mkdir build/upload
342308
cd build/bin
343-
rm hello_test TestVCellStoch testzip ziptool || true
309+
rm testzip ziptool || true
344310
ls *_x64 | awk '{print $1}' | xargs -I '{}' otool -L '{}' | grep ")" | grep -v "build" | grep -v "System" | awk '{print $1}' | xargs -I '{}' cp -vn '{}' . || true
345311
ls *.dylib | awk '{print $1}' | xargs -I '{}' otool -L '{}' | grep ")" | grep -v "build" | grep -v "System" | awk '{print $1}' | xargs -I '{}' cp -vn '{}' . || true
346312
ls *.dylib | awk '{print $1}' | xargs -I '{}' otool -L '{}' | grep ")" | grep -v "build" | grep -v "System" | awk '{print $1}' | xargs -I '{}' cp -vn '{}' . || true
347313
chmod u+w,+x *
348314
tar czvf ../upload/mac64_bad_paths.tgz .
349315
../../.github/scripts/install_name_tool_macos.sh
350-
tar czvf ../upload/mac64.tgz --dereference .
316+
tar czvf ../upload/fvsolver_mac64.tgz --dereference .
351317
352318
- name: handle shared object paths for Windows native build
353319
if: matrix.platform == 'windows-latest'
354320
shell: msys2 {0}
355321
run: |
356322
mkdir build/upload
357323
cd build/bin
358-
rm hello_test TestVCellStoch testzip ziptool || true
324+
rm testzip ziptool || true
359325
ls *.exe | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
360326
ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
361327
ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
362328
chmod u+w,+x *
363-
zip ../upload/win64.zip ./*
329+
zip ../upload/fvsolver_win64.zip ./*
364330
cd ../..
365331
# fi
366332
@@ -370,41 +336,41 @@ jobs:
370336
run: |
371337
mkdir build/upload
372338
cd build/bin
373-
rm hello_test TestVCellStoch testzip ziptool || true
339+
rm testzip ziptool || true
374340
ls *_x64 | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep "=> /" | grep -v "build" | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
375341
ls *.so | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep "=> /" | grep -v "build" | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
376342
ls *.so | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep "=> /" | grep -v "build" | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
377343
chmod u+w,+x *
378-
tar czvf ../upload/linux64.tgz --dereference .
344+
tar czvf ../upload/fvsolver_linux64.tgz --dereference .
379345
cd ../..
380346
381347
- name: Upload Intel Macos binaries
382348
if: matrix.platform == 'macos-13'
383349
uses: actions/upload-artifact@v4
384350
with:
385-
name: macos_x86_64.tgz
386-
path: build/upload/mac64.tgz
351+
name: fvsolver_macos_x86_64.tgz
352+
path: build/upload/fvsolver_mac64.tgz
387353

388354
- name: Upload ARM Macos binaries
389355
if: matrix.platform == 'macos-14'
390356
uses: actions/upload-artifact@v4
391357
with:
392-
name: macos_arm64.tgz
393-
path: build/upload/mac64.tgz
358+
name: fvsolver_macos_arm64.tgz
359+
path: build/upload/fvsolver_mac64.tgz
394360

395361
- name: Upload Windows binaries
396362
if: matrix.platform == 'windows-latest'
397363
uses: actions/upload-artifact@v4
398364
with:
399-
name: win64.zip
400-
path: build/upload/win64.zip
365+
name: fvsolver_win64.zip
366+
path: build/upload/fvsolver_win64.zip
401367

402368
- name: Upload Linux binaries
403369
if: matrix.platform == 'ubuntu-latest'
404370
uses: actions/upload-artifact@v4
405371
with:
406-
name: linux64.tgz
407-
path: build/upload/linux64.tgz
372+
name: fvsolver_linux64.tgz
373+
path: build/upload/fvsolver_linux64.tgz
408374

409375
- name: Setup tmate session
410376
if: ${{ failure() }}

Dockerfile

Lines changed: 10 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -4,99 +4,27 @@ RUN apt-get -y update && apt-get install -y apt-utils && \
44
apt-get install -y -qq -o=Dpkg::Use-Pty=0 build-essential gfortran zlib1g-dev \
55
libhdf5-dev libcurl4-openssl-dev libboost-dev cmake wget python
66

7-
#
8-
# build PETSc with mpich for static linking
9-
#
10-
RUN mkdir /usr/local/petsc && \
11-
cd /usr/local/petsc && \
12-
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.7.7.tar.gz && \
13-
tar xzf petsc-3.7.7.tar.gz && \
14-
cd petsc-3.7.7 && \
15-
./configure --with-shared-libraries=0 --download-fblaslapack=1 --with-debugging=1 --download-mpich && \
16-
make PETSC_DIR=/usr/local/petsc/petsc-3.7.7 PETSC_ARCH=arch-linux2-c-debug all
17-
18-
ENV PETSC_DIR=/usr/local/petsc/petsc-3.7.7 \
19-
PETSC_ARCH=arch-linux2-c-debug
20-
217
COPY . /vcellroot
228

23-
#
24-
# build most solvers, and FiniteVolume without PETSc (FiniteVolume_x64)
25-
#
269
RUN mkdir -p /vcellroot/build/bin
2710
WORKDIR /vcellroot/build
2811

2912
RUN /usr/bin/cmake \
3013
-DOPTION_TARGET_MESSAGING=ON \
31-
-DOPTION_TARGET_PARALLEL=OFF \
32-
-DOPTION_TARGET_PETSC=OFF \
33-
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
34-
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
35-
-DOPTION_TARGET_SMOLDYN_SOLVER=ON \
3614
-DOPTION_TARGET_FV_SOLVER=ON \
37-
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
38-
-DOPTION_TARGET_NFSIM_SOLVER=ON \
39-
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=ON \
40-
-DOPTION_TARGET_SUNDIALS_SOLVER=ON \
41-
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
4215
.. && \
4316
make && \
4417
ctest
4518

19+
20+
#RUN apt-get update && \
21+
# apt-get install -y apt-utils && \
22+
# apt-get install -q -y --no-install-recommends curl dnsutils
4623
#
47-
# build FiniteVolume with PETSc (FiniteVolume_PETSc_x64)
24+
#RUN apt-get install -qq -y -o=Dpkg::Use-Pty=0 gcc gfortran zlib1g \
25+
# libhdf5-103 libhdf5-cpp-103 libcurl4-openssl-dev zip
26+
#
27+
#COPY --from=build /vcellroot/build/bin /vcellbin
28+
#WORKDIR /vcellbin
29+
#ENV PATH=/vcellbin:$PATH
4830
#
49-
RUN mkdir -p /vcellroot/build_PETSc/bin
50-
WORKDIR /vcellroot/build_PETSc
51-
52-
RUN /usr/bin/cmake \
53-
-DOPTION_TARGET_MESSAGING=ON \
54-
-DOPTION_TARGET_PARALLEL=OFF \
55-
-DOPTION_TARGET_PETSC=ON \
56-
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
57-
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
58-
-DOPTION_TARGET_SMOLDYN_SOLVER=OFF \
59-
-DOPTION_TARGET_FV_SOLVER=ON \
60-
-DOPTION_TARGET_STOCHASTIC_SOLVER=OFF \
61-
-DOPTION_TARGET_NFSIM_SOLVER=OFF \
62-
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF \
63-
-DOPTION_TARGET_SUNDIALS_SOLVER=OFF \
64-
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
65-
.. && \
66-
make && \
67-
ctest
68-
69-
70-
FROM eclipse-temurin:17 as jre-build
71-
72-
# Create a custom Java runtime
73-
RUN $JAVA_HOME/bin/jlink \
74-
--add-modules ALL-MODULE-PATH \
75-
--strip-debug \
76-
--no-man-pages \
77-
--no-header-files \
78-
--compress=2 \
79-
--output /javaruntime
80-
81-
# Define base image and copy in jlink created minimal Java 17 environment
82-
FROM python:3.9.7-slim
83-
ENV JAVA_HOME=/opt/java/openjdk
84-
ENV PATH "${JAVA_HOME}/bin:${PATH}"
85-
COPY --from=jre-build /javaruntime $JAVA_HOME
86-
87-
# now we have Java 17 and Python 3.9
88-
ENV DEBIAN_FRONTEND noninteractive
89-
ENV LANG=en_US.UTF-8
90-
91-
RUN apt-get update && \
92-
apt-get install -y apt-utils && \
93-
apt-get install -q -y --no-install-recommends curl dnsutils
94-
95-
RUN apt-get install -qq -y -o=Dpkg::Use-Pty=0 gcc gfortran zlib1g \
96-
libhdf5-103 libhdf5-cpp-103 libcurl4-openssl-dev zip
97-
98-
COPY --from=build /vcellroot/build/bin /vcellbin
99-
COPY --from=build /vcellroot/build_PETSc/bin/FiniteVolume_PETSc_x64 /vcellbin/
100-
WORKDIR /vcellbin
101-
ENV PATH=/vcellbin:$PATH
102-

README.md

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,11 @@
77
---
88
![CI](https://github.com/virtualcell/vcell-solvers/actions/workflows/cd.yml/badge.svg)
99

10-
# vcell-solvers
10+
# vcell-fvsolver
1111
Virtual Cell solvers [virtualcell/vcell-solvers](https://github.com/virtualcell/vcell-solvers) is a collection of numerical simulation codes used in the Virtual Cell framework [virtualcell/vcell](https://github.com/virtualcell/vcell)).
1212

1313

1414
## The Virtual Cell Project
1515
The Virtual Cell is a modeling and simulation framework for computational biology. For details see http://vcell.org and http://github.com/virtualcell.
1616

17-
## Building VCell Solvers
18-
### Using VirtualBox and Vagrant
19-
* git clone https://github.com/virtualcell/vcell.git
20-
* cd vcell/VagrantBoxes
21-
### Building for Linux (64 bit)
22-
[details](VagrantBoxes/linux64/README.md)
23-
24-
```bash
25-
$ cd linux64
26-
$ vagrant up
27-
$ vagrant ssh -c /vagrant_numerics/build.sh
28-
$ vagrant halt
29-
```
30-
### Building for Linux (32 bit)
31-
[details](VagrantBoxes/linux32/README.md)
32-
33-
```bash
34-
$ cd linux32
35-
$ vagrant up
36-
$ vagrant ssh -c /vagrant_numerics/build.sh
37-
$ vagrant halt
38-
```
39-
### Building for Macos on a Mac **Apple only allows a Mac VM to run on Apple hardware**
40-
[details}(VagrantBoxes/mac64/README.md)
41-
42-
```bash
43-
$ cd mac64
44-
$ vagrant up
45-
$ vagrant ssh -c /vagrant/build.sh
46-
$ vagrant halt
47-
```
48-
### Building for Windows (64 bit) on Windows
49-
[details: including building on other platforms](VagrantBoxes/win64/README.md)
50-
51-
```bash
52-
$ cd win64
53-
$ vagrant up
54-
$ vagrant powershell -c \vagrant\build.sh
55-
$ vagrant halt
56-
```
17+
## Python Bindings (more to come)

0 commit comments

Comments
 (0)