Skip to content
Snippets Groups Projects
Commit 198e1f59 authored by Dorothea Vom Bruch's avatar Dorothea Vom Bruch
Browse files

Merge branch 'weisser_readme_updates' into 'master'

Weisser readme updates

See merge request lhcb-parallelization/cuda_hlt!11
parents 678e3a68 b6c3ad27
No related branches found
No related tags found
1 merge request!11Weisser readme updates
......@@ -77,23 +77,23 @@ A run of the program with no arguments will let you know the basic options:
Here are some example run options:
# Run all input files once with the tracking validation
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -d ../input/minbias/MC_info -g ../input/geometry
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -d ../input/minbias/MC_info -g ../input/geometry/
# Note: For the examples below, cu_hlt must have been compiled with -DMC_CHECK=Off
# Run a total of 1000 events, round robin over the existing ones
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry -n 1000
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/ -n 1000
# Run four streams, each with 4000 events, 20 repetitions
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry -t 4 -n 4000 -r 20
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/ -t 4 -n 4000 -r 20
# Run twelve streams, each with 3500 events, 40 repetitions
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry -n 3500 -t 12 -r 40
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/ -n 3500 -t 12 -r 40
# Run clustering and Velopix efficiency validations, no repetitions or multiple threads needed
# Note: cu_hlt must have been compiled with -DMC_CHECK
# Note: cu_hlt must have been compiled with -DMC_CHECK=On
./cu_hlt -f ../input/minbias/velopix_raw -d ../input/minbias/MC_info -e ../input/minbias/ut_hits -g ../input/geometry/ -n 10 -t 1 -r 1 -c 1
# Run one stream and print all memory allocations
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry -n 5000 -t 1 -r 1 -p
./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/ -n 5000 -t 1 -r 1 -p
[This readme](readme_cuda_developer.md) explains how to add a new algorithm to the sequence and how to use the memory scheduler to define global memory variables for this sequence and pass on the dependencies.
\ No newline at end of file
[This readme](readme_cuda_developer.md) explains how to add a new algorithm to the sequence and how to use the memory scheduler to define global memory variables for this sequence and pass on the dependencies.
......@@ -151,7 +151,7 @@ Next, we need to define the arguments to be passed to our function. We need to d
We will distinguish arguments just passed by value from pointers to device memory. We don't need to schedule those simply passed by value like `n` and `a`. We care however about `x` and `y`, since they require some reserving and freeing in memory.
Let's give these arguments a name that won't collide, like `dev_x` and `dev_y`. Now, we need to add them in three places. First, `arg_enum_t` in `Stream/sequence_setup/include/SequenceArgumentEnum.cuh`:
Let's give these arguments a name that won't collide, like `dev_x` and `dev_y`. Now, we need to add them in three places. First, `arg_enum_t` in `stream/sequence_setup/include/SequenceArgumentEnum.cuh`:
```clike
/**
......@@ -168,7 +168,7 @@ enum arg_enum_t {
};
```
Again, order matters. Next, we will populate the arguments and their types without the `*` in `argument_tuple_t` in `Stream/sequence_setup/include/SequenceSetup.cuh`:
Again, order matters. Next, we will populate the arguments and their types without the `*` in `argument_tuple_t` in `stream/sequence_setup/include/SequenceSetup.cuh`:
```clike
/**
......@@ -187,7 +187,7 @@ using argument_tuple_t = std::tuple<
>;
```
Finally, we populate the _dependency tree_, ie. where are these arguments needed. For that, go to the body of `get_sequence_dependencies`, in `Stream/sequence_setup/src/SequenceSetup.cu`:
Finally, we populate the _dependency tree_, ie. where are these arguments needed. For that, go to the body of `get_sequence_dependencies`, in `stream/sequence_setup/src/SequenceSetup.cu`:
```clike
std::vector<std::vector<int>> get_sequence_dependencies() {
......@@ -201,7 +201,7 @@ std::vector<std::vector<int>> get_sequence_dependencies() {
}
```
Optionally, we can give names to our algorithm and arguments. This will help when debugging ie. the memory manager. `Stream/sequence_setup/src/SequenceSetup.cu`:
Optionally, we can give names to our algorithm and arguments. This will help when debugging ie. the memory manager. `stream/sequence_setup/src/SequenceSetup.cu`:
```clike
std::array<std::string, std::tuple_size<algorithm_tuple_t>::value> get_sequence_names() {
......@@ -364,13 +364,13 @@ Finally, go to `stream/sequence/src/StreamSequence.cu` and insert the following
...
```
We can compile the code and run the program with simple settings, something like `./cu_hlt -f ../velopix_minbias_raw -g ../velopix_minbias_MC`. If everything went well, the following text should appear:
We can compile the code and run the program with simple settings, something like `./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/`. If everything went well, the following text should appear:
```
Saxpy max error: 0.00
```
The cool thing is your algorithm is now part of the sequence. You can see how memory is managed, taking into account your algorithm, and how it changes on every step by appending the `-p` option: `./cu_hlt -f ../velopix_minbias_raw -g ../velopix_minbias_MC -p`
The cool thing is your algorithm is now part of the sequence. You can see how memory is managed, taking into account your algorithm, and how it changes on every step by appending the `-p` option: `./cu_hlt -f ../input/minbias/velopix_raw -e ../input/minbias/ut_hits -g ../input/geometry/ -p`
```
Sequence step 13 "Saxpy test" memory segments (MiB):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment