Skip to content

Commit 4cfbad9

Browse files
committed
Merge remote-tracking branch 'origin'
2 parents 27d7358 + 5618aba commit 4cfbad9

43 files changed

Lines changed: 4333 additions & 3204 deletions

Some content is hidden

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

.github/workflows/ci-devenv.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pestpp development environment continuous integration
1+
name: development environment continuous integration
22

33
on:
44
schedule:
@@ -10,31 +10,32 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
1413
pestpp-devenv:
15-
name: pest++ developer environment
14+
name: developer environment
1615
runs-on: ${{ matrix.os }}
1716
strategy:
1817
fail-fast: false
1918
matrix:
2019
include:
2120
#- {os: macos-latest, shell: bash}
22-
- {os: macos-13, shell: bash}
21+
- {os: macos-14, shell: bash}
2322
- {os: ubuntu-latest, shell: bash}
2423
- {os: ubuntu-22.04, shell: bash}
25-
- {os: windows-latest, shell: bash}
24+
- {os: windows-2022, shell: bash}
2625
defaults:
2726
run:
2827
shell: ${{ matrix.shell }}
2928

3029
steps:
31-
- name: Checkout repo
32-
uses: actions/checkout@v5
30+
- uses: actions/checkout@v5
3331

34-
- name: Setup pixi
35-
uses: prefix-dev/setup-pixi@v0.9.1
32+
- name: Set Windows ENV
33+
if: runner.os == 'Windows'
34+
uses: ilammy/msvc-dev-cmd@v1
35+
36+
- uses: prefix-dev/setup-pixi@v0.9.2
3637
with:
37-
pixi-version: v0.42.1
38+
pixi-version: v0.58.0
3839
manifest-path: "pixi.toml"
3940

4041
# - name: Install modflow
@@ -43,22 +44,21 @@ jobs:
4344
# run: |
4445
# pixi run install-modflow
4546

46-
- name: Build pestpp
47-
run: |
48-
pixi run build-release
47+
- name: Build release
48+
run: pixi run build-release
4949

5050
# - name: Test pestpp
5151
# run: |
5252
# pixi run test
5353

5454
- name: Upload binaries
55-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v5
5656
with:
5757
name: binaries-${{ matrix.os }}
5858
path: bin
5959

6060
- name: Upload test results
61-
uses: actions/upload-artifact@v4
61+
uses: actions/upload-artifact@v5
6262
with:
6363
name: test-results-${{ matrix.os }}
64-
path: benchmarks/large_fake_test/master
64+
path: benchmarks/large_fake_test/master

.github/workflows/ci.yml

Lines changed: 55 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pestpp continuous integration
1+
name: continuous integration
22

33
on:
44
schedule:
@@ -16,8 +16,8 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
os: [windows-latest, ubuntu-latest]
20-
python-version: [3.10] # , 3.7, 3.6]
19+
os: [windows-latest, ubuntu-latest]
20+
# python-version: ["3.10"] # , 3.7, 3.6]
2121
run-type: [std]
2222
# test_repo: [""]
2323
# test_dir: [""]
@@ -48,26 +48,20 @@ jobs:
4848
env: ${{ matrix.env }}
4949

5050
steps:
51+
- uses: actions/checkout@v5
5152

52-
- uses: actions/checkout@v5
53-
# - name: Setup Ninja
54-
# if: ${{ runner.os == 'Windows' }}
55-
- uses: seanmiddleditch/gha-setup-ninja@master
56-
5753
# - name: Cache Miniconda
5854
# uses: actions/cache@v2.1.0
5955
# env:
6056
# # Increase this value to reset cache if environment.yml has changed
6157
# CACHE_NUMBER: 0
6258
# with:
6359
# path: ~/conda_pkgs_dir
64-
# key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('etc/environment.yml') }}
65-
66-
- name: Set Windows ENV
67-
if: runner.os == 'Windows'
68-
uses: ilammy/msvc-dev-cmd@v1
60+
# key: ${{ runner.os }}-${{ matrix.run-type }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('etc/environment.yml') }}
6961

70-
62+
- name: Set Windows ENV
63+
if: runner.os == 'Windows'
64+
uses: ilammy/msvc-dev-cmd@v1
7165

7266
# Standard python fails on windows without GDAL installation
7367
# Using custom bash shell ("shell: bash -l {0}") with Miniconda
@@ -92,12 +86,11 @@ jobs:
9286
# # environment-file: etc/environment.yml
9387
# # use-only-tar-bz2: true
9488

95-
- name: setup micromamba
96-
uses: mamba-org/setup-micromamba@v2
97-
with:
98-
environment-file: etc/environment.yml
99-
cache-environment: false
100-
post-cleanup: 'all'
89+
- uses: mamba-org/setup-micromamba@v2
90+
with:
91+
environment-file: etc/environment.yml
92+
cache-environment: false
93+
post-cleanup: 'all'
10194

10295
# - name: Add packages to pyemu environment using mamba or conda
10396
# shell: bash -l {0}
@@ -139,52 +132,49 @@ jobs:
139132
# if: ${{ runner.os == 'Windows' }}
140133
# uses: lukka/get-cmake@latest
141134

142-
- name: clone test repo ${{ env.test_repo }}
143-
shell: bash -l {0}
144-
run: |
145-
git clone ${{ env.test_repo }}
135+
- name: clone test repo ${{ env.test_repo }}
136+
shell: bash -l {0}
137+
run: |
138+
git clone ${{ env.test_repo }}
146139
147-
- name: PESTPP exe install
148-
shell: bash -l {0}
149-
run: |
150-
mkdir build && cd build
151-
if [[ "$RUNNER_OS" == "Windows" ]]; then
152-
cmake -GNinja -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ..
153-
ninja
154-
else
155-
cmake -DCMAKE_BUILD_TYPE=Release ..
156-
make -j2
157-
fi
158-
cd ..
140+
- name: PESTPP exe install
141+
shell: bash -l {0}
142+
run: |
143+
mkdir build && cd build
144+
if [[ "$RUNNER_OS" == "Windows" ]]; then
145+
cmake -GNinja -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ..
146+
ninja
147+
else
148+
cmake -DCMAKE_BUILD_TYPE=Release ..
149+
make -j2
150+
fi
151+
cd ..
159152
160-
161-
- name: aux bin path hackery
162-
shell: bash -l {0}
163-
run: |
164-
cp -r benchmarks/test_bin/win $HOME/bin
165-
echo "../../test_bin/win" >> $GITHUB_PATH
166-
if [[ "$RUNNER_OS" == "Windows" ]]; then
167-
cp -r benchmarks/test_bin/win $HOME/bin
168-
echo "../../test_bin/win" >> $GITHUB_PATH
169-
else
170-
echo "../../test_bin/linux" >> $GITHUB_PATH
171-
cp -r benchmarks/test_bin/win $HOME/bin
172-
fi
173-
echo "$HOME/.local/bin" >> $GITHUB_PATH
153+
- name: aux bin path hackery
154+
shell: bash -l {0}
155+
run: |
156+
cp -r benchmarks/test_bin/win $HOME/bin
157+
echo "../../test_bin/win" >> $GITHUB_PATH
158+
if [[ "$RUNNER_OS" == "Windows" ]]; then
159+
cp -r benchmarks/test_bin/win $HOME/bin
160+
echo "../../test_bin/win" >> $GITHUB_PATH
161+
else
162+
echo "../../test_bin/linux" >> $GITHUB_PATH
163+
cp -r benchmarks/test_bin/win $HOME/bin
164+
fi
165+
echo "$HOME/.local/bin" >> $GITHUB_PATH
174166
175-
- name: run test script ${{ env.test_script }} in ${{ env.test_dir }}
176-
shell: bash -l {0}
177-
run: |
178-
179-
ls -l
180-
cd ${{ env.test_dir }}
181-
nosetests -v ${{ env.test_script }}
182-
status=$?
183-
echo $status
167+
- name: run test script ${{ env.test_script }} in ${{ env.test_dir }}
168+
shell: bash -l {0}
169+
run: |
170+
ls -l
171+
cd ${{ env.test_dir }}
172+
nosetests -v ${{ env.test_script }}
173+
status=$?
174+
echo $status
184175
185-
if [ $status -eq 0 ]; then
186-
exit 0
187-
else
188-
exit 127
189-
fi
190-
176+
if [ $status -eq 0 ]; then
177+
exit 0
178+
else
179+
exit 127
180+
fi

.github/workflows/release.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
22+
os: [ubuntu-22.04, macos-14, windows-2022]
2323
defaults:
2424
run:
2525
shell: bash -l {0}
2626
steps:
27-
- name: Checkout pest++
28-
uses: actions/checkout@v5
27+
- uses: actions/checkout@v5
2928
with:
3029
repository: usgs/pestpp
3130
ref: ${{ inputs.branch }}
3231

33-
- name: Setup pixi
34-
uses: prefix-dev/setup-pixi@v0.9.1
32+
- uses: prefix-dev/setup-pixi@v0.9.2
3533
with:
3634
pixi-version: v0.41.4
3735

@@ -45,11 +43,7 @@ jobs:
4543
if [[ $RUNNER_OS == "Linux" ]]; then
4644
ostag="linux"
4745
elif [[ $RUNNER_OS == "macOS" ]]; then
48-
if [[ ${{ matrix.os }} == "macos-13" ]]; then
49-
ostag="macintel"
50-
elif [[ ${{ matrix.os }} == "macos-14" ]]; then
51-
ostag="mac"
52-
fi
46+
ostag="mac"
5347
elif [[ $RUNNER_OS == "Windows" ]]; then
5448
ostag="win"
5549
fi
@@ -67,7 +61,7 @@ jobs:
6761
rm -r $path/*/ || true
6862
6963
- name: Upload distribution
70-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@v5
7165
with:
7266
name: pestpp-${{ inputs.version }}-${{ steps.ostag.outputs.ostag }}
7367
path: pestpp-${{ inputs.version }}-${{ steps.ostag.outputs.ostag }}

CMakeLists.txt

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# This is the top-level CMake file for PEST++
2-
cmake_minimum_required(VERSION 3.9)
2+
cmake_minimum_required(VERSION 3.15)
3+
4+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
5+
add_compile_definitions(_DEBUG)
6+
endif()
37

48
# Get PESTPP_VERSION from common source header
59
file(READ "${CMAKE_SOURCE_DIR}/src/libs/common/config_os.h" _file)
@@ -13,43 +17,22 @@ endif()
1317
message(STATUS
1418
"Configuring CMake ${CMAKE_VERSION} to build PESTPP ${PESTPP_VERSION}")
1519

16-
# This logic needs to be considered before project()
17-
set(_change_MSVC_flags FALSE)
1820
if(WIN32)
19-
if(CMAKE_VERSION VERSION_LESS 3.15.0)
20-
set(_change_MSVC_flags TRUE)
21-
else()
22-
# Set MSVC runtime to MultiThreaded (/MT)
23-
cmake_policy(SET CMP0091 NEW)
24-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
25-
endif()
21+
# Set MSVC runtime to MultiThreaded (/MT)
22+
cmake_policy(SET CMP0091 NEW)
23+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
2624
endif()
2725

2826
project(PESTPP
2927
VERSION ${PESTPP_VERSION}
28+
HOMEPAGE_URL "https://github.com/usgs/pestpp/"
3029
LANGUAGES CXX)
3130

3231
# Prevent running cmake in source dir
3332
if("${PESTPP_SOURCE_DIR}" STREQUAL "${PESTPP_BINARY_DIR}")
3433
message(SEND_ERROR "In-source builds are not allowed")
3534
endif()
3635

37-
if(_change_MSVC_flags)
38-
# Modify compile flags to change MSVC runtime from /MD to /MT
39-
set(_re_match "([\\/\\-]M)D")
40-
set(_re_replace "\\1T")
41-
string(REGEX REPLACE ${_re_match} ${_re_replace}
42-
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
43-
string(REGEX REPLACE ${_re_match} ${_re_replace}
44-
CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
45-
string(REGEX REPLACE ${_re_match} ${_re_replace}
46-
CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
47-
string(REGEX REPLACE ${_re_match} ${_re_replace}
48-
CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
49-
string(REGEX REPLACE ${_re_match} ${_re_replace}
50-
CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
51-
endif()
52-
5336
# Fortran is not required (anymore), but can be enabled using either:
5437
# 1. ENABLE_Fortran=ON and use whatever default compiler is available
5538
# 2. CMAKE_Fortran_COMPILER=ifort (or other compiler)
@@ -84,6 +67,7 @@ message(STATUS "CMAKE_THREAD_LIBS_INIT=${CMAKE_THREAD_LIBS_INIT}")
8467
set(CMAKE_CXX_STANDARD 11)
8568
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8669
set(CMAKE_CXX_EXTENSIONS OFF)
70+
set(CMAKE_TRY_COMPILE_TARGET_TYPE)
8771

8872
add_compile_definitions(_HAS_STD_BYTE=0)
8973

benchmarks/basic_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,7 @@ def parse_pst_test():
21242124
pyemu.os_utils.run("{0} control.pst".format(exe_path),cwd=t_d)
21252125

21262126

2127+
21272128
if __name__ == "__main__":
21282129
#parse_pst_test()
21292130
#basic_test()

benchmarks/glm_test_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -945,16 +945,16 @@ def tenpar_xsec_stress_test_5super():
945945
#tenpar_superpar_restart_test()
946946
#freyberg_basic_restart_test()
947947
# jac_diff_invest()
948-
#new_fmt_load_test()
948+
new_fmt_load_test()
949949
#tenpar_hotstart_test()
950950
#tenpar_normalform_test()
951951
#freyberg_stress_test()
952952
#shutil.copy2(os.path.join("..","exe","windows","x64","Debug","pestpp-glm.exe"),os.path.join("..","bin","win","pestpp-glm.exe"))
953953
#tenpar_xsec_stress_test_2()
954954
#tenpar_xsec_stress_test_3()
955-
tenpar_xsec_stress_test_5super()
955+
#tenpar_xsec_stress_test_5super()
956956

957-
tenpar_xsec_stress_test_5()
957+
#tenpar_xsec_stress_test_5()
958958

959959

960960

0 commit comments

Comments
 (0)