Skip to content

Commit

Permalink
Merge pull request #189 from bbopt/develop
Browse files Browse the repository at this point in the history
For release 4.5
  • Loading branch information
ctribes authored Jan 28, 2025
2 parents f9fa3f5 + 718cf3f commit 0f6d8ca
Show file tree
Hide file tree
Showing 620 changed files with 31,045 additions and 12,012 deletions.
17 changes: 8 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ task:
matrix:
- name: FreeBSD -- gcc | g++
freebsd_instance:
image: freebsd-13-3-release-amd64
image: freebsd-14-0-release-amd64-ufs
env:
cc: gcc12
cxx: g++12
cc: gcc13
cxx: g++13
- name: FreeBSD -- clang | clang++
freebsd_instance:
image: freebsd-13-3-release-amd64
image: freebsd-14-0-release-amd64-ufs
env:
cc: clang
cxx: clang++
- name: MacOS M1 -- gcc | g++
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
image: ghcr.io/cirruslabs/macos-runner:sonoma
env:
cc: gcc-14
cxx: g++-14
- name: MacOS M1 -- clang | clang++
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
image: ghcr.io/cirruslabs/macos-runner:sonoma
env:
cc: clang
cxx: clang++
dependencies_script: |
echo $(uname)
if [ "$(uname)" = "FreeBSD" ]; then
pkg install -y cmake bash gcc12
pkg install -y cmake bash gcc13
else
brew install cmake gcc@14
brew install cmake gcc@12
fi
configure_script: |
mkdir instdir
Expand All @@ -40,7 +40,6 @@ task:
-DCMAKE_CXX_COMPILER=$cxx \
-DTEST_OPENMP=OFF \
-DBUILD_INTERFACE_C=ON \
-DBUILD_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=../instdir \
..
build_script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
cd interfaces/PyNomad
pip install --force-reinstall dist/*.whl
pytest
- name: Prepare upload
shell: bash
run: |
Expand All @@ -124,7 +124,7 @@ jobs:
tar -cf NOMAD4.tar *
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.os }}
path: instdir/NOMAD4.tar
36 changes: 26 additions & 10 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and publish binary wheels onto PyPi
name: Build and publish binary wheels onto TestPyPi

on:
workflow_dispatch:
Expand All @@ -19,9 +19,15 @@ jobs:
os: ubuntu-latest
archs: x86_64

- name: macOS
- name: macOS_X86
os: macos-latest
archs: x86_64
extra_option: -DCMAKE_OSX_ARCHITECTURES=x86_64

- name: macOS_ARM
os: macos-latest
archs: arm64
extra_option: -DCMAKE_OSX_ARCHITECTURES=arm64

name: Wheels for ${{ matrix.target.name }}
runs-on: ${{ matrix.target.os }}
Expand All @@ -32,33 +38,37 @@ jobs:
with:
python-version: '3.12'

- name: Prepare Python environment
run: >-
pip install setuptools wheel cython==0.29.* pytest
- name: Install dependencies on Windows
if: startsWith(matrix.config.name, 'Windows')
if: startsWith(matrix.target.name, 'Windows')
run: |
choco install cmake
cmake --version
- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
if: startsWith(matrix.target.name, 'Ubuntu')
run: |
sudo apt-get update
sudo apt-get install cmake
cmake --version
gcc --version
- name: Install dependencies on MacOS
if: startsWith(matrix.config.name, 'MacOS')
if: startsWith(matrix.target.name, 'macOS')
run: |
brew install cmake
cmake --version
- name: Build binary wheels
uses: pypa/cibuildwheel@v2.20.0
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS: >-
${{ matrix.target.archs }}
CIBW_BEFORE_ALL: >-
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF -DBUILD_EXAMPLES=OFF -S . -B build &&
cmake -DBUILD_INTERFACE_PYTHON=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release ${{ matrix.target.extra_option }} -S . -B build &&
cmake --build build --config Release --clean-first --target nomadStatic --parallel 2
CIBW_ENVIRONMENT: >-
NOMAD_SRC=../../src
Expand All @@ -70,20 +80,23 @@ jobs:
CIBW_BUILD_FRONTEND: >-
build
CIBW_BUILD_VERBOSITY: >-
3
2
CIBW_SKIP: >-
pp*
with:
output-dir: wheelhouse
package-dir: interfaces/PyNomad

- name: Collect wheels for processing
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.target.name }}
path: wheelhouse/*.whl

# We use pypa/gh-action-pypi-publish to upload the binary wheels onto PyPi.

pypi-publish:
name: Publish to PyPi
name: Publish to PyPi (testing)
runs-on: ubuntu-latest
needs: build
# Specifying a GitHub environment is optional, but strongly encouraged
Expand All @@ -96,8 +109,11 @@ jobs:
- name: Collect wheels for publication
uses: actions/download-artifact@v4
with:
name: artifact
pattern: binary-*
merge-multiple: true
path: dist

- name: Publish wheels to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://pypi.org/legacy/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ examples/**/*.exe
examples/**/cache.txt
src/nbproject/
*.swp
src/Attribute/*.hpp
examples/**/history*
examples/**/sol*
examples/**/stats*
Expand Down
45 changes: 29 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ cmake_minimum_required(VERSION 3.15...3.15)

# Warning. This must be consistent with src/nomad_version.hpp
set(NOMAD_VERSION_MAJOR 4)
set(NOMAD_VERSION_MINOR 4)
set(NOMAD_VERSION_PATCH 0)
set(NOMAD_VERSION ${NOMAD_VERSION_MAJOR}.${NOMAD_VERSION_MINOR}.${NOMAD_VERSION_PATCH})
set(NOMAD_VERSION_MINOR 5)
set(NOMAD_VERSION_PATCH 0)

set(NOMAD_VERSION ${NOMAD_VERSION_MAJOR}.${NOMAD_VERSION_MINOR}.${NOMAD_VERSION_PATCH})

# name of the project
# Need to update when version changes
Expand All @@ -29,8 +29,8 @@ endif()
# Need to update when version changes
set(NOMAD_SRC_TEMPLATE NOMAD_${NOMAD_VERSION_MAJOR}_${NOMAD_VERSION_MINOR})

# use standard compilers parameters for c++14
SET(CMAKE_CXX_STANDARD 14 )
# use standard compilers parameters for c++17
SET(CMAKE_CXX_STANDARD 17 )
SET(CMAKE_CXX_STANDARD_REQUIRED ON )

# Disable in-source builds to prevent source tree corruption.
Expand All @@ -42,7 +42,7 @@ endif()

#check compiler version
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# require at least gcc 4
# require at least gcc 8
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8)
message(FATAL_ERROR "GCC version < 8 has not been tested for Nomad")
endif()
Expand All @@ -53,7 +53,7 @@ elseif (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
message(FATAL_ERROR "Clang version has not been tested for Nomad")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# require at least 15.0 (MSVC 2017) for C++14 support
# require at least 15.8 (MSVC 2017) for C++17 support
if (MSVC_TOOLSET_VERSION VERSION_LESS 141)
message(FATAL_ERROR "MSVC version ${CMAKE_CXX_COMPILER_VERSION} has not been tested for Nomad")
endif()
Expand All @@ -72,9 +72,25 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
#
# Message for starting configuration
#
message(CHECK_START " Configuring custom options")
message(CHECK_START "Configuring custom options")
list(APPEND CMAKE_MESSAGE_INDENT " ")

#
# Modify the build type if not specified on the command
#
if (CMAKE_CONFIGURATION_TYPES)
message(STATUS " Multi-configuration generator detected. Use the --config option during build to specify the build type (Release, Debug, ...).")
else()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE PATH "..." FORCE)
message(STATUS " Build type not set explicitly. Default is set to Release. To force build type selection, use --DCMAKE_BUILD_TYPE=xxx, options are Debug Release RelWithDebInfo MinSizeRel.")
else()
message(STATUS " Build type is ${CMAKE_BUILD_TYPE}")
endif()
endif()



#
# Modify the install prefix if not specified on the command
#
Expand All @@ -83,6 +99,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif()
message(STATUS " Installation prefix set to ${CMAKE_INSTALL_PREFIX}")


#
# Choose to build with time stats enabled
#
Expand Down Expand Up @@ -123,6 +140,7 @@ else()
message(STATUS " Examples NOT built")
endif()


#
# Choose to build the C interface
#
Expand All @@ -140,15 +158,11 @@ endif()
#
option(BUILD_INTERFACE_PYTHON "Option to build Python interface to Nomad" OFF)
if(BUILD_INTERFACE_PYTHON MATCHES ON)
if(OpenMP_FOUND)
message(STATUS " Warning: Cannot build Python interface with OpenMP enabled")
else()
set(Python3_FIND_VIRTUALENV "First")
find_package(Python 3.6 QUIET REQUIRED)
set(Python3_FIND_VIRTUALENV "First") # Using virtualenv to have cython and wheel is easy
find_package(Python 3.8 QUIET REQUIRED)
message(CHECK_START " Configuring build for Python interface (Python ${Python_VERSION})")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/interfaces/PyNomad)
message(CHECK_PASS " done")
endif()
else()
message(STATUS " Python interface to Nomad NOT built")
endif()
Expand Down Expand Up @@ -240,14 +254,13 @@ else()
message(STATUS " Sgtelib library will NOT be used\n")
endif()



#
# Custom options final message
#
list(REMOVE_ITEM CMAKE_MESSAGE_INDENT " ")
message(CHECK_PASS " done")


#
# Add nomad app directory for building
#
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Ludovic Salomon
Renaud Saltet
Jan Provaznik
Tangi Migot
Edward Hallé-Hannan
8 changes: 4 additions & 4 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,11 @@ cmake -S . -B build/release
addpath(strcat(getenv('NOMAD_HOME'),'/build/release/bin'))

To enable *Python* interface (PyNomad) building:
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF -S . -B build/release
cmake -DBUILD_INTERFACE_PYTHON=ON -S . -B build/release

! Before proceeding, have a look into
$NOMAD_HOME/interfaces/PyNomad/readme.txt

! The Python interface will not be built if OpenMP is enabled.

! More details are provided in $NOMAD_HOME/interfaces/PyNomad/readme.txt

! Building requires to have Cython. Cython can be obtained with
Expand All @@ -151,8 +149,10 @@ cmake --build build/release (for *OSX* and *Linux*)

Option --parallel xx can be added for faster build.

The option --config Release should be used on *Windows* to build only
The option --config Release should be used on *Windows*
multi-configuration build environment (VisualStudio) to build only
Release configuration. The default configuration is Debug.
The same option should be used for *OSX* when using a *Xcode* project.

cmake --install build/release --config Release (for *Windows*)
or
Expand Down
10 changes: 5 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Next release

### v4.5 - Not before July 2024
### v4.6 - Not before July 2025

These are the features we consider for 4.5:
These are the features we consider for 4.6:

* Periodic variables

* COOP-Mads for parallel Mads optimization
* Paralel run of multiple algorithms

* Suggest and Observe paradigm without control on the evaluations

* Categorical variables
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "NOMAD Source"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 4.2"
PROJECT_NUMBER = "Version 4.5"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit 0f6d8ca

Please sign in to comment.