generated from learning-process/parallel_programming_course
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
352 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:jammy | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install \ | ||
gcc g++ \ | ||
mpich openmpi-bin libopenmpi-dev libomp-dev \ | ||
cppcheck valgrind \ | ||
python3-pip \ | ||
clangd \ | ||
&& apt-get autoremove -y && apt-get clean -y | ||
|
||
COPY ./reinstall-cmake.sh /tmp/ | ||
RUN chmod +x /tmp/reinstall-cmake.sh \ | ||
&& /tmp/reinstall-cmake.sh 3.25.0 \ | ||
&& rm -f /tmp/reinstall-cmake.sh | ||
|
||
RUN pip install --no-cache-dir xlsxwriter==3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// https://aka.ms/devcontainer.json | ||
{ | ||
"name": "Ubuntu", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"llvm-vs-code-extensions.vscode-clangd", | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cmake-tools" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
# | ||
set -e | ||
|
||
CMAKE_VERSION=${1:-"none"} | ||
|
||
if [ "${CMAKE_VERSION}" = "none" ]; then | ||
echo "No CMake version specified, skipping CMake reinstallation" | ||
exit 0 | ||
fi | ||
|
||
# Cleanup temporary directory and associated files when exiting the script. | ||
cleanup() { | ||
EXIT_CODE=$? | ||
set +e | ||
if [[ -n "${TMP_DIR}" ]]; then | ||
echo "Executing cleanup of tmp files" | ||
rm -Rf "${TMP_DIR}" | ||
fi | ||
exit $EXIT_CODE | ||
} | ||
trap cleanup EXIT | ||
|
||
|
||
echo "Installing CMake..." | ||
apt-get -y purge --auto-remove cmake | ||
mkdir -p /opt/cmake | ||
|
||
architecture=$(dpkg --print-architecture) | ||
case "${architecture}" in | ||
arm64) | ||
ARCH=aarch64 ;; | ||
amd64) | ||
ARCH=x86_64 ;; | ||
*) | ||
echo "Unsupported architecture ${architecture}." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh" | ||
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt" | ||
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX) | ||
|
||
echo "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
|
||
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O | ||
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O | ||
|
||
sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}" | ||
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license | ||
|
||
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake | ||
ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"llvm-vs-code-extensions.vscode-clangd", | ||
"ms-vscode.cmake-tools", | ||
"eamodio.gitlens", | ||
"matepek.vscode-catch2-test-adapter", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"C_Cpp.intelliSenseEngine": "disabled", | ||
"[cpp]": { | ||
"editor.formatOnSave": true, | ||
}, | ||
"cmake.configureArgs": [ | ||
"-D USE_SEQ=ON", | ||
"-D USE_MPI=ON", | ||
"-D USE_OMP=ON", | ||
"-D USE_TBB=ON", | ||
"-D USE_STL=ON", | ||
"-D USE_FUNC_TESTS=ON", | ||
"-D USE_PERF_TESTS=ON", | ||
"-D USE_CPPCHECK=ON" | ||
], | ||
"testMate.cpp.debug.configTemplate": { | ||
"type": "cppvsdbg", | ||
"linux": { | ||
"type": "cppdbg", | ||
"MIMode": "gdb" | ||
}, | ||
"darwin": { | ||
"type": "cppdbg", | ||
"MIMode": "lldb" | ||
}, | ||
"win32": { | ||
"type": "cppvsdbg" | ||
}, | ||
"program": "${exec}", | ||
"args": "${argsArray}", | ||
"cwd": "${cwd}", | ||
"env": "${envObj}", | ||
"environment": "${envObjArray}", | ||
"sourceFileMap": "${sourceFileMapObj}", | ||
}, | ||
"testMate.cpp.test.advancedExecutables": [ | ||
// rest | ||
{ | ||
"pattern": "build/bin/*_tests" | ||
}, | ||
// mpi | ||
{ | ||
"pattern": "build/bin/mpi_func_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build mpi_func_tests", | ||
], | ||
}, | ||
}, | ||
{ | ||
"pattern": "build/bin/mpi_perf_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build mpi_perf_tests", | ||
], | ||
}, | ||
}, | ||
// omp | ||
{ | ||
"pattern": "build/bin/omp_func_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build omp_func_tests", | ||
], | ||
}, | ||
}, | ||
{ | ||
"pattern": "build/bin/omp_perf_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build omp_perf_tests", | ||
], | ||
}, | ||
}, | ||
// seq | ||
{ | ||
"pattern": "build/bin/seq_func_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build seq_func_tests", | ||
], | ||
}, | ||
}, | ||
{ | ||
"pattern": "build/bin/seq_perf_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build seq_perf_tests", | ||
], | ||
}, | ||
}, | ||
// stl | ||
{ | ||
"pattern": "build/bin/stl_func_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build stl_func_tests", | ||
], | ||
}, | ||
}, | ||
{ | ||
"pattern": "build/bin/stl_perf_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build stl_perf_tests", | ||
], | ||
}, | ||
}, | ||
// tbb | ||
{ | ||
"pattern": "build/bin/tbb_func_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build tbb_func_tests", | ||
], | ||
}, | ||
}, | ||
{ | ||
"pattern": "build/bin/tbb_perf_tests", | ||
"runTask": { | ||
"before": [ | ||
"CMake: build tbb_perf_tests", | ||
], | ||
}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build all", | ||
"command": "build", | ||
"targets": [ | ||
"all" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
|
||
// mpi | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build mpi_func_tests", | ||
"command": "build", | ||
"targets": [ | ||
"mpi_func_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build mpi_perf_tests", | ||
"command": "build", | ||
"targets": [ | ||
"mpi_perf_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
|
||
// omp | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build omp_func_tests", | ||
"command": "build", | ||
"targets": [ | ||
"omp_func_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build omp_perf_tests", | ||
"command": "build", | ||
"targets": [ | ||
"omp_perf_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
|
||
// seq | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build seq_func_tests", | ||
"command": "build", | ||
"targets": [ | ||
"seq_func_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build seq_perf_tests", | ||
"command": "build", | ||
"targets": [ | ||
"seq_perf_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
|
||
// stl | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build stl_func_tests", | ||
"command": "build", | ||
"targets": [ | ||
"stl_func_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build stl_perf_tests", | ||
"command": "build", | ||
"targets": [ | ||
"stl_perf_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
|
||
// tbb | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build tbb_func_tests", | ||
"command": "build", | ||
"targets": [ | ||
"tbb_func_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"type": "cmake", | ||
"label": "CMake: build tbb_perf_tests", | ||
"command": "build", | ||
"targets": [ | ||
"tbb_perf_tests" | ||
], | ||
"group": "build", | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |