New to ALICE - Using O2 on lxplus7: issue with the O2 tutorial - Linux Subsystem for Windows


(Aimeric Robin Landou) #1

Hi,

I just arrived in the collaboration for a PhD and will need to use O2. To familiarize myself with it, I tried going through the tutorial (https://alisw.github.io/o2-tutorial/).
I am working on a Windows machine for now, using the Linux Subsystem for Windows to be able to work in a Linux environment (Ubuntu 18.04).
I haven’t been able to go through the aliBuild installation (using the following guidelines https://alice-doc.github.io/alice-analysis-tutorial/), in particular because I couldn’t get Docker installed on the Ubuntu subsystem (this is another issue, I am still going to try it a few more times in the following weeks, and might create another topic if I don’t manage to install it successfully).
I thus decided to simply use the O2 builds available on lxplus7.cern.ch and try to follow the O2 tutorial after the O2 installation.
If I understood correctly, once connected to lxplus7.cern.ch, I simply need to call the right environment using the command line “/cvmfs/alice-nightlies.cern.ch/bin/alienv enter VO_ALICE@O2::nightly-20181121-1” (at least for the 21-12-2018 version).

The first issue I encountered was at Section 13 Step 1: after creating the different .cxx, .h and CMakeLists.txt files. A step seems to be missing: the command line “cmake CMakeLists.txt” is needed before one can use the following command line (“make -j 10 install”), or at least was needed for me (I am still getting accustomed to c++ makefiles, so I don’t know if it’s actually a mistake on from the tutorial). Now this first issue has been solved by using this cmake command line.

The next issue appeared, and this one I am still trying to solve it. The command “make -j 10 install” encounters several errors: the system is not able to locate the FairMQLogger.h and FairMQDevice.h that are called in the AliceO2TutorialSampler.h and AliceO2TutorialSink.h headers or the runSink.cxx and runSampler.cxx files (see log at the end of the post).
I have found a FairMQ folder in the alice-nightlies.cern.ch/el7-x86_64/Packages folder, but I have no idea how to ask the make command to look there (I would have thought that was the point of using “/cvmfs/alice-nightlies.cern.ch/bin/alienv enter VO_ALICE@O2::nightly-20181121-1” to set up the proper environment. My guess would be that the issue comes from the difference between building O2 on my computer and setting the O2 environment on lxplus7, unfortunately I haven’t found much information about how to actually use lxplus7 to play with O2 apart from this single command line.

Thank you for taking the time to read this!

Here is the log I get after executing this “make -j 10 install” line:

[alandou@lxplus084 tutorial-1]$ make -j 10 install
[ 75%] [ 75%] [100%] [100%] Building CXX object CMakeFiles/runSampler.dir/runSampler.o
Building CXX object CMakeFiles/runSampler.dir/AliceO2TutorialSampler.o
Building CXX object CMakeFiles/runSink.dir/runSink.o
Building CXX object CMakeFiles/runSink.dir/AliceO2TutorialSink.o
In file included from /afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/AliceO2TutorialSink.cxx:1:0:
/afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/AliceO2TutorialSink.h:4:10: fatal error: FairMQDevice.h: No such file or directory
#include “FairMQDevice.h”
^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/runSink.dir/AliceO2TutorialSink.o] Error 1
make[2]: *** Waiting for unfinished jobs…
/afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/runSink.cxx:3:10: fatal error: FairMQLogger.h: No such file or directory
#include “FairMQLogger.h”
^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/runSink.dir/runSink.o] Error 1
make[1]: *** [CMakeFiles/runSink.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
/afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/runSampler.cxx:5:10: fatal error: FairMQLogger.h: No such file or directory
#include “FairMQLogger.h”
^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/runSampler.dir/runSampler.o] Error 1
make[2]: *** Waiting for unfinished jobs…
In file included from /afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/AliceO2TutorialSampler.cxx:5:0:
/afs/cern.ch/user/a/alandou/O2/examples/tutorial-1/AliceO2TutorialSampler.h:4:10: fatal error: FairMQDevice.h: No such file or directory
#include “FairMQDevice.h”
^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/runSampler.dir/AliceO2TutorialSampler.o] Error 1
make[1]: *** [CMakeFiles/runSampler.dir/all] Error 2
make: *** [all] Error 2
[alandou@lxplus084 tutorial-1]$


