Skip to content

Commit

Permalink
add non-optimized version
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Feb 22, 2024
1 parent 1393ed6 commit f2875ec
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
packages: write
strategy:
matrix:
type: ['corsika', 'corsika-ax2', 'groptics', 'care', 'mergevbf']
type: ['corsika', 'corsika-noopt', 'corsika-ax2', 'groptics', 'care', 'mergevbf']

steps:
- name: Checkout repository
Expand All @@ -41,6 +41,12 @@ jobs:
wget --no-verbose https://syncandshare.desy.de/index.php/s/${{ secrets.CLOUD_CORSIKA }}/download
mv download corsika-77500.tar.gz
- name: download CORSIKA package (non-optimised version)
if: matrix.type == 'corsika-noopt'
run: |
wget --no-verbose https://syncandshare.desy.de/index.php/s/${{ secrets.CLOUD_CORSIKA_CTA }}/download
mv download corsika-77500.tar.gz
- name: download CORSIKA package (optimised version)
if: matrix.type == 'corsika-ax2'
run: |
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile-corsika-ax2
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ ADD corsika-77500.tar.gz .
RUN cd ./corsika-77500/bernlohr && tar -xvzf bernlohr-1.66.tar.gz
ADD corsikaOptPatch-77500_2024-02-05.tar.gz ./corsika-77500
RUN cd ./corsika-77500 && ./corsika_opt_patching.sh && autoreconf
# # CORSIKA compile options derived with coconut
# CORSIKA compile options derived with coconut
COPY ./docker/corsika-config-ax2.h corsika-77500/include/config.h
#
# # build corsika
# build corsika
WORKDIR /workdir/corsika-77500
RUN ./coconut < /dev/null
ENV GCC_PATH=/usr/bin
Expand All @@ -30,6 +30,7 @@ RUN make clean && \
CXXFLAGS="-g -DCERENKOPT -DVLIBM -std=c99 -O3 -${AVX_FLAG} -DVECTOR_SIZE=8 -DVECTOR_LENGTH=8" \
FFLAGS="-g -ffixed-line-length-132 -fno-automatic -frecord-marker=4 -std=legacy -DCERENKOPT -DVLIBM -std=c99 -O3 -${AVX_FLAG} -DVECTOR_SIZE=8 -DVECTOR_LENGTH=8" \
install
RUN mv run/corsika77500Linux_QGSII_urqmdceropt run/corsika77500Linux_QGSII_urqmd

SHELL ["/bin/bash", "-c"]
WORKDIR /workdir/
Expand Down
44 changes: 44 additions & 0 deletions docker/Dockerfile-corsika-noopt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM almalinux:9.3 AS build_image
WORKDIR /workdir
ENV DEBIAN_FRONTEND=noninteractive

RUN yum update -y && yum install -y \
autoconf \
automake \
csh \
perl \
gcc-fortran \
gfortran \
patch && \
yum clean all

ADD corsika-77500.tar.gz .
RUN cd ./corsika-77500/bernlohr && tar -xvzf bernlohr-1.66.tar.gz
# CORSIKA compile options derived with coconut
COPY ./docker/corsika-config-ax2.h corsika-77500/include/config.h
#
# build corsika
WORKDIR /workdir/corsika-77500
RUN ./coconut < /dev/null

SHELL ["/bin/bash", "-c"]
WORKDIR /workdir/

FROM almalinux:9.3-minimal
LABEL maintainer.name="VERITAS Collaboration"
LABEL maintainer.email="gernot.maier@desy.de"
WORKDIR /workdir
ENV DEBIAN_FRONTEND=noninteractive
ARG CORSIKA=corsika-77500
COPY --from=build_image /workdir/corsika-77500/run /workdir/corsika-run

RUN microdnf update -y && microdnf install -y \
gcc-fortran && \
microdnf clean all

COPY ./config/ATMOSPHERE/atmprof*.dat /workdir/corsika-run/
# qgsjet tables (otherwise CORSIKA generates these tables during startup)
ADD https://syncandshare.desy.de/index.php/s/X9a4c5bYzy5p6nF/download /workdir/corsika-run/tables.dat

SHELL ["/bin/bash", "-c"]
WORKDIR /workdir/

0 comments on commit f2875ec

Please sign in to comment.