Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for MacOS and new CI to prevent future breaks #164

Merged
merged 31 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
eeb1b73
include MacOS in CI
jeanbez Oct 26, 2023
61d8dbe
include dependencies
jeanbez Oct 26, 2023
a816793
replace tcp with sockets
jeanbez Oct 26, 2023
c151eb9
add libuuid
jeanbez Oct 26, 2023
181e2a4
rename file
jeanbez Oct 27, 2023
1cdb488
fix find UUID to correctly locate files in Ubuntu and MacOS
jeanbez Oct 27, 2023
9cc5693
fix random segfault in strdup + malloc due to wrong allocation
jeanbez Oct 27, 2023
b82d723
ensure consitency use of defined variables
jeanbez Oct 27, 2023
f48cb22
change transport for MacOS tests
jeanbez Oct 27, 2023
a2c6a8e
uncomment code
jeanbez Oct 27, 2023
61384fe
update env
jeanbez Oct 27, 2023
040a8d5
new version of macos
jeanbez Oct 27, 2023
971bdea
disable tests on MacOS
jeanbez Oct 30, 2023
84f71a4
Update dependencies-macos.sh
jeanbez Oct 30, 2023
150a3bb
Update dependencies-macos.sh
jeanbez Oct 30, 2023
d522a05
rollback change
jeanbez Oct 31, 2023
ac80e0a
fixes to the container delete
jeanbez Oct 31, 2023
b4cc7b7
Committing clang-format changes
github-actions[bot] Oct 31, 2023
f856258
remove previous code
jeanbez Oct 31, 2023
fc0fada
Merge branch 'develop' into macos-ci
jeanbez Oct 31, 2023
9cc682f
replace found to TRUE/FALSE
jeanbez Nov 7, 2023
ae075a0
Merge branch 'develop' into macos-ci
jeanbez Dec 13, 2023
831cf90
temporarily add back the tests in MacOS after GitHub new release
jeanbez Dec 13, 2023
6e439a3
update documentation with timeout and macos specifics
jeanbez Dec 13, 2023
ac56982
fix git link to avoid authentication
jeanbez Dec 13, 2023
5652574
update dependencies
jeanbez Dec 13, 2023
73d9f2e
update dependencies
jeanbez Dec 13, 2023
6e9ffb3
change transport for tests
jeanbez Dec 13, 2023
c3f710e
temporarily add session debug
jeanbez Dec 13, 2023
4429c48
configure network for macos tests
jeanbez Dec 13, 2023
ea57091
configure network for macos tests
jeanbez Dec 13, 2023
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
24 changes: 24 additions & 0 deletions .github/workflows/dependencies-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -eu -o pipefail

brew install open-mpi autoconf automake libtool ossp-uuid

# libfabric
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.12.1.tar.gz
jeanbez marked this conversation as resolved.
Show resolved Hide resolved
tar xf v1.12.1.tar.gz
cd libfabric-1.12.1
./autogen.sh
./configure --disable-usnic --disable-mrail --disable-rstream --disable-perf --disable-efa --disable-psm2 --disable-psm --disable-verbs --disable-shm --disable-static --disable-silent-rules
make -j2 && sudo make install
make check
cd ..

# Mercury
git clone --recursive https://github.com/mercury-hpc/mercury.git
cd mercury
git checkout v2.1.0
jeanbez marked this conversation as resolved.
Show resolved Hide resolved
mkdir build && cd build
cmake ../ -DCMAKE_C_COMPILER=gcc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DMERCURY_USE_CHECKSUMS=OFF -DNA_OFI_TESTING_PROTOCOL=sockets
make -j2 && sudo make install
ctest
25 changes: 25 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: MacOS

on:
pull_request:
branches: [ stable, develop ]

# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
PDC:
runs-on: macos-13
timeout-minutes: 60

steps:
- uses: actions/checkout@v3

- name: Dependencies
run: .github/workflows/dependencies-macos.sh

- name: Build PDC
run: |
mkdir build && cd build
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc
make -j 2
12 changes: 1 addition & 11 deletions .github/workflows/linux.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: linux
name: Ubuntu

on:
# push:
# branches: [ stable ]
pull_request:
branches: [ stable, develop ]

Expand All @@ -27,14 +25,6 @@ jobs:
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc
make -j2

# - name: Debug test PDC
# working-directory: ./src/build/bin
# run: |
# mpirun -n 1 ./pdc_server.exe &
# sleep 1
# mpirun -n 1 ./pdc_init
# mpirun -n 1 ./close_server

- name: Test PDC
working-directory: build
run: ctest -L serial
14 changes: 7 additions & 7 deletions CMake/FindMERCURY.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ if(MERCURY_FOUND)
HINTS ${MERCURY_DIR}
)

# find_library(MERCURY_UTIL_LIBRARY
# NAMES
# mercury_util
# HINTS ${MERCURY_DIR}
# )
find_library(MERCURY_UTIL_LIBRARY
NAMES
mercury_util
HINTS ${MERCURY_DIR}
)

