Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d53c609
update upload-artifact
matekelemen Jan 9, 2025
4dbb4a1
CI ubuntu 20 => 22
matekelemen Apr 14, 2025
f80bdcb
bump oldest supported CMake in the CI to 3.15
matekelemen Apr 14, 2025
ad467e7
CI Centos7 => Rocky8
matekelemen Apr 14, 2025
fe7fbaf
CI actions/setup-python 1 => 5
matekelemen Apr 14, 2025
b5c50a1
drop pyrhon 3.8 in the CI and add 3.12 and 3.13
matekelemen Apr 14, 2025
388ea9f
replace clang-11 with the default pacman clang in the CI
matekelemen Apr 14, 2025
c4a56cf
explicit void argument
matekelemen Apr 14, 2025
6214c71
add args to entry points
matekelemen Apr 14, 2025
66077dc
try handling C and C++ separately?
matekelemen Apr 14, 2025
b596c8f
remove support for the legacy intel compiler
matekelemen Apr 14, 2025
95fbeb9
ancient C-style comments
matekelemen Apr 14, 2025
fd02e97
fix intel installation
matekelemen Apr 14, 2025
a170127
Can I omit unused argument names? - No, you can't. - Fine, but then y…
matekelemen Apr 14, 2025
e53ad06
fix intel installation - round 2
matekelemen Apr 14, 2025
7ec0a23
S T R I C T compiler
matekelemen Apr 14, 2025
ff44966
ばんさくつきた
matekelemen Apr 14, 2025
2f1fb04
more unused arguments
matekelemen Apr 14, 2025
c9a66f2
install python on rocky
matekelemen Apr 14, 2025
b13c60b
more unused arguments
matekelemen Apr 14, 2025
e813496
Merge branch 'master' of https://github.com/kratosmultiphysics/cosimi…
matekelemen Apr 14, 2025
5d44e22
revert line move by mistake
matekelemen Apr 14, 2025
678abb5
don't install python on rocky, it should be included in the image
matekelemen Apr 14, 2025
2897bc3
actions/checkout@v2 => actions/checkout@v4
matekelemen Apr 14, 2025
1c95afc
pick specific python version in rocky
matekelemen Apr 23, 2025
9420d94
rocky rocky in the CI, y u don't find version 3.8 of py?
matekelemen Apr 23, 2025
2123450
Revert "rocky rocky in the CI, y u don't find version 3.8 of py?"
matekelemen Apr 23, 2025
01fb086
avoid using 'which' in rocky
matekelemen Apr 23, 2025
c9068e8
invoke the correct python interpreter on rocky
matekelemen Apr 23, 2025
6cb3d9c
move to ubuntu-latest
matekelemen Apr 23, 2025
646425c
drop icx
matekelemen Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:latest

ENV HOME /root

Expand All @@ -15,7 +15,7 @@ RUN apt-get update -y && apt-get upgrade -y && \
apt-get -y update && \
apt-get install -y \
build-essential \
clang-11 \
clang \
cmake \
git \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_docker_images_for_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
branches:
- 'master'
paths:
- '.github/docker_files/docker_file_ci_ubuntu_20_04/*'
- '.github/docker_files/docker_file_ci_ubuntu_22_04/*'
- '.github/workflows/build_docker_images_for_ci.yml'
pull_request:
branches:
- 'master'
paths:
- '.github/docker_files/docker_file_ci_ubuntu_20_04/*'
- '.github/docker_files/docker_file_ci_ubuntu_22_04/*'
- '.github/workflows/build_docker_images_for_ci.yml'

jobs:
Expand All @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04
run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04
- name: Docker Login
uses: azure/docker-login@v1
with:
Expand All @@ -31,4 +31,4 @@ jobs:
- name: Publish the Docker image
if: ${{ github.event_name == 'push'}}
# only push the new image when the changes are merged to master
run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04
run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04
89 changes: 42 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [GCC, CLANG, ICC, ICX]
compiler: [GCC, CLANG, ICPX]
mpi: [OpenMPI, IntelMPI]
exclude:
# CLANG is not properly supported by Intel, better use LLVMIntel in the future
Expand All @@ -29,7 +29,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -44,14 +44,10 @@ jobs:

sudo apt-get install \
valgrind \
clang-11

- name: Install legacy Intel compiler
if: ${{ matrix.compiler == 'ICC' }}
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
clang

- name: Install Intel compiler
if: ${{ matrix.compiler == 'ICX' }}
if: ${{ matrix.compiler == 'ICPX' }}
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp

- name: Install MPI
Expand All @@ -68,20 +64,17 @@ jobs:
export CXX=/usr/bin/g++
export CC=/usr/bin/gcc
elif [ ${{ matrix.compiler }} = CLANG ]; then
export CXX=/usr/bin/clang++-11
export CC=/usr/bin/clang-11
elif [ ${{ matrix.compiler }} = ICC ]; then
export CXX=icpc
export CC=icc
elif [ ${{ matrix.compiler }} = ICX ]; then
export CXX=/usr/bin/clang++
export CC=/usr/bin/clang
elif [ ${{ matrix.compiler }} = ICPX ]; then
export CXX=icpx
export CC=icx
else
echo 'Unsupported compiler: ${{ matrix.compiler }}'
exit 1
fi

if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
source /opt/intel/oneapi/setvars.sh
fi

Expand All @@ -107,14 +100,14 @@ jobs:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin
export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI
export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI
if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then
source /opt/intel/oneapi/setvars.sh
fi

