Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed typos in Intel Dockerfile and build_dependencies script
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Aug 15, 2023
1 parent 49f81d3 commit 17b0339
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
12 changes: 9 additions & 3 deletions Dockerfile.Intel
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ SHELL ["/bin/bash", "--login", "-c"]
ENV SHELL="/bin/bash"
WORKDIR /swiftest

ENV FC="${ONEAPI_ROOT}/compiler/latest/linux/bin/mpiifort"
ENV INSTALL_DIR=/usr/local
ENV NETCDF_HOME=${INSTALL_DIR}
ENV NETCDF_FORTRAN_HOME=${NETCDF_HOME}
ENV NETCDF_LIBRARY=${NETCDF_HOME}
ENV FOR_COARRAY_NUM_IMAGES=1
ENV OMP_NUM_THREADS=1
ENV FC="${ONEAPI_ROOT}/mpi/latest/bin/mpiifort"
ENV CC="${ONEAPI_ROOT}/compiler/latest/linux/bin/icx"
ENV CXX="${ONEAPI_ROOT}/compiler/latest/linux/bin/icpx"
ENV F77="${FC}"
Expand All @@ -89,7 +95,6 @@ ENV NETCDF_FORTRAN_HOME=${INSTALL_DIR}
ENV LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${LD_LIBRARY_PATH}"

# Copy build artifacts over to the swiftest package builder stage
ENV INSTALL_DIR=/usr/local
COPY --from=build-deps ${INSTALL_DIR}/ ${INSTALL_DIR}/

# Compile the Swiftest project
Expand All @@ -107,7 +112,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install python3-pip
# Generate the build environment in conda
ENV PIP_ROOT_USER_ACTION=ignore
ENV LDFLAGS="-L${INSTALL_DIR}/lib"
ENV CFLAGS="-fPIC -standard-semantics"
ENV CFLAGS="-fPIC"
ENV FCFLAGS="-fPIC -standard-semantics"
ENV FFLAGS=${CFLAGS}
ENV SKBUILD_CONFIGURE_OPTIONS="-DBUILD_SHARED_LIBS=OFF -DMACHINE_CODE_VALUE=\"SSE2\""
RUN export NFCFG="${INSTALL_DIR}/bin/nf-config" && \
Expand Down
11 changes: 4 additions & 7 deletions buildscripts/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ printf "*********************************************************\n"
printf "* BUILDING HDF5 STATIC LIBRARY *\n"
printf "*********************************************************\n"
cd ../hdf5-1.14.1-2
if [ "$COMPILER"="GNU-Mac" ]; then
if [ $COMPILER = "GNU-Mac" ]; then
read -r OS ARCH < <($SCRIPT_DIR/get_platform.sh)
if [ $OS="MacOS" ] && [ "$ARCH"="arm64" ]; then
if [ $ARCH = "arm64" ]; then
printf "Manually setting bin/config.sub to arm-apple-darwin\n"
printf "echo arm-apple-darwin" > bin/config.sub
fi
Expand All @@ -104,7 +104,7 @@ printf "* BUILDING NETCDF-C STATIC LIBRARY *\n"
printf "*********************************************************\n"
cd ../netcdf-c-4.9.2
COPTS="--disable-shared --disable-dap --disable-byterange --prefix=${PREFIX}"
if [ ! $COMPILER="GNU-Mac" ]; then
if [ ! $COMPILER = "GNU-Mac" ]; then
COPTS="${COPTS} --disable-libxml2"
fi
printf "COPTS: ${COPTS}\n"
Expand All @@ -120,17 +120,14 @@ if [ $? -ne 0 ]; then
exit 1
fi


export CFLAGS="-fPIC"
if [ $COMPILER="Intel" ]; then
if [ $COMPILER = "Intel" ]; then
export FCFLAGS="${CFLAGS} -standard-semantics"
else
export FCFLAGS="${CFLAGS}"
fi
export FFLAGS=${CFLAGS}

export LIBS="$(${PREFIX}/bin/nc-config --libs --static)"

printf "\n"
printf "*********************************************************\n"
printf "* BUILDING NETCDF-FORTRAN STATIC LIBRARY *\n"
Expand Down

0 comments on commit 17b0339

Please sign in to comment.