Skip to content

Commit f2011d5

Browse files
authored
Synchronize stable with develop branch (#152)
Synchronize stable with develop branch
1 parent f2a5229 commit f2011d5

File tree

229 files changed

+19763
-1936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+19763
-1936
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Note: Run `docker build -f .devcontainer/Dockerfile -t pdc:latest .` from the root directory of the repository to build the docker image.
2+
3+
# Use Ubuntu Jammy (latest LTS) as the base image
4+
FROM ubuntu:jammy
5+
6+
7+
8+
# Install necessary tools, MPICH, UUID library and developer files
9+
RUN apt-get update && apt-get install -y \
10+
build-essential \
11+
git \
12+
mpich \
13+
libmpich-dev \
14+
uuid \
15+
uuid-dev \
16+
autoconf \
17+
libtool \
18+
cmake \
19+
cmake-curses-gui \
20+
wget \
21+
axel \
22+
curl \
23+
vim \
24+
nano \
25+
gdb \
26+
cgdb \
27+
curl \
28+
valgrind
29+
30+
# Set WORK_SPACE environment variable and create necessary directories
31+
RUN mkdir -p /workspaces
32+
ENV WORK_SPACE=/workspaces
33+
34+
35+
# Clone the repositories
36+
WORKDIR $WORK_SPACE/source
37+
RUN git clone https://github.com/ofiwg/libfabric.git && \
38+
git clone https://github.com/mercury-hpc/mercury.git --recursive
39+
40+
COPY ./ ${WORK_SPACE}/source/pdc
41+
42+
ENV LIBFABRIC_SRC_DIR=$WORK_SPACE/source/libfabric
43+
ENV MERCURY_SRC_DIR=$WORK_SPACE/source/mercury
44+
ENV PDC_SRC_DIR=$WORK_SPACE/source/pdc
45+
ENV LIBFABRIC_DIR=$WORK_SPACE/install/libfabric
46+
ENV MERCURY_DIR=$WORK_SPACE/install/mercury
47+
ENV PDC_DIR=$WORK_SPACE/install/pdc
48+
49+
RUN mkdir -p $LIBFABRIC_SRC_DIR && \
50+
mkdir -p $MERCURY_SRC_DIR && \
51+
mkdir -p $LIBFABRIC_DIR && \
52+
mkdir -p $MERCURY_DIR && \
53+
mkdir -p $PDC_DIR
54+
55+
56+
# Save the environment variables to a file
57+
RUN echo "export LIBFABRIC_SRC_DIR=$WORK_SPACE/source/libfabric" > $WORK_SPACE/pdc_env.sh && \
58+
echo "export MERCURY_SRC_DIR=$WORK_SPACE/source/mercury" >> $WORK_SPACE/pdc_env.sh && \
59+
echo "export PDC_SRC_DIR=$WORK_SPACE/source/pdc" >> $WORK_SPACE/pdc_env.sh && \
60+
echo "export LIBFABRIC_DIR=$WORK_SPACE/install/libfabric" >> $WORK_SPACE/pdc_env.sh && \
61+
echo "export MERCURY_DIR=$WORK_SPACE/install/mercury" >> $WORK_SPACE/pdc_env.sh && \
62+
echo "export PDC_DIR=$WORK_SPACE/install/pdc" >> $WORK_SPACE/pdc_env.sh
63+
64+
65+
# Build and install libfabric
66+
WORKDIR $LIBFABRIC_SRC_DIR
67+
RUN git checkout v1.18.0 && \
68+
./autogen.sh && \
69+
./configure --prefix=$LIBFABRIC_DIR CC=mpicc CFLAG="-O2" && \
70+
make clean && \
71+
make -j && make install && \
72+
make check
73+
74+
ENV LD_LIBRARY_PATH="$LIBFABRIC_DIR/lib:$LD_LIBRARY_PATH"
75+
ENV PATH="$LIBFABRIC_DIR/include:$LIBFABRIC_DIR/lib:$PATH"
76+
RUN echo 'export LD_LIBRARY_PATH=$LIBFABRIC_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh && \
77+
echo 'export PATH=$LIBFABRIC_DIR/include:$LIBFABRIC_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
78+
79+
80+
# Build and install Mercury
81+
WORKDIR $MERCURY_SRC_DIR
82+
ENV MERCURY_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DNA_OFI_TESTING_PROTOCOL=tcp "
83+
RUN git checkout v2.2.0 \
84+
mkdir -p build
85+
WORKDIR ${MERCURY_SRC_DIR}/build
86+
RUN cmake $MERCURY_CMAKE_FLAGS ../ && \
87+
make -j && make install && \
88+
ctest
89+
90+
# Set the environment variables
91+
ENV LD_LIBRARY_PATH="$MERCURY_DIR/lib:$LD_LIBRARY_PATH"
92+
ENV PATH="$MERCURY_DIR/include:$MERCURY_DIR/lib:$PATH"
93+
RUN echo 'export LD_LIBRARY_PATH=$MERCURY_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh \
94+
echo 'export PATH=$MERCURY_DIR/include:$MERCURY_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
95+

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "pdc_devcontainer",
3+
"dockerFile": "devcontainer.Dockerfile",
4+
"forwardPorts": [
5+
3000
6+
],
7+
"postCreateCommand": ".devcontainer/post-create.sh",
8+
"postStartCommand": ".devcontainer/post-start.sh"
9+
}

