Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 6 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ task:
matrix:
- name: FreeBSD -- gcc | g++
freebsd_instance:
image: freebsd-13-1-release-amd64
image: freebsd-14-1-release-amd64
env:
cc: gcc12
cxx: g++12
cc: gcc14
cxx: g++14
- name: FreeBSD -- clang | clang++
freebsd_instance:
image: freebsd-13-1-release-amd64
image: freebsd-14-1-release-amd64
env:
cc: clang
cxx: clang++
- name: MacOS M1 -- gcc | g++
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
env:
cc: gcc-12
cxx: g++-12
cc: gcc-14
cxx: g++-14
- name: MacOS M1 -- clang | clang++
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
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
39 changes: 8 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
build_type: "Release", cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
# - {
# name: "Windows -- MinGW", artifact: "Windows-MinGW.tar.xz",
# os: windows-latest,
# build_type: "Release", cc: "x86_64-w64-mingw32-gcc", cxx: "x86_64-w64-mingw32-g++"
# }
- {
name: "Ubuntu", artifact: "Linux.tar.xz",
os: ubuntu-latest,
Expand All @@ -48,7 +43,7 @@ jobs:

- name: Prepare Python environment
run: >-
pip install setuptools wheel cython pytest
pip install setuptools wheel cython==0.29.* pytest

- name: Install dependencies on Windows
if: startsWith(matrix.config.name, 'Windows')
Expand Down Expand Up @@ -80,7 +75,6 @@ jobs:
cmake \
-DCMAKE_CC_COMPILER=${{matrix.config.cc}} \
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
-DBUILD_TESTS=ON \
-DBUILD_INTERFACE_C=ON \
-DBUILD_INTERFACE_PYTHON=ON \
-DTEST_OPENMP=OFF \
Expand All @@ -94,17 +88,8 @@ jobs:
mkdir instdir
mkdir build
cd build
if [[ "${{matrix.config.name}}" == "Windows -- MinGW" ]]; then
cmake -G "MinGW Makefiles" \
-DTEST_OPENMP=OFF \
-DBUILD_INTERFACE_C=ON \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_INSTALL_PREFIX=../instdir \
..
else
cmake .. -DTEST_OPENMP=OFF -DBUILD_INTERFACE_C=ON -DBUILD_INTERFACE_PYTHON=ON -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=../instdir
fi

cmake .. -DTEST_OPENMP=OFF -DBUILD_INTERFACE_C=ON -DBUILD_INTERFACE_PYTHON=ON -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=../instdir

- name: Build
shell: bash
run: |
Expand All @@ -130,16 +115,8 @@ jobs:
pip install --force-reinstall dist/*.whl
pytest

- name: Prepare upload
shell: bash
run: |
mv README.txt instdir/.
mv LICENSE instdir/.
cd instdir
tar -cf NOMAD4.tar *

- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.os }}
path: instdir/NOMAD4.tar
# - name: Upload
# uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.config.os }}
# path: build
34 changes: 25 additions & 9 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,6 +38,10 @@ jobs:
with:
python-version: '3.8'

- name: Prepare Python environment
run: >-
pip install setuptools wheel cython==0.29.* pytest

- name: Install dependencies on Windows
if: startsWith(matrix.config.name, 'Windows')
run: |
Expand All @@ -53,12 +63,12 @@ jobs:
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 -DTEST_OPENMP=OFF -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,24 +80,27 @@ 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 TestPyPi (testing)
runs-on: ubuntu-latest
needs: build
# Specifying a GitHub environment is optional, but strongly encouraged
environment: master
environment: develop
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
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
- name: Publish wheels to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
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 beta1) # The beta version betaX is for develop branch of the public repo.

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
8 changes: 3 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## 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
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
Loading