Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
b3c2ffa
Impelements AMS-tensor interface
koparasy Nov 11, 2024
95849b5
Fix compilation issues
koparasy Nov 12, 2024
3a6aa3c
Concat test case 1, works
koparasy Nov 14, 2024
794c378
Expand is working
koparasy Nov 15, 2024
7a8baca
Remove C++14 for cuda
koparasy Nov 22, 2024
80ae4be
Fix tensor concat
koparasy Dec 3, 2024
867d200
Simplified surrogate interfaces by assuming pytorch support, improves…
koparasy Dec 9, 2024
8452bcb
Updated basedb-hdf5
koparasy Dec 12, 2024
79c48dc
Simple test for db manager
koparasy Dec 12, 2024
ad6dfeb
Added tensor aware workflow
koparasy Dec 13, 2024
aa19836
Tests scatter
koparasy Dec 13, 2024
36c023b
Re structuring files
koparasy Dec 13, 2024
68bf449
Implement tensor aware workflow
koparasy Dec 20, 2024
671dea8
Compiling new interface
koparasy Dec 22, 2024
b51247d
Fixing integration tests
koparasy Dec 23, 2024
4ac548e
Fixed interface
koparasy Dec 23, 2024
4534c0f
Handle correct 2D inout tensors
koparasy Dec 24, 2024
92010c6
Adding 2d test
koparasy Dec 24, 2024
a5f3f2e
Add broadcast test
koparasy Dec 24, 2024
4147d3a
Nit fixes
koparasy Dec 26, 2024
4b7f927
Remove faiss from cmake
koparasy Dec 26, 2024
776468f
Remove redis from cmake
koparasy Dec 26, 2024
60c6839
Enable DB is always on
koparasy Dec 26, 2024
55791ad
Delete models and clean up amslib test directory
koparasy Dec 26, 2024
0d30693
Remove dependencies on umpire
koparasy Dec 26, 2024
0428867
Remove cuda specific compilations
koparasy Dec 26, 2024
652cf8a
Clean up cmake
koparasy Dec 26, 2024
012d052
Adopt new interface on ideal gas
koparasy Dec 26, 2024
b1d0307
Update tests for gitlab
koparasy Dec 27, 2024
f4ba541
Fix cmake to generate models under expected path
koparasy Jan 2, 2025
4d0d8a7
Properly define caliper
koparasy Jan 2, 2025
62e02f4
Fixed ideal gas as an external
koparasy Jan 2, 2025
0596107
Remove warning
koparasy Jan 2, 2025
8023cf6
Define matrix strategy for ci
koparasy Jan 2, 2025
86e81dd
Adding config
koparasy Jan 2, 2025
7d347a6
Adding full path in the case of bash tests
koparasy Jan 2, 2025
5e9a4c9
Deleting cuda code
koparasy Jan 2, 2025
1f3f543
Extend allocation time in lassen CI
koparasy Jan 3, 2025
797e10f
Remove faiss for CI
koparasy Jan 3, 2025
da2c426
Update BO to new API
koparasy Jan 3, 2025
5480886
Delete cmake for examples
koparasy Jan 3, 2025
f179d30
Fix static compilation
koparasy Jan 3, 2025
a7ce0ca
Add linkage tests
koparasy Jan 3, 2025
788970d
Remove module load
koparasy Jan 3, 2025
e5de4e1
Add back module load
koparasy Jan 3, 2025
b81a643
Fix warnings
koparasy Jan 3, 2025
b99b8c5
Fix include interfaces
koparasy Jan 3, 2025
c8724c8
Configure mfem
koparasy Jan 3, 2025
c582dae
Fix initializer of test
koparasy Jan 3, 2025
814a87f
Adding rpaths for tests
koparasy Jan 3, 2025
a6e115d
add find_dependency for cmake
koparasy Jan 3, 2025
3f956e2
Nit
koparasy Jan 3, 2025
69f9eee
Nit
koparasy Jan 3, 2025
afed2fa
Nit
koparasy Jan 3, 2025
2f57ae2
Nit
koparasy Jan 4, 2025
31212cf
Move store-cat into db
koparasy Jan 5, 2025
5d71ecd
Fixing cmake with RMQ on
koparasy Jan 6, 2025
716364e
Fix libevent linkage, by side-stepping the issue
koparasy Jan 7, 2025
e59fe79
Delete rmq reliable
koparasy Jan 14, 2025
c7aab0c
Simple physics example, that adds broadcast with inout and 2D tensor
koparasy Feb 5, 2025
76e59c0
Fix hdf5 offset compute
koparasy Feb 11, 2025
ec1d8ee
Adding extra tests for C interface
koparasy Feb 21, 2025
895d2a4
Minor prints and tests
koparasy Feb 26, 2025
c50d8b9
Abort when h5py is not present
koparasy Apr 10, 2025
7103620
Adding missing test
koparasy Apr 10, 2025
faa830b
Add proper linkage to test
koparasy Apr 10, 2025
7e5139f
Logger now is initialized independently
koparasy Apr 16, 2025
c185deb
Add AMSInit on new tests
koparasy Apr 16, 2025
0443e09
Moving files of testing
koparasy Apr 16, 2025
de5ec20
Fix defines and tests
koparasy Apr 16, 2025
153e9ba
Adding missing cmake file
koparasy Apr 16, 2025
fee3696
RMQ Stagers receive tensors
koparasy Apr 21, 2025
d7ddbb0
Fix testing
koparasy Apr 24, 2025
ca3814a
Delete individual rmq tests
koparasy Apr 24, 2025
bca5e15
Hide import in funciton
koparasy Apr 24, 2025
fa6ea02
Remove imports
koparasy Apr 24, 2025
200dc82
Add ctest even when env variable not defined
koparasy Apr 24, 2025
a2a7afa
Remove CSV and REDIS from files
koparasy Apr 24, 2025
c127036
Fix caliper begin - end
koparasy Apr 24, 2025
43ad363
Printing out model device and data type
koparasy Apr 24, 2025
0e0b153
Fix cmake file
koparasy Apr 25, 2025
1e0e323
Extra fixes
koparasy Apr 25, 2025
949f0d0
Pass RMQ at configure time
koparasy Apr 25, 2025
64d761d
Add new rmq config
koparasy Apr 25, 2025
ad25c1f
Find HDF5 when installed in root through config
koparasy Apr 25, 2025
755b13b
Base Docker file for all containers
koparasy Apr 25, 2025
8ac39a3
Remove pandas from verify in testing
koparasy Apr 25, 2025
c56a302
Adding maria db tests
koparasy Apr 25, 2025
10310f9
Separate build with install interface
koparasy Apr 26, 2025
e933ebc
Add tutorial docker file
koparasy Apr 28, 2025
e6125fa
Update readme
koparasy Apr 28, 2025
bfbf518
Add initial instructions
koparasy Apr 28, 2025
0c1e13b
Example 0 instructions and code
koparasy Apr 28, 2025
f5e9076
Fixes for cmake
koparasy Apr 28, 2025
c4706ed
Point to tutorial branch
koparasy Apr 28, 2025
53ae4bf
Add default option on h5
koparasy Apr 28, 2025
62ec46b
Minor
koparasy Apr 28, 2025
4cd6b0c
Define examples as C project
koparasy Apr 28, 2025
a3ad7e5
Modifications to init ams on 0-example
koparasy Apr 28, 2025
881d78c
Adding code structure
koparasy Apr 28, 2025
8d72161
Example and solution code
koparasy Apr 28, 2025
80c1aba
Adding 1st step
koparasy Apr 28, 2025
af1de98
Adding step 2 files
koparasy Apr 28, 2025
a37d85c
Dataflow
koparasy Apr 28, 2025
e73bfd1
Format files
koparasy Apr 28, 2025
1ff66eb
Restructure
koparasy Apr 28, 2025
1e192e5
Adding files
koparasy Apr 28, 2025
029e22e
Adding 0 step
koparasy Apr 28, 2025
2b7e656
Adding compound model
koparasy Apr 28, 2025
afce008
Adding missing examples and files
koparasy Apr 28, 2025
0db91f7
Moving files around
koparasy Apr 28, 2025
42727a9
Adding solution
koparasy Apr 28, 2025
2752b4f
Adding None as a dataase
koparasy Apr 28, 2025
80e6606
HDF5 DB example
koparasy Apr 29, 2025
c8c5808
Data collection for training
koparasy Apr 29, 2025
4d776b4
Train scripts
koparasy Apr 29, 2025
9fb743a
Adding random serving
koparasy Apr 29, 2025
59e4d09
Guard DB
koparasy Apr 29, 2025
1c63841
Deleting model
koparasy Apr 29, 2025
65d5559
Final UQ example
koparasy Apr 29, 2025
40c8467
Fix readme
koparasy Apr 29, 2025
b9c9887
README.md
koparasy Apr 29, 2025
aa5c148
Fix readme
koparasy Apr 29, 2025
b094c72
Adding readme
koparasy Apr 29, 2025
982530b
Minors
koparasy Apr 29, 2025
c8d4d9f
Readme update
koparasy Apr 29, 2025
57182a0
Numeric sublists
koparasy Apr 29, 2025
ff78309
Update links
koparasy Apr 29, 2025
3654fb7
file
koparasy Apr 29, 2025
254dd59
lower to upper
koparasy Apr 29, 2025
05eb172
Readme
koparasy Apr 29, 2025
8423df5
Update readme
koparasy Apr 29, 2025
b662d56
Fixed readme
koparasy Apr 29, 2025
0f5fe4c
Fixed readme
koparasy Apr 29, 2025
ad7a093
Update train
koparasy Apr 29, 2025
4b2ac39
Adding uncertainty text
koparasy Apr 29, 2025
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
134 changes: 134 additions & 0 deletions .github/containers/x86_64-tutorial/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# ┌──────────────┐
# │ BUILDER │
# └──────────────┘

FROM fluxrm/flux-core:latest AS builder
USER root
SHELL ["/bin/bash", "-lc"]

ARG num_jobs
ARG hypre_version

# Install MariaDB + tools
# Install extra packages (e.g., git, python3-pip)
RUN apt-get update && \
apt-get install -y lsb-release gnupg software-properties-common \
git python3 python3-pip mariadb-server mariadb-client \
curl \
rabbitmq-server supervisor \
python3-venv \
nlohmann-json3-dev \
build-essential cmake \
libopenmpi-dev libmetis-dev libhypre-dev \
libblas-dev liblapack-dev \
libhdf5-dev hdf5-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /run/mysqld \
&& chown mysql:mysql /run/mysqld

RUN rabbitmq-plugins enable --offline rabbitmq_management
WORKDIR /opt/archives
#HYPRE
RUN curl -L https://github.com/hypre-space/hypre/archive/refs/tags/v${hypre_version}.tar.gz > /opt/archives/hypre-v${hypre_version}.tar.gz && \
tar xzf hypre-v${hypre_version}.tar.gz && cd hypre-${hypre_version}/src && \
./configure --prefix /usr/local --enable-shared --disable-static && \
make -j ${num_jobs} && make install && \
rm -rf hypre-v${hypre_version}*

#MFEM
RUN git clone --depth=1 https://github.com/mfem/mfem.git /opt/archives/mfem && \
mkdir -p /opt/archives/mfem/build && cd /opt/archives/mfem/build/ && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DMFEM_USE_MPI=ON -DMFEM_USE_METIS_5=ON -DMFEM_USE_HYPRE=ON .. && \
make -j"$(nproc)" && \
make install

