In the last weeks, @lemouth has been preparing a participative science project for the community in Hive to participate. For most of us, Particle Physics sounds completely out of our normal skills, that is why it is so suggestive the idea of collaborating to run simulations in our computer that can help on his research.
If you want to know more, he introduced the project in this post: Towards a citizen science particle physics research project on Hive. I am happy that he finally decided to launch the project, even though this will be extremely time consuming for him.
During some weeks (or months), we will be able to use a CERN software to run simulations that may contribute to the research of neutrino mass models. So, even though I think I may not have the time to commit to such a project, because it is extremely complicated to maintain the steady effort during the weeks, I didn't want to let this opportunity pass without giving it a try and test the software myself. In this way we can document a bit the process to help to following users and citizen scientists.
The instructions to follow during the first week are present in this blog entry: Citizen science particle physics project on Hive - Let’s get started!. This post is the report of the activities of that entry.
Task 1 - Installing Linux in a Virtual Machine (Xubuntu)
I have been a user of GNU/Linux as my only Operative System during many years, during university and after that. However, for simplicity, because I do not use my personal computer so much and for cross-compatibility, my personal laptop is running currently only on Windows 10. That is why I thought it may be interesting as well to document how to install a Virtual Machine, that can be extremely useful for many people in this context and many others (scientifical, technical or not). I have not done this in ages, so any comment is extremely welcome.
For that, I have decided to use Virtual Box, because I have some previous experience with it, and install on it Xubuntu 20.04, looking for an easy to use and light distribution, given that we will be mostly using command line so we can save some resources for the computations.
Download and install Virtual Box
This part is extremely easy, we will just go to the Virtual Box webpage. Remember to select "Windows Hosts" when choosing the package to download, since we are going to install it in a Windows Machine.
Figure 1. Virtual Box webpage
Figure 2. Packet selection
Then, just launch the installer. Most of the default installation setup is going to be enough. I would recommend to leave the default configuration that accepts USB support and Network cards.
Figure 3. Installation options
Figure 4. Installation process
Figure 5. Creating a new virtual machine
Select:
- A Name for your Virtual Machine. I took something explicative: "CitizenScienc"
- Machine Folder. This is the place in your computer where it will be saved. You can leave the default one.
- Type. Select Linux as we will need to create a Linux virtual machine.
- Version: I have selected Ubuntu (64-bit). Remember that this will need to be coherent with the Linux version you will download. Ubuntu and Xubuntu are part of the same family in this case, and I opted for a 64 bit architecture.
Now, some important decisions will have to be made. As you can see below, I chose to assign to the virtual machine 4 GB, that is half of the available in my machine. Remember we will do computations with this computer, so it will be probably better if we assign a considerable amount of Memory, but your computer where this virtual machine is running will need to run so remember to leave a nice margin as well.
Figure 6. Selecting the RAM for the virtual machine
- Maximum Size: The Operative system + software will be already almost 9GB and we will need some space to generate our products. My current allocation is 35GB (Probably with too much extra margin). Note: This was updated after running Report #2.
Figure 7. Hard Disk Type
Figure 8. HDD size selection
First, we are going to download the software. Typically, what is downloaded is a virtual image of a disc (*.iso), that is what was usually burned into a CD/DVD in the old times.
Just go to the Xubuntu webpage and click download. Xubuntu is a distribution very similar to Ubuntu. Ubuntu is extremely extended and famous for its easy installation, configuration and use. Xubuntu is a distribution using a lighter desktop environment (XFCE) and has been traditionally used for computers with lower resources.
The version I downloaded is the 20.04. Naming versions in the Ubuntu family are fun: typically they contain the year of the release and the month, having a release every April and October only, so only xx.04 and xx.10 are available. Why are we offered by default a version from 2020? Because they are called Long Term Support, that means the community is committed to maintain them for longer. Remember to download a 64-bit version because it is the architecture we selected before for our machine (or a 32 if you selected that). Download can take some time, in this case it was 1.7 GB
Now, when you have downloaded the Operative System we want to install, we can finally launch our Virtual Machine!
Figure 9. Launching a virtual machine
Figure 10. Selecting a start-up disk
Figure 11. Selecting an installation disk
Figure 12. Installation is loading
In the next page, I decided to install also third-party packages, usually gives better results in the compatibility with the machines, but may be dependent on non-free software.
Figure 13. Install Xubuntu
Figure 14. Select updates and third party packages.
Figure 15. Type of installation on HDD
Figure 16. Xubuntu installation in progress
Figure 17. Xubuntu running on your virtual machine
Getting ready our virtual machine to continue
First, I did some configurations on the Virtual Machine itself that can help later. In the Virtual Box window, right click on our new machine and click Settings.
Figure 18. Open the settings of the Virtual Machine
Figure 19. Network configuration of the VM
As an additional nice feature, I configured it so we can copy/paste from our host machine to the virtual machine. For that go to General then Advanced and select Shared Clipboard - Bidirectional
Figure 20. Enable copypaste between your computer and the virtual machine
Figure 21. Connect to the network in the VM
In order to make sure everything is going to be running smoothly, we will update the current Operative System and install some packages that will be necessary in the future. Launch a Terminal Emulator
In order to manage the software and install packages, i will use apt in the command line. Some other people will perefer apt-get, exchange it in the following commands if you prefer.
Run the following to check for updates and install them:
sudo apt update
sudo apt upgrade
Now it is the time to install some packages we will need to be able to install the software (and to manage software in general).
Run the following command for the C++ compiler:
sudo apt install gpp
Run the following command for the Fortran compiler
sudo apt install gfortran
I have decided to install the latest available python version:
sudo apt install python3.9
We will need numpy (Note: this is an edit added after noticing it was necessary while running Report #2):
sudo apt install numpy
And this package will be important to be useful ensure a smooth installation of the software later:
sudo apt install build-essential
And remember, in the command line, the tab key helps you autocompleting (and ensures what you are doing makes some sense)
If in some moment the installation tells you that some dependencies are required, just launch (and then retry the installation):
sudo apt install -f
We have it! Now, let's give a try to that new particle physics software
Task 2 - Installing MG5aMC
This is where the real job will start for all those geeky GNU/Linux users, and now, we can start installing the required software ourselves.
First thing will be to download the software. As it was provided in the instruction post, it is available in this link:
https://launchpad.net/mg5amcnlo/3.0/3.3.x/+download/MG5aMC_LTS_2.9.9.tar.gz
I would download it directly from your Virtual Machine. Once we have it in our computer, we need to un-compress it. Just move it to the folder when you want to install (mv originalpath newpath) and run the following command as indicated by @lemouth
tar xf MG5aMC_LTS_2.9.9.tar.gz
Figure 22. Uncompressing the software package
Next step is just executing the software. From the same folder you are, you can just run:
./MG5_aMC_v2_9_9/bin/mg5_aMC
For beginners, the ./ at the start will execute the specific file we have indicated.
Figure 23. Inside MG5_aMC
Task 3 - Install LHAPDF6
The package is included in the software we have downloaded, and we just need to run:
install lhapdf6
Figure 24. lhapdf6 installation in progress
By the way, in this point, I find interesting that it directly suggests citing a paper if we are using the code. This is nice, because it gives visibility and reputation to the people doing the amazing job required to develop some packages. Similarly, it happens in astronomy / planetary sciences when the paper that announces the releases of some datasets has to be cited in the research done with them.
The successful installation will deliver that message:
Figure 25. Successful installation of LHAPDF6
Task 4 - Install Pythia 8
Similar to what we did before, we now launch the following:
install pythia8
Figure 25. Pythia 8 successfully installed
tutorial inside the tool.
Figure 26. MG5_aMC tutorial start
Wrapping up
It is exciting, it looks like I have the software installed in my machine. In this first log, we have:
- Installed a VM
- Installed MG5_aMC
- Installed the support packages LHAPDF6 and Pythia 8
I hope this post is useful for some people when trying to install a virtual machine and that more can start participating in such an interesting project. I can see that there are already several entries in #citizenscience so this is getting exciting.