.devcontainer/post-create.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/bash

.devcontainer/post-start.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
4+
ln -s /workspaces/pdc /home/codespace/source/pdc
5+
mkdir -p /workspaces/install
6+
mkdir -p /workspaces/source
7+
ln -s $PDC_SRC_DIR /workspaces/source/pdc
8+
ln -s $PDC_DIR /workspaces/install/pdc
9+
10+
export PDC_SRC_DIR=/workspaces/source/pdc
11+
12+
# Build and install PDC
13+
export PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
14+
15+
cd $PDC_SRC_DIR
16+
rm -rf build && mkdir -p build
17+
18+
19+
cd ${PDC_SRC_DIR}/build
20+
cmake $PDC_CMAKE_FLAGS ../ 2>&1 > ./cmake_config.log || echo "ignoring cmake config error and proceed"
21+
make -j && make install
22+
23+
# Set the environment variables
24+
export LD_LIBRARY_PATH="$PDC_DIR/lib:$LD_LIBRARY_PATH"
25+
export PATH="$PDC_DIR/include:$PDC_DIR/lib:$PATH"
26+
echo 'export LD_LIBRARY_PATH=$PDC_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh
27+
echo 'export PATH=$PDC_DIR/include:$PDC_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
28+
29+
30+
cd $PDC_SRC_DIR/build
31+
# ctest

.docker/base.Dockerfile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Use Ubuntu Jammy (latest LTS) as the base image
2+
FROM ubuntu:jammy
3+
4+
# Install necessary tools, MPICH, UUID library and developer files
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
git \
8+
mpich \
9+
libmpich-dev \
10+
uuid \
11+
uuid-dev \
12+
autoconf \
13+
libtool \
14+
cmake \
15+
cmake-curses-gui \
16+
wget \
17+
axel \
18+
curl \
19+
vim \
20+
nano \
21+
gdb \
22+
cgdb \
23+
curl \
24+
valgrind
25+
26+
# Set WORK_SPACE environment variable and create necessary directories
27+
ENV WORK_SPACE=/home/codespace
28+
RUN mkdir -p $WORK_SPACE
29+
30+
# Clone the repositories
31+
WORKDIR $WORK_SPACE/source
32+
RUN git clone https://github.com/ofiwg/libfabric.git && \
33+
git clone https://github.com/mercury-hpc/mercury.git --recursive
34+
35+
COPY ./ ${WORK_SPACE}/source/pdc
36+
37+
ENV LIBFABRIC_SRC_DIR=$WORK_SPACE/source/libfabric
38+
ENV MERCURY_SRC_DIR=$WORK_SPACE/source/mercury
39+
ENV PDC_SRC_DIR=$WORK_SPACE/source/pdc
40+
ENV LIBFABRIC_DIR=$WORK_SPACE/install/libfabric
41+
ENV MERCURY_DIR=$WORK_SPACE/install/mercury
42+
ENV PDC_DIR=$WORK_SPACE/install/pdc
43+
44+
RUN mkdir -p $LIBFABRIC_SRC_DIR \
45+
mkdir -p $MERCURY_SRC_DIR \
46+
mkdir -p $PDC_SRC_DIR \
47+
mkdir -p $LIBFABRIC_DIR \
48+
mkdir -p $MERCURY_DIR \
49+
mkdir -p $PDC_DIR
50+
51+
52+
# Save the environment variables to a file
53+
RUN echo "export LIBFABRIC_SRC_DIR=$WORK_SPACE/source/libfabric" > $WORK_SPACE/pdc_env.sh && \
54+
echo "export MERCURY_SRC_DIR=$WORK_SPACE/source/mercury" >> $WORK_SPACE/pdc_env.sh && \
55+
echo "export PDC_SRC_DIR=$WORK_SPACE/source/pdc" >> $WORK_SPACE/pdc_env.sh && \
56+
echo "export LIBFABRIC_DIR=$WORK_SPACE/install/libfabric" >> $WORK_SPACE/pdc_env.sh && \
57+
echo "export MERCURY_DIR=$WORK_SPACE/install/mercury" >> $WORK_SPACE/pdc_env.sh && \
58+
echo "export PDC_DIR=$WORK_SPACE/install/pdc" >> $WORK_SPACE/pdc_env.sh
59+
60+
61+
# Build and install libfabric
62+
WORKDIR $LIBFABRIC_SRC_DIR
63+
RUN git checkout v1.18.0 && \
64+
./autogen.sh && \
65+
./configure --prefix=$LIBFABRIC_DIR CC=mpicc CFLAG="-O2" && \
66+
make clean && \
67+
make -j && make install && \
68+
make check
69+
70+
ENV LD_LIBRARY_PATH="$LIBFABRIC_DIR/lib:$LD_LIBRARY_PATH"
71+
ENV PATH="$LIBFABRIC_DIR/include:$LIBFABRIC_DIR/lib:$PATH"
72+
RUN echo 'export LD_LIBRARY_PATH=$LIBFABRIC_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh && \
73+
echo 'export PATH=$LIBFABRIC_DIR/include:$LIBFABRIC_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
74+
75+
76+
# Build and install Mercury
77+
WORKDIR $MERCURY_SRC_DIR
78+
ENV MERCURY_CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DNA_OFI_TESTING_PROTOCOL=tcp "
79+
RUN git checkout v2.2.0 \
80+
mkdir -p build
81+
WORKDIR ${MERCURY_SRC_DIR}/build
82+
RUN cmake $MERCURY_CMAKE_FLAGS ../ && \
83+
make -j && make install && \
84+
ctest
85+
86+
# Set the environment variables
87+
ENV LD_LIBRARY_PATH="$MERCURY_DIR/lib:$LD_LIBRARY_PATH"
88+
ENV PATH="$MERCURY_DIR/include:$MERCURY_DIR/lib:$PATH"
89+
RUN echo 'export LD_LIBRARY_PATH=$MERCURY_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh \
90+
echo 'export PATH=$MERCURY_DIR/include:$MERCURY_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh

.docker/local.Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Note: Run `docker build -f .docker/Dockerfile -t pdc:latest .` from the root directory of the repository to build the docker image.
2+
3+
# Use Ubuntu Jammy (latest LTS) as the base image
4+
FROM zhangwei217245/pdc_dev_base:latest
5+
6+
# Build and install PDC
7+
ENV PDC_CMAKE_FLAGS="-DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec "
8+
9+
10+
WORKDIR $PDC_SRC_DIR
11+
RUN rm -rf build && \
12+
mkdir -p build
13+
14+
# COPY ../ ${PDC_SRC_DIR}
15+
# RUN ls -l $PDC_SRC_DIR
16+
17+
WORKDIR ${PDC_SRC_DIR}/build
18+
RUN cmake $PDC_CMAKE_FLAGS ../ 2>&1 > ./cmake_config.log || echo "ignoring cmake config error and proceed" && \
19+
make -j && make install
20+
21+
# Set the environment variables
22+
ENV LD_LIBRARY_PATH="$PDC_DIR/lib:$LD_LIBRARY_PATH"
23+
ENV PATH="$PDC_DIR/include:$PDC_DIR/lib:$PATH"
24+
RUN echo 'export LD_LIBRARY_PATH=$PDC_DIR/lib:$LD_LIBRARY_PATH' >> $WORK_SPACE/pdc_env.sh && \
25+
echo 'export PATH=$PDC_DIR/include:$PDC_DIR/lib:$PATH' >> $WORK_SPACE/pdc_env.sh
26+
27+
28+
# WORKDIR $PDC_SRC_DIR/build
29+
# RUN ctest
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Exclude files and directories from the Docker build context
2+
!/.git/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
**Bug Report**
2+
3+
A clear and concise description of what the bug is, including module and feature.
4+
5+
**To Reproduce**
6+
7+
How are you building/running PDC?
8+
9+
- version of PDC: [e.g., 0.3, branch, or hash]
10+
- installed PDC using: [spack, from source]
11+
- operating system: [name and version]
12+
- machine: [Are you running on a supercomputer or public cluster?]
13+
- version of Mercury: [e.g., 1.12.0]
14+
- name and version of MPI: [e.g., OpenMPI 4.1.1]
15+
16+
What did you use to build PDC (cmake command)?
17+
18+
```bash
19+
...
20+
```
21+
22+
What is the running setup you use?
23+
24+
```bash
25+
...
26+
```
27+
28+
**Expected Behavior**
29+
30+
A clear and concise description of what you expected to happen.
31+
32+
**Additional Information**
33+
34+
If built from source, include the cmake options you used.
35+
Add any other information about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
**What does this feature solve or improve?**
2+
3+
A clear and concise description of what the problem is.
4+
Example: I always do the following workflow [...]
5+
6+
**Describe the solution you'd like**
7+
8+
A clear and concise description of what you want to happen.
9+
Example: It would be fantastic if one could [...]
10+
11+
**Describe alternatives you've considered**
12+
13+
A clear and concise description of any alternative solutions or features you've considered.
14+
15+
**Additional Information**
16+
17+
Add any other information about the feature request here.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
**Issue Description**
2+
3+
This is what I have tried so far:
4+
5+
6+
```commandline
7+
...
8+
```
9+
10+
This is the error I am facing during installation:
11+
12+
```
13+
...
14+
```
15+
16+
**Software Environment**
17+
18+
- version of PDC: [e.g. 0.3]
19+
- installed PDC using: [spack, from source]
20+
- operating system: [name and version]
21+
- machine: [Are you running on a supercomputer or public cluster?]
22+
- version of Mercury: [e.g. 1.12.0]
23+
- name and version of MPI: [e.g. OpenMPI 4.1.1]
24+
25+
**Additional Information**
26+
27+
Add any other information about the problem here.

0 commit comments

Comments
 (0)