Skip to content

Commit 8baa238

Browse files
authored
Merge pull request #233 from vkucera/troubleshooting
Update and extend installation and troubleshooting
2 parents c4f24fc + 699049f commit 8baa238

File tree

3 files changed

+54
-20
lines changed

3 files changed

+54
-20
lines changed

docs/gettingstarted/gitbasics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Developers can review project history to find out:
2222
Selected sections:
2323

2424
- [Saving changes](https://www.atlassian.com/git/tutorials/saving-changes)`add`, `commit`, `diff`, `stash`
25-
- [Inspecting a repository](https://www.atlassian.com/git/tutorials/inspecting-a-repository)`status`, `tag`, `blame`
25+
- [Inspecting a repository](https://www.atlassian.com/git/tutorials/inspecting-a-repository)`status`, `log`, `tag`, `blame`
2626
- [Undoing changes](https://www.atlassian.com/git/tutorials/undoing-changes)`checkout`, `clean`, `revert`, `reset`, `rm`
2727
- [Rewriting history](https://www.atlassian.com/git/tutorials/rewriting-history)`commit`, `rebase`, `reflog`
2828
- [Syncing](https://www.atlassian.com/git/tutorials/syncing)`remote`, `fetch`, `push`, `pull`
@@ -56,4 +56,4 @@ Selected sections:
5656

5757
[Meld](https://meldmerge.org/) – Visual diff and merge tool that can be used with Git commands `git difftool` and `git mergetool`
5858

59-
[Tig](https://jonas.github.io/tig/) – Git repository browser
59+
[Tig](https://jonas.github.io/tig/) – Git repository browser

docs/gettingstarted/installing.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ mkdir -p ~/alice
2323
cd ~/alice
2424
```
2525

26-
Download O2 and O2Physics (note the `--defaults o2`):
26+
Download O2 and O2Physics:
2727

2828
```bash
29-
aliBuild init O2@dev --defaults o2
30-
aliBuild init O2Physics@master --defaults o2
29+
aliBuild init O2@dev
30+
aliBuild init O2Physics@master
3131
```
3232

3333
If you perform `ls` under your work directory, you will see the packages you have downloaded via
@@ -40,7 +40,7 @@ to keep them up-to-date manually.
4040
## Check your prerequisites
4141

4242
```bash
43-
aliDoctor O2Physics --defaults o2
43+
aliDoctor O2Physics
4444
```
4545

4646
aliDoctor will warn you that some packages have to be built as they could not be found from the
@@ -49,9 +49,11 @@ system.
4949
## Build and rebuild
5050

5151
```bash
52-
aliBuild build O2Physics --defaults o2
52+
aliBuild build O2Physics
5353
```
5454

55+
See the [Troubleshooting](../troubleshooting/README.md) section for debugging tips if the build fails.
56+
5557
## Use your local software installations
5658

5759
You will not find the packages you have built immediately available on your shell: we provide a tool
@@ -91,7 +93,13 @@ Go to the build directory
9193
cd ~/alice/sw/BUILD/O2Physics-latest/O2Physics
9294
```
9395

94-
You can now rebuild and install a specific directory with
96+
You can now rebuild and install entire O2Physics with
97+
98+
```bash
99+
ninja install
100+
```
101+
102+
or just a specific directory with
95103

96104
```bash
97105
ninja <directory>/install
@@ -103,6 +111,12 @@ For example:
103111
ninja PWGCF/Tasks/install
104112
```
105113

114+
You can redirect the terminal output to the standard aliBuild log file and see whether the build succeeded:
115+
116+
```bash
117+
ninja install > ../log 2>&1 && echo "Good" || echo "Bad"
118+
```
119+
106120
A specific executable can be built in the staging directory `stage/bin` with
107121

108122
```bash

docs/troubleshooting/README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ title: Troubleshooting
99

1010
### Compilation problems
1111

12-
```todo
13-
To be added
12+
If your O2 code fails to compile and you have difficulties finding the reason, try the following tips.
13+
14+
Search for errors (and warnings) in the compilation log file (here assumed `../log`) using the `grep` command.
15+
16+
Get the list of executables that failed to build and the list of problems in the code (in the format `file:line:column`):
17+
18+
```bash
19+
grep -e "FAILED:" -e "error:" -e "warning:" ../log | cut -d : -f -3
1420
```
1521

22+
If you want to see the full messages, remove the `| cut...` part.
23+
1624
### Runtime problems
1725

18-
If your O2 code is crashing and you have difficulties finding out the reason, try the following tips.
26+
If your O2 code is crashing and you have difficulties finding the reason, try the following tips.
1927

2028
Redirect the terminal output to a text file (here called `stdout.log`):
2129

@@ -75,6 +83,23 @@ If the reported table is part of the main [AO2D tables](../datamodel/ao2dTables.
7583
You can check by opening it with ROOT if the corresponding table exists in the file by navigating to the reported folder (here: `DF_2853960297589372650`).
7684

7785
Most likely however the table which is missing has to be produced by a [helper task](../datamodel/helperTaskTables.md).
86+
87+
First, look for a solution in the list of [Special cases](#special-cases).
88+
If the missing table is not mentioned there, try to find the missing workflow following the instructions for [General cases](#general-cases).
89+
90+
#### Special cases
91+
92+
- Missing `track`: If you are running on Run 3 input, add `o2-analysis-track-propagation`.
93+
- Please refer to the documentation on the [track propagation](../basics-usage/HelperTasks.md#track-propagation) for details.
94+
- Missing `collision_001`: Please add the `o2-analysis-collision-converter`.
95+
- Missing `collision`: If you are executing `o2-analysis-collision-converter`, remove it.
96+
- Missing `zdc_001`: Please add the `o2-analysis-zdc-converter`.
97+
- Missing `zdc`: If you are executing `o2-analysis-zdc-converter`, remove it.
98+
- Missing `fv0c`: If you are running on Run 3 input, please make sure that the process switches in the `bc-selection`, `event-selection` and `multiplicity-table` tasks are set to `"processRun2": "false", "processRun3": "true"` in your config JSON; see e.g. the `Configurables` section in the [event selection](../basics-usage/HelperTasks.md#event-selection) documentation.
99+
- Missing `tofsignal`: Please refer to the documentation on the [TOF PID](../basics-usage/HelperTasks.md#particle-identification) requirements.
100+
101+
#### General cases
102+
78103
You can identify the missing workflow by running the [`find_dependencies.py`](https://github.com/AliceO2Group/O2Physics/blob/master/Scripts/find_dependencies.py) script.
79104
The procedure is simple: If the error message complains about a missing table `DF_<id>/O2<table>` then you have to run `$O2PHYSICS_ROOT/share/scripts/find_dependencies.py -t <table>`
80105
inside the O2Physics environment and add the correct one among the listed producer workflows to your command line.
@@ -97,13 +122,6 @@ o2-analysis-timestamp | o2-analysis-my-analysis ...
97122

98123
and the table should be found.
99124

100-
#### Special cases
101-
102-
- Missing `track`: If you are running on Run 3 data or MC, please refer to the documentation on the [track propagation](../basics-usage/HelperTasks.md#track-propagation).
103-
- Missing `fv0c`: If you are running on Run 3 data or MC, please make sure that the process switches in the `bc-selection`, `event-selection` and `multiplicity-table` workflows are set to `"processRun2": "false", "processRun3": "true"` in your config JSON; see e.g. the `Configurables` section in the [event selection](../basics-usage/HelperTasks.md#event-selection) documentation.
104-
- Missing `tofsignal`: Please refer to the documentation on the [TOF PID](../basics-usage/HelperTasks.md#particle-identification) requirements.
105-
- Missing `collision_001`: Please add the `o2-analysis-collision-converter`.
106-
107125
### CCDB object not found
108126

109127
Error messages:
@@ -126,9 +144,11 @@ How to check the timestamp?
126144

127145
### Alien connection failed
128146

129-
```todo
130147
Error message:
148+
149+
```text
150+
Alien Token Check failed - Please get an alien token before running with https CCDB endpoint, or alice-ccdb.cern.ch!
131151
```
132152

133153
- Create an Alien token by executing the `alien-token-init` command inside the O2Physics environment.
134-
- Verify that the connection can be established by executing `alien.py`.
154+
- Verify that the connection can be established by executing `alien.py`. You should be greeted with `Welcome to the ALICE GRID`. Exit with `exit`.

0 commit comments

Comments
 (0)