(Dennis Klein) #2

Dear Aimeric,

alienv enter loads your runtime environment, not a complete build environment for O2. In order to build additional files in the O2 project, you need to use aliBuild as shown in the tutorial. I am afraid, shortcutting the instructions here, will cost you much more time and effort than just getting started with aliBuild. After all, there are reasons, why we are using this tool :wink: (one is to make your life easier).

The content of the CMakeLists.txt file in the O2 tutorial looks a bit outdated, not sure, if it will still work - just report back here, if it does not. When following the aliBuild steps in the tutorial, you should not need to call cmake yourself.

Best,
Dennis


(Aimeric Robin Landou) #3

Dear Dennis,
thank you for taking the time to help.

I am not completely familiar with some of those terms, so I will try to rephrase what you wrote:

  • the alienv enter command lets me enter this runtime environment which only allows me to run pre-built files, and not build new ones like what is done in the tutorial.

  • to build new files, I need to use aliBuild to install O2 properly, even on my lxplus7 session

Assuming this is what you mean: I am a bit confused because the tutorial (https://alisw.github.io/o2-tutorial/) and the installation guide (https://alice-doc.github.io/alice-analysis-tutorial/building/custom.html) both gives different sets of instruction, that I will call respectively set-I and set-II. The latter mentions a lot more steps, and prerequisites, than the O2-tutorial. So I don’t really know which one is the one to follow.
To get around this issue, I simply tried to follow both and see if I could get one to work on my lxplus7 session.

Unfortunately, even though it looks like I manage to install aliBuild, after adding the --user option because I don’t have any root permission on this lxplus7 account, the build of O2 fails no matter which of the two sets of instructions I follow.

The O2-tutorial one, set-I, is the shortest one, with no mention of any prerequisite of any kind, saying that aliBuild will take care of that by itself. It is also the version that gets me an error the quickest: typing the command line aliBuild init O2@dev as instructed immediately gives me this error:

[alandou@lxplus084 alice2]$ aliBuild init O2@dev
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 5705 (delta 4), reused 6 (delta 2), pack-reused 5691
Receiving objects: 100% (5705/5705), 1.37 MiB | 879.00 KiB/s, done.
Resolving deltas: 100% (3682/3682), done.
ERROR: Specified default `release’ is not compatible with the packages you want to build.
ERROR: Valid defaults:
ERROR:
ERROR: - alo
ERROR: - o2
ERROR: - o2-dataflow
ERROR: - o2-dev-fairroot
ERROR: - o2-ninja
ERROR: - o2-prod
[alandou@lxplus084 alice2]$

I don’t really know what to make of that, except that it seems an option is missing in the command line, if I refer to set-II.

Indeed, if I look at this page of set-II: https://alice-doc.github.io/alice-analysis-tutorial/building/build.html, I get another command line, aliBuild build O2 --defaults o2. Seeing that, I try this command line instead of the simple ‘aliBuild build O2’, and this time the download works!

I try to switch back to following set-I, using the command aliBuild build O2, but get a log similar to the one above. Again, I try the same command adding --defaults o2 and the build starts! However, after several minutes, the build fails when it starts to build GCC-Toolchain@v7.3.0-alice1, and I get an error message. Here is the log I get:

[alandou@lxplus084 alice]$ aliBuild build O2 --defaults o2

==> Packages will be built in the following order:
- ms_gsl@b014508
- autotools@v1.5.0
- cub@v1.8.0
- GCC-Toolchain@v7.3.0-alice1
- FreeType@v2.6
- sqlite@v3.15.0
- lzma@v5.2.3
- CMake@v3.13.1
- protobuf@v3.5.2
- zlib@v1.2.8
- lz4@v1.8.3
- ZeroMQ@v4.1.5
- GSL@release-1-16
- msgpack@cpp-3.1.1
- FairLogger@v1.2.0
- googlebenchmark@v1.3.0
- pythia6@428-alice1
- googletest@release-1.8.0
- Vc@1.3.3-alice2
- nanomsg@1.1.3
- hijing@v1.36
- libpng@v1.6.34
- AliTPCCommon@alitpccommon-v2.3.2
- GEANT4@v10.4.2
- RapidJSON@v1.1.0-alice1
- libxml2@v2.9.3
- OpenSSL@OpenSSL_1_0_2o
- flatbuffers@v1.10.0
- Python@alice/v2.7.10
- Python-modules@1.0
- boost@v1.68.0
- Common-O2@v1.4.0
- Monitoring@v2.0.0
- DDS@2.2
- yaml-cpp@yaml-cpp-0.6.2
- Ppconsul@f39961cdcfddc630616658fc9c1e833b51cba21b
- thrift@0.12.0
- libInfoLogger@v1.0.5
- FairMQ@v1.3.8
- lhapdf@v6.2.1-alice2
- Configuration@v2.2.0
- arrow@apache-arrow-0.12.0-alice3
- pythia@v8235-alice2
- ROOT@v6-14-04
- generators@v1.0
- HepMC3@d43693ce0e7731e9b787dbd6176cb6245fd770b3
- vgm@v4-4
- MCStepLogger@master
- GEANT3@v2-6
- GEANT4_VMC@v3-6-p1
- simulation@v1.0
- FairRoot@c672f280ec8382cb2dc10b85c5fa4e64e13c5975
- O2@O2-1.0.0
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 662846 (delta 7), reused 10 (delta 3), pack-reused 662820
Receiving objects: 100% (662846/662846), 705.77 MiB | 10.64 MiB/s, done.
Resolving deltas: 100% (478888/478888), done.
remote: Enumerating objects: 7160, done.
remote: Counting objects: 100% (7160/7160), done.
remote: Compressing objects: 100% (1998/1998), done.
remote: Total 7160 (delta 4649), reused 7149 (delta 4643)
Receiving objects: 100% (7160/7160), 22.43 MiB | 14.60 MiB/s, done.
Resolving deltas: 100% (4649/4649), done.
remote: Enumerating objects: 11074, done.
remote: Total 11074 (delta 0), reused 0 (delta 0), pack-reused 11074
Receiving objects: 100% (11074/11074), 5.13 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (7507/7507), done.
remote: Enumerating objects: 124, done.
remote: Counting objects: 100% (124/124), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 124 (delta 51), reused 110 (delta 46), pack-reused 0
Receiving objects: 100% (124/124), 82.56 KiB | 0 bytes/s, done.
Resolving deltas: 100% (51/51), done.
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 5728 (delta 4), reused 9 (delta 3), pack-reused 5710
Receiving objects: 100% (5728/5728), 11.89 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (3747/3747), done.
remote: Enumerating objects: 15698, done.
remote: Total 15698 (delta 0), reused 0 (delta 0), pack-reused 15698
Receiving objects: 100% (15698/15698), 29.90 MiB | 1.51 MiB/s, done.
Resolving deltas: 100% (12202/12202), done.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 75905 (delta 0), reused 0 (delta 0), pack-reused 75902
Receiving objects: 100% (75905/75905), 190.41 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (58883/58883), done.
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 70951 (delta 2), reused 0 (delta 0), pack-reused 70944
Receiving objects: 100% (70951/70951), 104.87 MiB | 12.32 MiB/s, done.
Resolving deltas: 100% (42670/42670), done.
Using cached build for defaults-release

==> Building defaults-release@v1
==> defaults-release is being built (use --debug for full output): ok
Using cached build for defaults-release
Using cached build for ms_gsl

==> Building ms_gsl@1
==> ms_gsl is being built (use --debug for full output): ok
Using cached build for ms_gsl
Using cached build for autotools

==> Building autotools@v1.5.0
==> autotools is being built (use --debug for full output): ok
Using cached build for autotools
Using cached build for cub

==> Building cub@v1.8.0
==> cub is being built (use --debug for full output): ok
Using cached build for cub
Using cached build for GCC-Toolchain

==> Building GCC-Toolchain@v7.3.0-alice1
==> GCC-Toolchain is being built (use --debug for full output): failed
ERROR: Error while executing /afs/cern.ch/user/a/alandou/alice/sw/SPECS/slc7_x86-64/GCC-Toolchain/v7
.3.0-alice1-7/build.sh on `lxplus084.cern.ch’.
ERROR: Log can be found in /afs/cern.ch/user/a/alandou/alice/sw/BUILD/GCC-Toolchain-latest/log.
ERROR: Please upload it to CERNBox/Dropbox if you intend to request support.
ERROR: Build directory is /afs/cern.ch/user/a/alandou/alice/sw/BUILD/GCC-Toolchain-latest/GCC-Toolch
ain.
[alandou@lxplus084 alice]$

I then guess that I might be missing some dependencies, as set-II indeed asks to run a few more command lines to install some dependencies (https://alice-doc.github.io/alice-analysis-tutorial/building/prereq-centos7.html).
And indeed, if I run the aliDock, I see that some missing packages should not be missing before I start the installation. Here is the list I get:

- Python-modules   ---> specifically specified as something that HAS to be installed
- Vc             
- CMake          
- protobuf       
- flatbuffers    
- lz4                ----> not in the list   
- GCC-Toolchain    ---> not in the list
- msgpack        ----> not in the list
- nanomsg        
- ZeroMQ         
- autotools      ----> not in the list
- boost          
- GSL            
- thrift         ----> not in the list

It looks like I need to go through the prerequisites and try to install them.
Unfortunately, this page suggests to install those as a root user! which is something I cannot do on a lxplus7 session. Even the pip command to install python dependencies doesn’t work by adding --user, giving me this log:

[alandou@lxplus084 alice]$ pip install matplotlib==2.0.2 numpy certifi ipython==5.1.0 ipywidgets ipykernel notebook metakernel pyyaml --user
Collecting matplotlib==2.0.2
Downloading https://files.pythonhosted.org/packages/2c/69/362c0a5eca37225c7d451e6c57f07c4fee85a5b6cb3aedf16fe649f411ea/matplotlib-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl (14.5MB)
100% |################################| 14.5MB 58kB/s
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/lib64/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): certifi in /afs/cern.ch/user/a/alandou/user_python/lib/python2.7/site-packages
Collecting ipython==5.1.0
Using cached https://files.pythonhosted.org/packages/17/81/edc7c7c2acf4009db35a183e5a898679fdc18c2b078d847d3e745b11faa4/ipython-5.1.0-py2-none-any.whl
Collecting ipywidgets
Using cached https://files.pythonhosted.org/packages/30/9a/a008c7b1183fac9e52066d80a379b3c64eab535bd9d86cdc29a0b766fd82/ipywidgets-7.4.2-py2.py3-none-any.whl
Collecting ipykernel
Using cached https://files.pythonhosted.org/packages/11/0b/95330660f8cc5d63428b9886c800ea8d68842fd866389cf579acca4915be/ipykernel-5.1.0.tar.gz
Complete output from command python setup.py egg_info:
ERROR: ipykernel requires Python version 3.4 or above.

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/alandou/pip-build-YP30rQ/ipykernel/
You are using pip version 8.1.2, however version 19.0 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
[alandou@lxplus084 alice]$

So I guess I am wondering what I am missing in those two tutorials, and which one should I try to follow if I manage to figure out how to solve this issue when trying to build O2 after successfully installing aliBuild.

Bests,
Aimeric


(Dario Berzano) #4

Hi, I am afraid there is no official support for WSL, and it’s not in the plans to have it. Also, the builds on CVMFS are meant to be used at runtime, not for building your software against. I cannot stress enough how time-consuming is for us to support too many platforms, but the documentation does a good job already :slight_smile:

Please go the easy way. Use something like VirtualBox to get a CC7 environment and use aliBuild from there. Everything will work out of the box and you will benefit from cached builds as well, meaning that the majority of the software will be downloaded instead of being built on your laptop.

Side note: my dream is to have alidock working under Windows. Bear in mind, however, that Docker works on Windows Professional only (so all Home Edition users are cut out). Also, you don’t need any magic to get Docker working on Windows - I don’t understand why you wanted to have it on Ubuntu running under WSL instead of having a “native” (so to say) version, see here.


(Aimeric Robin Landou) #5

Hi,

I do understand that trying to install on my computer instead would be very difficult as there is no documentation for that (it is indeed specified here: https://alisw.github.io/alibuild/troubleshooting.html).
I actually thought that I could bypass the fact WSL isn’t supported by using lxplus7 as I would then be using another machine. On top of that, it would mean I only have one workstation I can connect to from any computer if I was to travel without my laptop, if I was to lose it or see it broken.
If WSL still conflicts with aliBuild and alidock through lxplus, then I guess I will have no choice but to use something like VirtualBox, although from what I have read virtual machines don’t lead to the best performance.

Thank you for your post!


(Dario Berzano) #6

You may be interested in following this, maybe? :slight_smile: We just need to put our hands on a Win Pro machine - and refresh my Windows knowledge, I am a macOS and Linux developer!


(Aimeric Robin Landou) #7

I will!

One last question, sorry if I insist on that: were you saying with your first post that I won’t be able to use aliBuild effectively on my lxplus7 session if I ssh to it with my WSL session? because is does seem weird to me as I would be using a completely different machine. Or were you talking about the part where I said I tried to install it directly on my WSL session? or were you trying to say that aliBuild and aliDock are not meant to be installed on a lxplus session?


(Aimeric Robin Landou) #8

Hi,

I decided to install Linux (CentOS7) on a virtual machine (my computer is kind of struggling while the virtual machine is ON, but at least it seems to be working), and have been able to install alidock without any issue so far. To get back to initial subject of my first post above, I am now stuck on the O2 tutorial (https://alisw.github.io/o2-tutorial/) again, trying to use the make install command.

alienv load O2/latest seems to work without any issue. But once I have created all the .cxx, .h and .txt files, when I try make -j 10 install in the O2 folder I built inside my alidock environment using the following set of command lines,

aliBuild init O2@dev --defaults o2
aliDoctor O2 --defaults o2

I simply get the following error message:

make: *** No rule to make target `install’. Stop.

One thing that I find troubling is that my O2 directory doesn’t show the same structure as the one shown in the O2 tutorial. Here is how my O2 directory (where I run the make install command) looks like:

Algorithm           compile_commands.json  Detectors           Jenkinsfile
AliceO2_test.cmake  config                 doc                 macro
CCDB                COPYING                EventVisualisation  README.md
cmake               CTestConfig.cmake      Examples            run
CMakeLists.txt      CTestCustom.cmake      examplesAIMERIC     Steer
codecov.yml         Dart.sh                Framework           Testing
Common              DataFormats            Generators          Utilities

where examplesAIMERIC is the folder where tutorial-1 is with the .cxx and .h and CMakeLists.txt files from the tutorial are.

What am I missing?

EDIT:
I found out I actually have another O2 folder, with the right architecture, inside the sw folder, though it is actually named .sw and is thus hidden. The O2 I had found before was only what I dowloaded with aliBuild init. I will try again with that.


(Barthelemy Von Haller) #9

Just to make sure we are on the same page. Have you run aliBuild build O2 --defaults o2 ? Was it successful ?


(Aimeric Robin Landou) #10

Yes, I did, and it was successful. As I wrote on the edit, I found the sw directory with the right ~/sw/BUILD/O2-latest/O2 directory a few hours after the same post. Contrarily to what the tutorial suggests, it was a hidden file (.sw) and I didn’t find it right away. I Renamed it sw for ease of use.

Now I am back trying to use make -j 10 install, this time in the same directory as the one indicated in the tutorial (~/sw/BUILD/O2-latest/O2), with the .h, .cxx, .txt files in the directory ~/O2/Examples/tutorial-1/ (all of this inside an alidock session)
Unfortunately, I still get the same error message:

make: *** No rule to make target `install’. Stop.