This page shows the process on how to build Athena from Arm from the ground up. This has been performed on the NVIDIA Jetson TK1 running
Fedora 21, but also on HP Moonshot Aarch64 running Ubuntu.
These instructions now apply to HP Moonshot Aarch64, although may work when trying to compile on other architectures.
LCG Software
To build the LCGStack, look here,
http://ph-dep-sft.web.cern.ch/document/using-lcgcmake for complete documentation.
If a package fails to compile its probably because you are missing dev/devel packages. As an example, the script
YumPackages.sh will work on Fedora. Unfortunately I don't have one for Ubuntu.
For the ARM architecture, there is a list of changes made shown in
LCG_aarch64.patch. This could be just applied from the Lcgcmake directory if you want all the changes. However there may be some paths that need to be changed -
ROOT for one and so this patch file serves more as a reference as to whats needed to be changed. The alternative is to use the
SVN repo that I copied from the main lcg project trunk and is now at
http://svnweb.cern.ch/world/wsvn/atlas-jwsmith/LCG_Software/branches/LCGCMT_79. For paths that had to be changed, grep for "home/jwsmith/externals".
The
update.ConfigGuess script changes the config.guess that Aarch64 was having an issue with, this may not be applicable for other architectures.
Remember to make the script an executable otherwise it won't work: chmod +x update.ConfigGuess. From revision 73, this in now in the LCG repo and no action is required.
There are several tarballs that have to be amended and its recommended you get the boost, expat, qt and root tarballs located at /afs/cern.ch/work/j/jwsmith/public/Lcgcmake_Stack_ARM64.
Gaudi with CMAKE (Pre-dated(?))
This is useful, however GAUDI was incorporated into ANA and so is built with CMT. Ignore this section if you are planning to use ANA. This section could be useful in the future.
This assumes that your LCGCmake software was created using the toolchain you have named heptools-preview.cmake.
From home do
mkdir Gaudi && cd Gaudi
.
Do
-
export acmake='pwd'
-
export CMTCONFIG=armv7l-fc19-gcc48-opt
Get the files
-
GAUDISVN=svn+ssh://username@svn.cern.ch/reps/gaudi
-
svn checkout $GAUDISVN/Gaudi/trunk GAUDI_HEAD
-
cd GAUDI_HEAD
In
./toolchain.cmake
, set (heptools_version 68) to (heptools_version preview) or whatever you called your
heptools-
version previously.
Point to your lcgcmake installation:
-
cd cmake/toolchain/ ; ./make_heptools.py /home/fedora/SSD/lcgcmake-install/LCGCMT/LCGCMT-preview | tee heptools-preview.cmake
I'm still having problems with the automatic setting of environment variables. Here's a script I run to set the paths:
export CMTCONFIG=armv7l-fc19-gcc48-opt
export CMAKECONFIG=armv7l-fc19-gcc48-opt
export CMTPROJECTPATH=/home/fedora/SSD/Gaudi:/home/fedora/SSD/lcgcmake-install
export CMAKE_PREFIX_PATH=/home/fedora/SSD/Gaudi:/home/fedora/SSD/Gaudi/cmake:/home/fedora/SSD/lcgcmake-install
Files=(/home/fedora/SSD/lcgcmake-install/*/*/armv7l-fc19-gcc48-opt)
for f in "${Files[@]}"
do
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:${f}
export CMTPROJECTPATH=${CMTPROJECTPATH}:${f}
done
(This assumes your lcg software is installed in
/home/fedora/lcgcmake-install
, and your cmakeconfig is
armv7l-fc19-gcc48-opt
).
The cmake modules are meant to find the appropriate paths but it doesn't seem to work for me. This is a messy hack which might attribute to some of the failures regarding environment.
Then in the GAUDI_HEAD folder do
-
make -f Makefile-cmake.mk configure | tee configure.log
-
make -f Makefile-cmake.mk all -j4 | tee all-j4.log
-
make -f Makefile-cmake.mk test | tee test.log
There is a VTune error. VTune is purely Intel, so this also attributes to some test failures. So far, 6 tests fail (out of 37 or something).
Atlas Nightly on ARM
ANA is a framework that facilitates the building of the projects needed for a full Athena release. The code is located at
https://github.com/jwsmithers/ANA/tree/arm64. It makes use of the LCG stack (built above) and CMT (configuration management tool,
http://www.cmtsite.net/)
- There is a proceedings on it: http://jwsmith.web.cern.ch/jwsmith/PDFs/ANA_jwsmith.pdf (although this applies to the older version of the code, some things still apply).
- There is a lengthily CMT manual on the website.
- An example shows CMT at work https://atlas-tdaq-sw.web.cern.ch/atlas-tdaq-sw/cmt.html for tdaq.
CMT should have been installed with the LCG stack, make sure it's version
v1r25p20130606. If not, download and install this separately.
Now get the ANA code from github:
A very short summary on how to run it will be given here, the README's in the ANA code give more info.
In
ANA
, the Environment.sh file contains the first set of paths and parameters that need to be set. Change the necessary variables and do:
Then cd to
rel_6
and do:
This will start the build process.
ANA Tips
- tdaq-common and dqm-common need a bit more tweaking to build. Follow README instructions in
ANA
to build these individually. Note that there are patches in the patches
directory that specifically apply to these.
- Sometimes paths are not always found, not sure why. The script
ANA/rel_6/PreInstall/TempLinks.sh
serves to link some files that are not found into the respective InstallArea. Source this script once projects have been untarred, but BEFORE the BuildAtlasOffline script has been run.
- The directory
ANA/sw_extras
contains external projects that need to be built. For now, only build Geant. The tarball located there has already been patched for Atlas. To build do source Buildsw_extras.sh
--
JoshuaWyattSmith - 10 July 2015