Skip to content
Snippets Groups Projects
Commit b923c9c6 authored by CHAMONT David's avatar CHAMONT David
Browse files

Factorize cmake lists in cmake/. Group all steps in a single coliru.bash scripts.

parent 48a305b5
No related branches found
No related tags found
No related merge requests found
Showing
with 81 additions and 50 deletions
#!/usr/bin/env bash
rm -rf build
mkdir -p build
cd build
cmake ..
#!/usr/bin/env bash
# check sycl-ls
sycl-ls
# copy the CMakeLists.txt files
cp -f ../cmake/CMakeLists.cpu.txt CMakeLists.txt
cp -f ../cmake/CMakeLists.src.txt src/CMakeLists.txt
# run cmake
rm -rf build
mkdir -p build
cd build
cmake ..
# build the project
make all
# run the project
./build/gray-scott.exe 1
#!/usr/bin/env bash
cd build
make all
#!/usr/bin/env bash
./build/main.exe 1
File moved
#!/usr/bin/env bash
sycl-ls
#!/usr/bin/env bash
rm -rf build
mkdir -p build
cd build
cmake ..
#!/usr/bin/env bash
cd build
make all
#!/usr/bin/env bash
./build/main.exe 2
set(SOURCE_FILE main.cpp)
set(TARGET_NAME main.exe)
add_executable(${TARGET_NAME} ${SOURCE_FILE})
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
#!/usr/bin/env bash
sycl-ls
#!/usr/bin/env bash
# check sycl-ls
sycl-ls
# copy the CMakeLists.txt files
cp -f ../cmake/CMakeLists.gpu.txt CMakeLists.txt
cp -f ../cmake/CMakeLists.src.txt src/CMakeLists.txt
# run cmake
rm -rf build
mkdir -p build
cd build
cmake ..
# build the project
make all
# run the project
./build/gray-scott.exe 2
File moved
#!/bin/bash
clear
rm -rf build
mkdir -p build
cd build
cmake ..
#!/usr/bin/env bash
# copy the CMakeLists.txt files
cp -f ../cmake/CMakeLists.seq.txt CMakeLists.txt
cp -f ../cmake/CMakeLists.src.txt src/CMakeLists.txt
# run cmake
rm -rf build
mkdir -p build
cd build
cmake ..
# build the project
make all
# run the project
time ./build/main.exe 1080 1920 50 10
#!/bin/bash
time ./build/main.exe 1080 1920 50 10
echo
set(SOURCE_FILE main.cpp)
set(TARGET_NAME main.exe)
set(CMAKE_CXX_COMPILER "g++")
set(COMPILE_FLAGS "-std=c++20 -O2 -Wall -Wextra -Wfloat-equal")
add_executable(${TARGET_NAME} ${SOURCE_FILE})
add_compile_options("${COMPILE_FLAGS}")
File moved
......@@ -22,5 +22,5 @@ qsub -l nodes=1:gpu:ppn=2 -d . make.bash
qsub -l nodes=1:gpu:ppn=2 -d . run.bash
```
One can check the status of current jobs with `qstat`, and remove them with `qdel`.
One can check the status of current jobs with `qstat`, or `watch -n 1 qstat -n -1`, and remove them with `qdel <job_id>`.
#!/bin/bash
if ! [ -d ../cmake ]; then
echo "Run this script from a subdirectory of the top directory."
exit 1
fi
if ! [ -d src ]; then
echo "Run this script from a directory containing a src directory."
exit 2
fi
cp -f ../cmake/CMakeLists.top.txt CMakeLists.txt
cp -f ../cmake/CMakeLists.src.txt src/CMakeLists.txt
rm -rf build
mkdir -p build
cd build
cmake ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment