Skip to content

Commit d146800

Browse files
authored
Move tutorials (#1876)
1 parent 384ca23 commit d146800

File tree

582 files changed

+150
-23890
lines changed

Some content is hidden

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

582 files changed

+150
-23890
lines changed

.github/workflows/linux.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
export PATH=/tmp/my-amrex/bin:$PATH
5959
which fcompare
6060
61-
# Build libamrex and all tutorials
62-
tutorials:
63-
name: [email protected] C++14 [tutorials]
61+
# Build libamrex and all tests
62+
tests_build:
63+
name: [email protected] C++14 [tests]
6464
runs-on: ubuntu-18.04
6565
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
6666
steps:
@@ -74,13 +74,13 @@ jobs:
7474
cmake .. \
7575
-DCMAKE_BUILD_TYPE=Debug \
7676
-DCMAKE_VERBOSE_MAKEFILE=ON \
77-
-DAMReX_BUILD_TUTORIALS=ON \
77+
-DAMReX_ENABLE_TESTS=ON \
7878
-DAMReX_PARTICLES=ON
7979
make -j 2
8080
81-
# Build libamrex and all tutorials
82-
tutorials_cxx20:
83-
name: [email protected] C++20 OMP [tutorials]
81+
# Build libamrex and all tests
82+
tests_cxx20:
83+
name: [email protected] C++20 OMP [tests]
8484
runs-on: ubuntu-18.04
8585
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
8686
steps:
@@ -94,7 +94,7 @@ jobs:
9494
cmake .. \
9595
-DCMAKE_BUILD_TYPE=Debug \
9696
-DCMAKE_VERBOSE_MAKEFILE=ON \
97-
-DAMReX_BUILD_TUTORIALS=ON \
97+
-DAMReX_ENABLE_TESTS=ON \
9898
-DAMReX_OMP=ON \
9999
-DAMReX_PARTICLES=ON \
100100
-DCMAKE_CXX_STANDARD=20 \
@@ -103,8 +103,8 @@ jobs:
103103
-DCMAKE_Fortran_COMPILER=$(which gfortran-10)
104104
make -j 2
105105
106-
tutorials_clang:
107-
name: [email protected] C++14 SP Particles DP Mesh Debug [tutorials]
106+
tests_clang:
107+
name: [email protected] C++14 SP Particles DP Mesh Debug [tests]
108108
runs-on: ubuntu-18.04
109109
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"}
110110
steps:
@@ -118,7 +118,7 @@ jobs:
118118
cmake .. \
119119
-DCMAKE_BUILD_TYPE=Debug \
120120
-DCMAKE_VERBOSE_MAKEFILE=ON \
121-
-DAMReX_BUILD_TUTORIALS=ON \
121+
-DAMReX_ENABLE_TESTS=ON \
122122
-DAMReX_MPI=OFF \
123123
-DAMReX_PARTICLES=ON \
124124
-DAMReX_PRECISION=DOUBLE \
@@ -129,9 +129,9 @@ jobs:
129129
-DCMAKE_Fortran_COMPILER=$(which gfortran)
130130
make -j 2
131131
132-
# Build libamrex and all tutorials w/o MPI
133-
tutorials-nonmpi:
134-
name: [email protected] C++14 NOMPI [tutorials]
132+
# Build libamrex and all tests w/o MPI
133+
tests-nonmpi:
134+
name: [email protected] C++14 NOMPI [tests]
135135
runs-on: ubuntu-18.04
136136
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
137137
steps:
@@ -145,14 +145,14 @@ jobs:
145145
cmake .. \
146146
-DCMAKE_BUILD_TYPE=Debug \
147147
-DCMAKE_VERBOSE_MAKEFILE=ON \
148-
-DAMReX_BUILD_TUTORIALS=ON \
148+
-DAMReX_ENABLE_TESTS=ON \
149149
-DAMReX_MPI=OFF \
150150
-DAMReX_PARTICLES=ON
151151
make -j 2
152152
153-
# Build libamrex and all tutorials
154-
tutorials-nofortran:
155-
name: [email protected] C++14 w/o Fortran [tutorials]
153+
# Build libamrex and all tests
154+
tests-nofortran:
155+
name: [email protected] C++14 w/o Fortran [tests]
156156
runs-on: ubuntu-18.04
157157
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
158158
steps:
@@ -166,14 +166,14 @@ jobs:
166166
cmake .. \
167167
-DCMAKE_BUILD_TYPE=Debug \
168168
-DCMAKE_VERBOSE_MAKEFILE=ON \
169-
-DAMReX_BUILD_TUTORIALS=ON \
169+
-DAMReX_ENABLE_TESTS=ON \
170170
-DAMReX_PARTICLES=ON \
171171
-DAMReX_FORTRAN=OFF
172172
make -j 2
173173
174-
# Build libamrex and all tutorials with CUDA 9.2
175-
tutorials-cuda9:
176-
name: [email protected] [email protected] C++14 Release [tutorials]
174+
# Build libamrex and all tests with CUDA 9.2
175+
tests-cuda9:
176+
name: [email protected] [email protected] C++14 Release [tests]
177177
runs-on: ubuntu-18.04
178178
env: {CXXFLAGS: "-fno-operator-names"}
179179
steps:
@@ -189,7 +189,7 @@ jobs:
189189
cd build
190190
cmake .. \
191191
-DCMAKE_VERBOSE_MAKEFILE=ON \
192-
-DAMReX_BUILD_TUTORIALS=ON \
192+
-DAMReX_ENABLE_TESTS=ON \
193193
-DAMReX_PARTICLES=ON \
194194
-DAMReX_GPU_BACKEND=CUDA \
195195
-DCMAKE_C_COMPILER=$(which gcc-6) \
@@ -200,9 +200,9 @@ jobs:
200200
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON
201201
make -j 2
202202
203-
# Build libamrex and all tutorials with CUDA 11.0.2 (recent supported)
204-
tutorials-cuda11:
205-
name: [email protected] [email protected] C++17 Release [tutorials]
203+
# Build libamrex and all tests with CUDA 11.0.2 (recent supported)
204+
tests-cuda11:
205+
name: [email protected] [email protected] C++17 Release [tests]
206206
runs-on: ubuntu-20.04
207207
env: {CXXFLAGS: "-fno-operator-names"}
208208
steps:
@@ -217,7 +217,7 @@ jobs:
217217
218218
cmake -S . -B build \
219219
-DCMAKE_VERBOSE_MAKEFILE=ON \
220-
-DAMReX_BUILD_TUTORIALS=ON \
220+
-DAMReX_ENABLE_TESTS=ON \
221221
-DAMReX_PARTICLES=ON \
222222
-DAMReX_GPU_BACKEND=CUDA \
223223
-DCMAKE_C_COMPILER=$(which gcc) \
@@ -232,8 +232,8 @@ jobs:
232232
233233
cmake --build build -j 2
234234
235-
tutorials-dpcpp:
236-
name: DPCPP [email protected] C++17 [tutorials]
235+
tests-dpcpp:
236+
name: DPCPP [email protected] C++17 [tests]
237237
runs-on: ubuntu-20.04
238238
env: {CXXFLAGS: "-fno-operator-names"}
239239
steps:
@@ -250,7 +250,7 @@ jobs:
250250
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
251251
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT="17" \
252252
-DCMAKE_VERBOSE_MAKEFILE=ON \
253-
-DAMReX_BUILD_TUTORIALS=ON \
253+
-DAMReX_ENABLE_TESTS=ON \
254254
-DAMReX_PARTICLES=ON \
255255
-DAMReX_GPU_BACKEND=SYCL \
256256
-DCMAKE_C_COMPILER=$(which clang) \
@@ -261,8 +261,8 @@ jobs:
261261
# the 2021.1 DPC++ release / CMake 3.19.0-3.19.1
262262
# https://gitlab.kitware.com/cmake/cmake/-/issues/21551#note_869580
263263

264-
tutorials-hip:
265-
name: HIP [email protected] [email protected] C++17 [tutorials]
264+
tests-hip:
265+
name: HIP [email protected] [email protected] C++17 [tests]
266266
runs-on: ubuntu-20.04
267267
env: {CXXFLAGS: "-fno-operator-names"}
268268
steps:
@@ -277,7 +277,7 @@ jobs:
277277
cd build
278278
cmake .. \
279279
-DCMAKE_VERBOSE_MAKEFILE=ON \
280-
-DAMReX_BUILD_TUTORIALS=ON \
280+
-DAMReX_ENABLE_TESTS=ON \
281281
-DAMReX_PARTICLES=ON \
282282
-DAMReX_FORTRAN=ON \
283283
-DAMReX_LINEAR_SOLVERS=ON \
@@ -387,7 +387,7 @@ jobs:
387387
make -j2 USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS=-fno-operator-names
388388
389389
# Build libamrex and run all tests
390-
tests:
390+
tests_run:
391391
name: [email protected] C++14 [tests]
392392
runs-on: ubuntu-18.04
393393
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}

.github/workflows/macos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ env:
66
CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"
77

88
jobs:
9-
# Build libamrex and all tutorials
10-
tutorials-macos:
11-
9+
# Build libamrex and all tests
10+
tests-macos:
11+
1212
runs-on: macos-latest
1313
steps:
1414
- uses: actions/checkout@v2
@@ -20,15 +20,15 @@ jobs:
2020
-DBUILD_SHARED_LIBS=ON \
2121
-DCMAKE_BUILD_TYPE=Debug \
2222
-DCMAKE_VERBOSE_MAKEFILE=ON \
23-
-DAMReX_BUILD_TUTORIALS=ON \
23+
-DAMReX_ENABLE_TESTS=ON \
2424
-DAMReX_PARTICLES=ON \
2525
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)
2626
cmake --build build --parallel 2
2727
2828
cmake -S . -B build \
2929
-DCMAKE_BUILD_TYPE=Debug \
3030
-DCMAKE_VERBOSE_MAKEFILE=ON \
31-
-DAMReX_BUILD_TUTORIALS=ON \
31+
-DAMReX_ENABLE_TESTS=ON \
3232
-DAMReX_PARTICLES=ON \
3333
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)
3434
cmake --build build --parallel 2

.github/workflows/windows.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: windows
33
on: [push, pull_request]
44

55
jobs:
6-
# Build libamrex and all tutorials
7-
tutorials_msvc:
6+
# Build libamrex and all tests
7+
tests_msvc:
88
name: MSVC C++17 w/o Fortran w/o MPI
99
runs-on: windows-latest
1010
steps:
@@ -15,14 +15,14 @@ jobs:
1515
-DCMAKE_BUILD_TYPE=Debug `
1616
-DBUILD_SHARED_LIBS=ON `
1717
-DCMAKE_VERBOSE_MAKEFILE=ON `
18-
-DAMReX_BUILD_TUTORIALS=ON `
18+
-DAMReX_ENABLE_TESTS=ON `
1919
-DAMReX_FORTRAN=OFF `
2020
-DAMReX_MPI=OFF `
2121
-DAMReX_PARTICLES=ON
2222
cmake --build build --config Debug -j 2
2323
24-
# Build libamrex and all tutorials (static)
25-
tutorials_msvc_static:
24+
# Build libamrex and all test (static)
25+
test_msvc_static:
2626
name: MSVC C++17 w/o Fortran w/o MPI static
2727
runs-on: windows-latest
2828
steps:
@@ -32,14 +32,14 @@ jobs:
3232
cmake -S . -B build `
3333
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
3434
-DCMAKE_VERBOSE_MAKEFILE=ON `
35-
-DAMReX_BUILD_TUTORIALS=ON `
35+
-DAMReX_ENABLE_TESTS=ON `
3636
-DAMReX_FORTRAN=OFF `
3737
-DAMReX_MPI=OFF `
3838
-DAMReX_PARTICLES=ON
3939
cmake --build build --config RelWithDebInfo -j 2
4040
41-
# Build libamrex and all tutorials
42-
tutorials_clang:
41+
# Build libamrex and all tests
42+
tests_clang:
4343
name: Clang C++17 w/o Fortran w/o MPI
4444
runs-on: windows-latest
4545
steps:
@@ -54,7 +54,7 @@ jobs:
5454
-DCMAKE_BUILD_TYPE=Release ^
5555
-DBUILD_SHARED_LIBS=ON ^
5656
-DCMAKE_VERBOSE_MAKEFILE=ON ^
57-
-DAMReX_BUILD_TUTORIALS=ON ^
57+
-DAMReX_ENABLE_TESTS=ON ^
5858
-DAMReX_FORTRAN=OFF ^
5959
-DAMReX_MPI=OFF ^
6060
-DAMReX_OMP=ON ^

CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@ get_property(_amrex_targets
114114
DIRECTORY Src
115115
PROPERTY BUILDSYSTEM_TARGETS)
116116

117-
#
118-
# Tutorials and "test_install" target
119-
#
120-
option(AMReX_BUILD_TUTORIALS "Build tutorials" NO)
121-
122-
if (AMReX_BUILD_TUTORIALS)
123-
message(STATUS "Enabling Tutorials")
124-
add_subdirectory(Tutorials)
125-
endif ()
126-
127117
#
128118
# Plotfile tools
129119
#

Docs/sphinx_documentation/source/BuildingAMReX.rst

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,6 @@ The list of available options is reported in the :ref:`table <tab:cmakevar>` bel
487487
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
488488
| AMReX_PLOTFILE_TOOLS | Build and install plotfile postprocessing tools| NO | YES, NO |
489489
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
490-
| AMReX_BUILD_TUTORIALS | Build tutorials | NO | YES, NO |
491-
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
492490
| AMReX_ENABLE_TESTS | Enable CTest suite | NO | YES, NO |
493491
+------------------------------+-------------------------------------------------+-------------------------+-----------------------+
494492
| AMReX_DIFFERENT_COMPILER | Allow an app to use a different compiler | NO | YES, NO |
@@ -519,38 +517,6 @@ are defined, AMReX default flags are used.
519517

520518
For a detailed explanation of GPU support in AMReX CMake, refer to section :ref:`sec:gpu:build`.
521519

522-
523-
Building Tutorials
524-
------------------
525-
526-
In order to build the tutorials provided in ``Tutorials/`` alongside the AMReX library,
527-
follows these steps:
528-
529-
.. highlight:: console
530-
531-
::
532-
533-
mkdir /path/to/builddir
534-
cd /path/to/builddir
535-
cmake [options] -DAMReX_BUILD_TUTORIALS=YES /path/to/amrex
536-
make
537-
538-
539-
Note that only the tutorials compatible with ``[options]`` will be built.
540-
To run one of the tutorials, do:
541-
542-
.. highlight:: console
543-
544-
::
545-
546-
cd /path/to/builddir/Tutorials/group/name
547-
./Tutorial_group_name [input_file]
548-
549-
550-
``[input_file]`` is any of the input files required by the tutorials and located in
551-
``/path/to/builddir/Tutorials/group/name/``
552-
553-
554520
CMake and macOS
555521
---------------
556522

Src/Base/AMReX_FabArrayBase.H

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ public:
292292
};
293293

294294
//! Default tilesize in MFIter
295-
static IntVect mfiter_tile_size;
295+
static AMREX_EXPORT IntVect mfiter_tile_size;
296296

297297
//! Default tilesize in MFGhostIter
298-
static IntVect mfghostiter_tile_size;
298+
static AMREX_EXPORT IntVect mfghostiter_tile_size;
299299

300300
//! The maximum number of components to copy() at a time.
301-
static int MaxComp;
301+
static AMREX_EXPORT int MaxComp;
302302

303303
//! Initialize from ParmParse with "fabarray" prefix.
304304
static void Initialize ();
@@ -308,7 +308,7 @@ public:
308308
* intersections among boxes into smaller tiles. This sets
309309
* their maximum size.
310310
*/
311-
static IntVect comm_tile_size; //!< communication tile size
311+
static AMREX_EXPORT IntVect comm_tile_size; //!< communication tile size
312312

313313
struct FPinfo
314314
{
@@ -422,7 +422,7 @@ public:
422422
static void pushRegionTag (std::string t);
423423
static void popRegionTag ();
424424

425-
static std::vector<std::string> m_region_tag;
425+
static AMREX_EXPORT std::vector<std::string> m_region_tag;
426426
struct RegionTag {
427427
RegionTag (const char* t) { pushRegionTag(t); }
428428
RegionTag (std::string t) { pushRegionTag(std::move(t)); }
@@ -687,7 +687,7 @@ public:
687687
<< " max # of BoxArray uses: " << max_num_ba_use << "\n";
688688
}
689689
};
690-
static FabArrayStats m_FA_stats;
690+
static AMREX_EXPORT FabArrayStats m_FA_stats;
691691

692692
};
693693

Src/Base/AMReX_NFiles.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class NFilesIter
233233

234234
static const int indexUndefined = -1;
235235

236-
static int minDigits; //!< for Concatenate
236+
static AMREX_EXPORT int minDigits; //!< for Concatenate
237237

238238
NFilesIter(); //!< disallow
239239
};

0 commit comments

Comments
 (0)