You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message(STATUS"Default ${CMAKE_BUILD_TYPE} flags are `${DEFAULT_${BUILD_TYPE}_FLAGS}`, set ${BUILD_TYPE}_FLAGS to override (CXX_EXTRA_* flags are not affected)")
Copy file name to clipboardexpand all lines: README.md
+75-26
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,84 @@ Increasing the iteration count has similar performance effects to docking multip
8
8
9
9
The top-level `data` directory contains the input common to implementations.
10
10
The top-level `makedeck` directory contains an input deck generation program and a set of mol2/bhff input files.
11
-
Each other subdirectory contains a separate C/C++ implementation:
12
-
13
-
-[OpenMP](openmp/) for CPUs
14
-
-[OpenMP target](openmp-target/) for GPUs
15
-
-[CUDA](cuda/) for GPUs
16
-
-[OpenCL](opencl/) for GPUs
17
-
-[OpenACC](openacc/) for GPUs
18
-
-[SYCL](sycl/) for CPUs and GPUs
19
-
-[Kokkos](kokkos/) for CPUs and GPUs
20
-
21
-
We also include implementations in emerging programming languages as direct ports of miniBUDE:
22
-
23
-
-[Julia](miniBUDE.jl) for CPUs (@threads) and GPUs ([CUDA.jl](https://juliagpu.gitlab.io/CUDA.jl/), [AMDGPU.jl](https://amdgpu.juliagpu.org/stable/), [oneAPI.jl](https://github.com/JuliaGPU/oneAPI.jl), etc)
24
-
11
+
Each other subdirectory in `src` contains a separate C/C++ implementation.
25
12
26
13
## Building
27
14
28
-
To build with the default options, type `make` in an implementation directory.
29
-
There are options to choose the compiler used and the architecture targeted.
30
-
31
-
Refer to each implementation's README for further build instructions.
32
-
33
-
## Running
34
-
35
-
To run with the default options, run the binary without any flags.
36
-
To adjust the run time, use `-i` to set the number of iterations.
37
-
For very short runs, e.g. for simulation, use `-n 1024` to reduce the number of poses.
38
-
39
-
Refer to each implementation's README for further run instructions.
15
+
Drivers, compiler and software applicable to whichever implementation you would like to build against is required.
16
+
17
+
### CMake
18
+
19
+
The project supports building with CMake >= 3.14.0, which can be installed without root via the [official script](https://cmake.org/download/).
20
+
21
+
Each miniBUDE implementation (programming model) is built as follows:
22
+
23
+
```shell
24
+
$ cd miniBUDE
25
+
26
+
# configure the build, build type defaults to Release
27
+
# The -DMODEL flag is required
28
+
$ cmake -Bbuild -H. -DMODEL=<model><model specific flags prefixed with -D...>
29
+
30
+
# compile
31
+
$ cmake --build build
32
+
33
+
# run executables in ./build
34
+
$ ./build/<model>-bude
35
+
```
36
+
37
+
The `MODEL` option selects one implementation of miniBUDE to build.
38
+
The source for each model's implementations are located in `./src/<model>`.
By default, we have defined a set of optimal flags for known HPC compilers.
47
+
There are assigned those to `RELEASE_FLAGS`, and you can override them if required.
48
+
49
+
To find out what flag each model supports or requires, simply configure while only specifying the model.
50
+
For example:
51
+
```shell
52
+
>cd miniBUDE
53
+
> cmake -Bbuild -H. -DMODEL=omp
54
+
No CMAKE_BUILD_TYPE specified, defaulting to 'Release'
55
+
-- CXX_EXTRA_FLAGS:
56
+
Appends to common compile flags. These will be appended at link phase as well.
57
+
To use separate flags at link phase, set`CXX_EXTRA_LINK_FLAGS`
58
+
-- CXX_EXTRA_LINK_FLAGS:
59
+
Appends to link flags which appear *before* the objects.
60
+
Do not use this for linking libraries, as the link line is order-dependent
61
+
-- CXX_EXTRA_LIBRARIES:
62
+
Append to link flags which appear *after* the objects.
63
+
Use this for linking extra libraries (e.g `-lmylib`, or simply `mylib`)
64
+
-- CXX_EXTRA_LINKER_FLAGS:
65
+
Append to linker flags (i.e GCC's `-Wl` or equivalent)
66
+
-- Available models: omp;ocl;std-indices;std-ranges;hip;cuda;kokkos;sycl;acc;raja;tbb;thrust
67
+
-- Selected model : omp
68
+
-- Supported flags:
69
+
70
+
CMAKE_CXX_COMPILER (optional, default=c++): Any CXX compiler that supports OpenMP as per CMake detection (and offloading if enabled with `OFFLOAD`)
71
+
ARCH (optional, default=): This overrides CMake's CMAKE_SYSTEM_PROCESSOR detection which uses (uname -p), this is mainly for use with
72
+
specialised accelerators only and not to be confused with offload which is is mutually exclusive with this.
73
+
Supported values are:
74
+
- NEC
75
+
OFFLOAD (optional, default=OFF): Whether to use OpenMP offload, the format is <VENDOR:ARCH?>|ON|OFF.
76
+
We support a small set of known offload flags for clang, gcc, and icpx.
77
+
However, as offload support is rapidly evolving, we recommend you directly supply them via OFFLOAD_FLAGS.
78
+
For example:
79
+
* OFFLOAD=NVIDIA:sm_60
80
+
* OFFLOAD=AMD:gfx906
81
+
* OFFLOAD=INTEL
82
+
* OFFLOAD=ON OFFLOAD_FLAGS=...
83
+
OFFLOAD_FLAGS (optional, default=): If OFFLOAD is enabled, this *overrides* the default offload flags
84
+
OFFLOAD_APPEND_LINK_FLAG (optional, default=ON): If enabled, this appends all resolved offload flags (OFFLOAD=<vendor:arch> or directly from OFFLOAD_FLAGS) to the link flags.
85
+
This is required for most offload implementations so that offload libraries can linked correctly.
0 commit comments