# set(MERCURY_LIBRARIES ${MERCURY_LIBRARY} ${MERCURY_NA_LIBRARY} ${MERCURY_UTIL_LIBRARY})
set(MERCURY_LIBRARIES ${MERCURY_LIBRARY} ${MERCURY_NA_LIBRARY})
set(MERCURY_LIBRARIES ${MERCURY_LIBRARY} ${MERCURY_NA_LIBRARY} ${MERCURY_UTIL_LIBRARY})
# set(MERCURY_LIBRARIES ${MERCURY_LIBRARY} ${MERCURY_NA_LIBRARY})
set(MERCURY_INCLUDE_DIRS ${MERCURY_INCLUDE_DIR})
message(STATUS "mercury include dir = ${MERCURY_INCLUDE_DIRS}")
message(STATUS "mercury lib = ${MERCURY_LIBRARIES}")
Expand Down
67 changes: 36 additions & 31 deletions CMake/FindUUID.cmake
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
# FindUUID.cmake
# On Mac OS X the uuid functions are in the System library

# Find the system's UUID library
# This will define:
#
# UUID_FOUND - System has UUID
# UUID_INCLUDE_DIRS - The UUID include directory
# UUID_LIBRARIES - The libraries needed to use UUID
if(APPLE)
set(UUID_LIBRARY_VAR System)
else()
set(UUID_LIBRARY_VAR uuid)
endif()

# - Try to find UUID
# Once done this will define
# UUID_FOUND - System has UUID
# UUID_INCLUDE_DIRS - The UUID include directories
# UUID_LIBRARIES - The libraries needed to use UUID

find_package(PkgConfig)
pkg_check_modules(PC_UUID uuid)
find_library(UUID_LIBRARY
NAMES ${UUID_LIBRARY_VAR}
PATHS /usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib
)

find_path(UUID_INCLUDE_DIR uuid/uuid.h
HINTS ${PC_UUID_INCLUDEDIR} ${PC_UUID_INCLUDE_DIRS}
PATHS /usr/local/include /usr/include)

find_library(UUID_LIBRARY NAMES uuid
HINTS ${PC_DRC_LIBDIR} ${PC_DRC_LIBRARY_DIRS}
PATHS /usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib)

set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
set(UUID_LIBRARIES ${UUID_LIBRARY})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(UUID DEFAULT_MSG
UUID_INCLUDE_DIR UUID_LIBRARY)

mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY)
PATHS /usr/local/include /usr/include
)

if (UUID_LIBRARY AND UUID_INCLUDE_DIR)
set(UUID_LIBRARIES ${UUID_LIBRARY})
set(UUID_FOUND "YES")
jeanbez marked this conversation as resolved.
Show resolved Hide resolved
else ()
set(UUID_FOUND "NO")
jeanbez marked this conversation as resolved.
Show resolved Hide resolved
endif ()

if (UUID_FOUND)
if (NOT UUID_FIND_QUIETLY)
message(STATUS "Found UUID: ${UUID_LIBRARIES}")
endif ()
else ()
if (UUID_FIND_REQUIRED)
message( "library: ${UUID_LIBRARY}" )
message( "include: ${UUID_INCLUDE_DIR}" )
message(FATAL_ERROR "Could not find UUID library")
endif ()
endif ()

mark_as_advanced(
UUID_LIBRARY
UUID_INCLUDE_DIR
)
2 changes: 1 addition & 1 deletion src/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if(MERCURY_FOUND)
set(PDC_EXT_INCLUDE_DEPENDENCIES ${MERCURY_INCLUDE_DIR}
${PDC_EXT_INCLUDE_DEPENDENCIES}
)
set(PDC_EXT_LIB_DEPENDENCIES mercury ${PDC_EXT_LIB_DEPENDENCIES})
set(PDC_EXT_LIB_DEPENDENCIES ${MERCURY_LIBRARIES} ${PDC_EXT_LIB_DEPENDENCIES})
endif()

include_directories(${PDC_EXT_INCLUDE_DEPENDENCIES})
Expand Down
4 changes: 2 additions & 2 deletions src/commons/utils/include/pdc_malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ void *PDC_free(void *mem);
*/
size_t PDC_get_global_mem_usage();

#define PDC_MALLOC(t) (t *)PDC_malloc(sizeof(t))
#define PDC_CALLOC(c, t) (t *)PDC_calloc(c, sizeof(t))
#define PDC_MALLOC(t) (t *)PDC_malloc(sizeof(t) + 1)
#define PDC_CALLOC(c, t) (t *)PDC_calloc(c, sizeof(t) + 1)
jeanbez marked this conversation as resolved.
Show resolved Hide resolved

#define PDC_FREE(t, obj) (t *)(intptr_t) PDC_free(obj)

Expand Down
Loading