cd build
ctest -T memcheck --output-on-failure

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: "CTest Log Ubuntu C++ & C (${{ matrix.compiler }}-${{ matrix.mpi }})"
Expand All @@ -127,15 +120,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
compiler: [GCC, ICC]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
compiler: [GCC, ICPX]
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Intel compiler
if: ${{ matrix.compiler == 'ICC' }}
if: ${{ matrix.compiler == 'ICPX' }}
run: |
# see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable
cd /tmp
Expand All @@ -145,15 +138,15 @@ jobs:
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"

sudo apt-get update
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp

- name: Install MPI
run: |
sudo apt-get update
sudo apt-get install libopenmpi-dev openmpi-bin

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -170,7 +163,7 @@ jobs:

- name: Running tests
run: |
if [ ${{ matrix.compiler }} = ICC ]; then
if [ ${{ matrix.compiler }} = ICPX ]; then
source /opt/intel/oneapi/setvars.sh
fi
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin
Expand All @@ -181,7 +174,7 @@ jobs:

- name: Running MPI tests
run: |
if [ ${{ matrix.compiler }} = ICC ]; then
if [ ${{ matrix.compiler }} = ICPX ]; then
source /opt/intel/oneapi/setvars.sh
fi
export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin
Expand All @@ -198,7 +191,7 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build CoSimIO
run: |
Expand All @@ -221,14 +214,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -257,7 +250,7 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build CoSimIO
shell: cmd
Expand Down Expand Up @@ -297,14 +290,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -325,7 +318,7 @@ jobs:
-G"Visual Studio 17 2022" ^
-H"." ^
-B"build" ^
-DCO_SIM_IO_BUILD_PYTHON=ON ^
-DCO_SIM_IO_BUILD_PYTHON=ON ^
-DCO_SIM_IO_STRICT_COMPILER=ON || goto :error

cmake --build "build" --target install -- /p:Platform=x64 || goto :error
Expand All @@ -347,23 +340,25 @@ jobs:
python run_python_tests.py


CentOS-7:
Rocky-8:
runs-on: ubuntu-latest
name: CentOS 7
name: Rocky 8

container:
image: kratosmultiphysics/kratos-image-ci-centos7:latest
image: kratosmultiphysics/kratos-image-ci-rocky8:latest
options: --user 1001

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build CoSimIO
run: |
cmake -H"." -B"build" \
-DCMAKE_BUILD_TYPE="Debug" \
-DCO_SIM_IO_BUILD_C=ON \
-DCO_SIM_IO_BUILD_PYTHON=ON \
-DCO_SIM_IO_STRICT_COMPILER=ON
cmake -H"." -B"build" \
-DCMAKE_BUILD_TYPE="Debug" \
-DCO_SIM_IO_BUILD_C=ON \
-DCO_SIM_IO_BUILD_PYTHON=ON \
-DCO_SIM_IO_STRICT_COMPILER=ON \
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.8

cmake --build "build" --target install -- -j2

Expand All @@ -381,14 +376,14 @@ jobs:
python3.8 run_python_tests.py


Ubuntu-old-CMake:
Ubuntu-minimum-CMake:
runs-on: ubuntu-latest

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.10
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '2.8.x'
cmake-version: '3.15.x'

- name: Use cmake
run: cmake --version
Expand All @@ -398,7 +393,7 @@ jobs:
sudo apt-get update
sudo apt-get install libopenmpi-dev openmpi-bin

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build CoSimIO
run: |
Expand Down
3 changes: 2 additions & 1 deletion co_sim_io/c/co_sim_io_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ enum CoSimIO_ConnectionStatus
CoSimIO_DisconnectionError
};

CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello();
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello(
void);

CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Connect(
const CoSimIO_Info I_Settings);
Expand Down
2 changes: 1 addition & 1 deletion co_sim_io/c/co_sim_io_c_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef struct CoSimIO_Info
} CoSimIO_Info;


CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo();
CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo(void);

CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CopyInfo(const CoSimIO_Info I_Info);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace CoSimIO {
namespace Internals {

template<class TSocketType>
BaseSocketCommunication<TSocketType>::~BaseSocketCommunication<TSocketType>()
BaseSocketCommunication<TSocketType>::~BaseSocketCommunication()
{
CO_SIM_IO_TRY

Expand Down
3 changes: 3 additions & 0 deletions tests/co_sim_io/c/checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#include <math.h>
#include <string.h>


#define COSIMIO_UNUSED(variable_name) (void)(variable_name)

#define COSIMIO_CHECK_INT_EQUAL(a, b) \
if (a != b) { \
printf("in line %d: %d is not equal to %d", __LINE__, a, b); \
Expand Down
5 changes: 4 additions & 1 deletion tests/co_sim_io/c/info/test_info_bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@

#include "../checks.h"

int main()
int main(int argc, const char** argv)
{
/* declaring variables */
CoSimIO_Info info;

COSIMIO_UNUSED(argc);
COSIMIO_UNUSED(argv);

info = CoSimIO_CreateInfo();

COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "is_converged"));
Expand Down
5 changes: 4 additions & 1 deletion tests/co_sim_io/c/info/test_info_clear.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@

#include "../checks.h"

int main()
int main(int argc, const char** argv)
{
/* declaring variables */
CoSimIO_Info info;

COSIMIO_UNUSED(argc);
COSIMIO_UNUSED(argv);

info = CoSimIO_CreateInfo();

COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0);
Expand Down
5 changes: 4 additions & 1 deletion tests/co_sim_io/c/info/test_info_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@

#include "../checks.h"

int main()
int main(int argc, const char** argv)
{
/* declaring variables */
CoSimIO_Info info, copied_info;

COSIMIO_UNUSED(argc);
COSIMIO_UNUSED(argv);

info = CoSimIO_CreateInfo();

COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0);
Expand Down
Loading