#CALIPER
RUN cd /opt/archives/ && \
git clone --depth 1 https://github.com/LLNL/Caliper.git && \
cd Caliper && \
mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ .. && \
make && \
make install

#AMQCPP
RUN cd /opt/archives/ && \
git clone --depth=1 https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git && \
mkdir -p /opt/archives/AMQP-CPP/build/ && \
cd /opt/archives/AMQP-CPP/build/ && \
cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DAMQP-CPP_LINUX_TCP=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DAMQP-CPP_BUILD_SHARED=On .. && \
make && \
make install

RUN python3 -m venv /app/venv --system-site-packages
ENV PATH="/app/venv/bin:$PATH"
RUN source /app/venv/bin/activate && \
python3 -m pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
python -m pip install --no-cache-dir h5py

ENV AMS_MFEM_PATH=/usr/local/
ENV AMS_TORCH_PATH=/app/venv/lib/python3.11/site-packages/torch/share/cmake/Torch

RUN cd /opt/archives/ && \
source /app/venv/bin/activate && \
git clone --depth 1 https://github.com/LLNL/AMS.git -b features/tutorial && \
mkdir -p /opt/archives/AMS/build/ && \
cd /opt/archives/AMS/build/ && \
cmake \
-DWITH_RMQ=On \
-DBUILD_SHARED_LIBS=On \
-DWITH_CALIPER=On \
-DWITH_HDF5=On \
-DWITH_AMS_DEBUG=On \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=On \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=Off \
-DMFEM_DIR=$AMS_MFEM_PATH \
-DWITH_MPI=On \
-DWITH_TORCH=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_WORKFLOW=On \
../ && \
make && \
make install

# ┌──────────────┐
# │ RUNTIME │
# └──────────────┘
FROM fluxrm/flux-core:latest AS runtime
USER root
SHELL ["/bin/bash", "-lc"]

# 1) Install _only_ runtime deps
RUN apt-get update && \
apt-get install -y lsb-release gnupg software-properties-common \
git python3 python3-pip mariadb-server mariadb-client \
curl \
rabbitmq-server supervisor \
python3-venv \
nlohmann-json3-dev \
build-essential cmake \
libopenmpi-dev libmetis-dev libhypre-dev \
libblas-dev liblapack-dev \
libhdf5-dev hdf5-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# 2) Copy in your built artifacts
COPY --from=builder /usr/local /usr/local
COPY --from=builder /app/venv /app/venv

# 3) Copy configs & entrypoint
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY rabbitmq.conf /etc/rabbitmq/rabbitmq.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ENV PATH="/app/venv/bin:$PATH"

RUN chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

13 changes: 13 additions & 0 deletions .github/containers/x86_64-tutorial/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Container with all necessary AMS dependencies installed and with AMS

The container runs a RMQ and a MariaDB server on startup. To build issue:

```bash
docker build -t <your-registry>/ams-tutorial:latest . --build-arg hypre_version=2.33.0
```

To run issue:
```bash
docker run --rm -it -v "$(pwd)":/workspace -w /workspace <your-registry>/ams-tutorial:latest bash
```

37 changes: 37 additions & 0 deletions .github/containers/x86_64-tutorial/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -e

# 1) ensure the socket directory exists and is owned by mysql
mkdir -p /run/mysqld
chown mysql:mysql /run/mysqld

# 2) start MariaDB directly
# this will background itself (via mysqld_safe)
exec /usr/bin/mysqld_safe --datadir=/var/lib/mysql &

# 3) wait until it's up
while ! mysqladmin ping -uroot --silent; do
sleep 1
done
echo "MariaDB is up!"

: "${MYSQL_ROOT_PASSWORD:=root}" # default, if not passed-in
mysql -uroot <<-EOSQL
ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';
FLUSH PRIVILEGES;
EOSQL
echo "Root password set to '${MYSQL_ROOT_PASSWORD}'"

# 4) start RabbitMQ in detached mode
rabbitmq-server -detached

# 5) Load the python venv
source /app/venv/bin/activate

# 6) drop into a shell (or run passed-in command)
if [ $# -gt 0 ]; then
exec "$@"
else
exec bash
fi

6 changes: 6 additions & 0 deletions .github/containers/x86_64-tutorial/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret';
CREATE DATABASE IF NOT EXISTS testdb;
CREATE USER IF NOT EXISTS 'testuser'@'localhost' IDENTIFIED BY 'testpass';
GRANT ALL PRIVILEGES ON testdb.* TO 'testuser'@'localhost';
FLUSH PRIVILEGES;

5 changes: 5 additions & 0 deletions .github/containers/x86_64-tutorial/rabbitmq.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# rabbitmq.conf
listeners.tcp.default = 127.0.0.1:5672
management.listener.ip = 127.0.0.1
management.listener.port = 15672

22 changes: 22 additions & 0 deletions .github/containers/x86_64-tutorial/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[supervisord]
nodaemon=true
logfile=/var/log/supervisord.log

[program:mariadb]
; run MariaDB as the mysql user so mysqld won’t abort
user = mysql
command = /usr/bin/mysqld_safe --datadir=/var/lib/mysql
stdout_logfile = /dev/stdout
stderr_logfile = /dev/stderr
priority = 10
autorestart = true

[program:rabbitmq]
; run RabbitMQ as the rabbitmq user
user = rabbitmq
command = /usr/sbin/rabbitmq-server
stdout_logfile = /dev/stdout
stderr_logfile = /dev/stderr
priority = 20
autorestart = true

Loading