Skip to content

Commit 0f6d8ca

Browse files
authored
Merge pull request #189 from bbopt/develop
For release 4.5
2 parents f9fa3f5 + 718cf3f commit 0f6d8ca

File tree

620 files changed

+31045
-12012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

620 files changed

+31045
-12012
lines changed

.cirrus.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@ task:
22
matrix:
33
- name: FreeBSD -- gcc | g++
44
freebsd_instance:
5-
image: freebsd-13-3-release-amd64
5+
image: freebsd-14-0-release-amd64-ufs
66
env:
7-
cc: gcc12
8-
cxx: g++12
7+
cc: gcc13
8+
cxx: g++13
99
- name: FreeBSD -- clang | clang++
1010
freebsd_instance:
11-
image: freebsd-13-3-release-amd64
11+
image: freebsd-14-0-release-amd64-ufs
1212
env:
1313
cc: clang
1414
cxx: clang++
1515
- name: MacOS M1 -- gcc | g++
1616
macos_instance:
17-
image: ghcr.io/cirruslabs/macos-ventura-base:latest
17+
image: ghcr.io/cirruslabs/macos-runner:sonoma
1818
env:
1919
cc: gcc-14
2020
cxx: g++-14
2121
- name: MacOS M1 -- clang | clang++
2222
macos_instance:
23-
image: ghcr.io/cirruslabs/macos-ventura-base:latest
23+
image: ghcr.io/cirruslabs/macos-runner:sonoma
2424
env:
2525
cc: clang
2626
cxx: clang++
2727
dependencies_script: |
2828
echo $(uname)
2929
if [ "$(uname)" = "FreeBSD" ]; then
30-
pkg install -y cmake bash gcc12
30+
pkg install -y cmake bash gcc13
3131
else
32-
brew install cmake gcc@14
32+
brew install cmake gcc@12
3333
fi
3434
configure_script: |
3535
mkdir instdir
@@ -40,7 +40,6 @@ task:
4040
-DCMAKE_CXX_COMPILER=$cxx \
4141
-DTEST_OPENMP=OFF \
4242
-DBUILD_INTERFACE_C=ON \
43-
-DBUILD_TESTS=ON \
4443
-DCMAKE_INSTALL_PREFIX=../instdir \
4544
..
4645
build_script: |

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
cd interfaces/PyNomad
115115
pip install --force-reinstall dist/*.whl
116116
pytest
117-
117+
118118
- name: Prepare upload
119119
shell: bash
120120
run: |
@@ -124,7 +124,7 @@ jobs:
124124
tar -cf NOMAD4.tar *
125125
126126
- name: Upload
127-
uses: actions/upload-artifact@v3
127+
uses: actions/upload-artifact@v4
128128
with:
129129
name: ${{ matrix.config.os }}
130130
path: instdir/NOMAD4.tar

.github/workflows/pypi.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and publish binary wheels onto PyPi
1+
name: Build and publish binary wheels onto TestPyPi
22

33
on:
44
workflow_dispatch:
@@ -19,9 +19,15 @@ jobs:
1919
os: ubuntu-latest
2020
archs: x86_64
2121

22-
- name: macOS
22+
- name: macOS_X86
2323
os: macos-latest
2424
archs: x86_64
25+
extra_option: -DCMAKE_OSX_ARCHITECTURES=x86_64
26+
27+
- name: macOS_ARM
28+
os: macos-latest
29+
archs: arm64
30+
extra_option: -DCMAKE_OSX_ARCHITECTURES=arm64
2531

2632
name: Wheels for ${{ matrix.target.name }}
2733
runs-on: ${{ matrix.target.os }}
@@ -32,33 +38,37 @@ jobs:
3238
with:
3339
python-version: '3.12'
3440

41+
- name: Prepare Python environment
42+
run: >-
43+
pip install setuptools wheel cython==0.29.* pytest
44+
3545
- name: Install dependencies on Windows
36-
if: startsWith(matrix.config.name, 'Windows')
46+
if: startsWith(matrix.target.name, 'Windows')
3747
run: |
3848
choco install cmake
3949
cmake --version
4050
4151
- name: Install dependencies on Ubuntu
42-
if: startsWith(matrix.config.name, 'Ubuntu')
52+
if: startsWith(matrix.target.name, 'Ubuntu')
4353
run: |
4454
sudo apt-get update
4555
sudo apt-get install cmake
4656
cmake --version
4757
gcc --version
4858
4959
- name: Install dependencies on MacOS
50-
if: startsWith(matrix.config.name, 'MacOS')
60+
if: startsWith(matrix.target.name, 'macOS')
5161
run: |
5262
brew install cmake
5363
cmake --version
5464
5565
- name: Build binary wheels
56-
uses: pypa/cibuildwheel@v2.20.0
66+
uses: pypa/cibuildwheel@v2.16.5
5767
env:
5868
CIBW_ARCHS: >-
5969
${{ matrix.target.archs }}
6070
CIBW_BEFORE_ALL: >-
61-
cmake -DBUILD_INTERFACE_PYTHON=ON -DTEST_OPENMP=OFF -DBUILD_EXAMPLES=OFF -S . -B build &&
71+
cmake -DBUILD_INTERFACE_PYTHON=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release ${{ matrix.target.extra_option }} -S . -B build &&
6272
cmake --build build --config Release --clean-first --target nomadStatic --parallel 2
6373
CIBW_ENVIRONMENT: >-
6474
NOMAD_SRC=../../src
@@ -70,20 +80,23 @@ jobs:
7080
CIBW_BUILD_FRONTEND: >-
7181
build
7282
CIBW_BUILD_VERBOSITY: >-
73-
3
83+
2
84+
CIBW_SKIP: >-
85+
pp*
7486
with:
7587
output-dir: wheelhouse
7688
package-dir: interfaces/PyNomad
7789

7890
- name: Collect wheels for processing
7991
uses: actions/upload-artifact@v4
8092
with:
93+
name: binary-${{ matrix.target.name }}
8194
path: wheelhouse/*.whl
8295

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

8598
pypi-publish:
86-
name: Publish to PyPi
99+
name: Publish to PyPi (testing)
87100
runs-on: ubuntu-latest
88101
needs: build
89102
# Specifying a GitHub environment is optional, but strongly encouraged
@@ -96,8 +109,11 @@ jobs:
96109
- name: Collect wheels for publication
97110
uses: actions/download-artifact@v4
98111
with:
99-
name: artifact
112+
pattern: binary-*
113+
merge-multiple: true
100114
path: dist
101115

102116
- name: Publish wheels to PyPi
103117
uses: pypa/gh-action-pypi-publish@release/v1
118+
with:
119+
repository_url: https://pypi.org/legacy/

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ examples/**/*.exe
1313
examples/**/cache.txt
1414
src/nbproject/
1515
*.swp
16-
src/Attribute/*.hpp
1716
examples/**/history*
1817
examples/**/sol*
1918
examples/**/stats*

CMakeLists.txt

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ cmake_minimum_required(VERSION 3.15...3.15)
77

88
# Warning. This must be consistent with src/nomad_version.hpp
99
set(NOMAD_VERSION_MAJOR 4)
10-
set(NOMAD_VERSION_MINOR 4)
11-
set(NOMAD_VERSION_PATCH 0)
12-
set(NOMAD_VERSION ${NOMAD_VERSION_MAJOR}.${NOMAD_VERSION_MINOR}.${NOMAD_VERSION_PATCH})
10+
set(NOMAD_VERSION_MINOR 5)
11+
set(NOMAD_VERSION_PATCH 0)
1312

13+
set(NOMAD_VERSION ${NOMAD_VERSION_MAJOR}.${NOMAD_VERSION_MINOR}.${NOMAD_VERSION_PATCH})
1414

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

32-
# use standard compilers parameters for c++14
33-
SET(CMAKE_CXX_STANDARD 14 )
32+
# use standard compilers parameters for c++17
33+
SET(CMAKE_CXX_STANDARD 17 )
3434
SET(CMAKE_CXX_STANDARD_REQUIRED ON )
3535

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

4343
#check compiler version
4444
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
45-
# require at least gcc 4
45+
# require at least gcc 8
4646
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8)
4747
message(FATAL_ERROR "GCC version < 8 has not been tested for Nomad")
4848
endif()
@@ -53,7 +53,7 @@ elseif (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
5353
message(FATAL_ERROR "Clang version has not been tested for Nomad")
5454
endif()
5555
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
56-
# require at least 15.0 (MSVC 2017) for C++14 support
56+
# require at least 15.8 (MSVC 2017) for C++17 support
5757
if (MSVC_TOOLSET_VERSION VERSION_LESS 141)
5858
message(FATAL_ERROR "MSVC version ${CMAKE_CXX_COMPILER_VERSION} has not been tested for Nomad")
5959
endif()
@@ -72,9 +72,25 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7272
#
7373
# Message for starting configuration
7474
#
75-
message(CHECK_START " Configuring custom options")
75+
message(CHECK_START "Configuring custom options")
7676
list(APPEND CMAKE_MESSAGE_INDENT " ")
7777

78+
#
79+
# Modify the build type if not specified on the command
80+
#
81+
if (CMAKE_CONFIGURATION_TYPES)
82+
message(STATUS " Multi-configuration generator detected. Use the --config option during build to specify the build type (Release, Debug, ...).")
83+
else()
84+
if (NOT CMAKE_BUILD_TYPE)
85+
set(CMAKE_BUILD_TYPE "Release" CACHE PATH "..." FORCE)
86+
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.")
87+
else()
88+
message(STATUS " Build type is ${CMAKE_BUILD_TYPE}")
89+
endif()
90+
endif()
91+
92+
93+
7894
#
7995
# Modify the install prefix if not specified on the command
8096
#
@@ -83,6 +99,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
8399
endif()
84100
message(STATUS " Installation prefix set to ${CMAKE_INSTALL_PREFIX}")
85101

102+
86103
#
87104
# Choose to build with time stats enabled
88105
#
@@ -123,6 +140,7 @@ else()
123140
message(STATUS " Examples NOT built")
124141
endif()
125142

143+
126144
#
127145
# Choose to build the C interface
128146
#
@@ -140,15 +158,11 @@ endif()
140158
#
141159
option(BUILD_INTERFACE_PYTHON "Option to build Python interface to Nomad" OFF)
142160
if(BUILD_INTERFACE_PYTHON MATCHES ON)
143-
if(OpenMP_FOUND)
144-
message(STATUS " Warning: Cannot build Python interface with OpenMP enabled")
145-
else()
146-
set(Python3_FIND_VIRTUALENV "First")
147-
find_package(Python 3.6 QUIET REQUIRED)
161+
set(Python3_FIND_VIRTUALENV "First") # Using virtualenv to have cython and wheel is easy
162+
find_package(Python 3.8 QUIET REQUIRED)
148163
message(CHECK_START " Configuring build for Python interface (Python ${Python_VERSION})")
149164
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/interfaces/PyNomad)
150165
message(CHECK_PASS " done")
151-
endif()
152166
else()
153167
message(STATUS " Python interface to Nomad NOT built")
154168
endif()
@@ -240,14 +254,13 @@ else()
240254
message(STATUS " Sgtelib library will NOT be used\n")
241255
endif()
242256

243-
244-
245257
#
246258
# Custom options final message
247259
#
248260
list(REMOVE_ITEM CMAKE_MESSAGE_INDENT " ")
249261
message(CHECK_PASS " done")
250262

263+
251264
#
252265
# Add nomad app directory for building
253266
#

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Ludovic Salomon
1313
Renaud Saltet
1414
Jan Provaznik
1515
Tangi Migot
16+
Edward Hallé-Hannan

README.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,11 @@ cmake -S . -B build/release
126126
addpath(strcat(getenv('NOMAD_HOME'),'/build/release/bin'))
127127

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

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

134-
! The Python interface will not be built if OpenMP is enabled.
135-
136134
! More details are provided in $NOMAD_HOME/interfaces/PyNomad/readme.txt
137135

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

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

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

157157
cmake --install build/release --config Release (for *Windows*)
158158
or

ROADMAP.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Next release
22

3-
### v4.5 - Not before July 2024
3+
### v4.6 - Not before July 2025
44

5-
These are the features we consider for 4.5:
5+
These are the features we consider for 4.6:
66

7-
* Periodic variables
8-
9-
* COOP-Mads for parallel Mads optimization
7+
* Paralel run of multiple algorithms
108

119
* Suggest and Observe paradigm without control on the evaluations
10+
11+
* Categorical variables

doc/doxygen/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "NOMAD Source"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "Version 4.2"
41+
PROJECT_NUMBER = "Version 4.5"
4242

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

0 commit comments

Comments
 (0)