Project

General

Profile

Actions

Preparing a Linux machine for Bilder » History » Revision 51

« Previous | Revision 51/86 (diff) | Next »
Nathan Neri, 02/26/2019 09:03 AM
Adding VisIt specific arguments for installation configuration.


Preparing a Linux machine for Bilder

If all you need is python and sphinx (e.g., for builds of documentation), then you need only

  • CMake (probably present)
  • Python (probably present)
  • Python-dev or Python-devel (on Fedora)
  • Latex as installed below

and then you can add the arguments, -W python,cmake, and your installed Python and CMake will be used if your path is correct.

Java

At least one package (Babel) needs Oracle's java, so we recommend installing it.

GCC

It is often useful to get a newer gcc that has mmintrinsics. This may break compatibility with some versions of CUDA .

Below are the instructions for building gcc-6.4.0. (As of this writing 6.4 is the latest compiler to work with CUDA-9.1, and gcc-5.3.1 will not build QT-5.10.0)

Make sure 32bit glibc-devel is installed

Do the applicable of

yum -y install glibc-devel.i686
dnf -y install glibc-devel.i686
zypper install glibc-devel-32bit  (SLES 11 SP3)

Get and unpack the source package

export GCCVER=6.4.0
wget ftp://ftp.gnu.org/gnu/gcc/gcc-${GCCVER}/gcc-${GCCVER}.tar.xz
tar xf gcc-${GCCVER}.tar.xz && cd gcc-${GCCVER}

Patch as needed

If your system has glibc 2.26 or later, you will need to fix the source by making the changes specified in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=72edc2c02f8b4768ad660f46a1c7e2400c0a8e06 and also

for i in libgcc/config/*/linux-unwind.h; do
  if grep -q "struct ucontext" $i; then
    sed -i.bak 's/struct ucontext/ucontext_t/' $i
  fi
done

Build

Define CONTRIB_DIR to be your tarball installation directory, e.g.,

export CONTRIB_DIR=/contrib

Usually CONTRIB_DIR=/contrib, but if one does not have root access, one has to put this in a user area. If one does have root access, one should execute the following commands:

mkdir /internal /contrib /volatile
chmod 775 /internal /contrib /volatile

Unpack gcc, go into the gcc source directory, and build according to the instructions below.

gcc:

./contrib/download_prerequisites
mkdir build && cd build
../configure --prefix=$CONTRIB_DIR/gcc-${GCCVER} --enable-languages=c,c++,fortran --with-pic
env LD_RUN_PATH=$CONTRIB_DIR/gcc-${GCCVER}/lib64 make -j 4
make install
# Alias as desired.
mkdir -p $CONTRIB_DIR/bin && cd $CONTRIB_DIR/bin
ln -s $CONTRIB_DIR/gcc-${GCCVER}/bin/{c,g}* .

Fix permissions

chmod -R g+rwX $CONTRIB_DIR/gcc-${GCCVER}
chmod -R o+rX $CONTRIB_DIR/gcc-${GCCVER}
find $CONTRIB_DIR/gcc-${GCCVER} -type d -exec chmod g+rs '{}' \;

Java

Install Oracle's Java.

Once it is installed, you will need to modify your path to include /usr/java/default/bin before /usr/bin or use the alternatives package:

for i in java jar javac; do
  alternatives --install /usr/bin/$i j$i /usr/java/jdk1.6.0_16/bin/$i 3
done
alternatives --config java # Pick 3

On SLES , Install using the tar package from Oracle, then change into the installation directory

for i in java jar javac; do
  /usr/sbin/update-alternatives --install /usr/bin/$i $i <installation directory>/bin/$i 3
done

where is the absolute path to where Java was just installed

Version control systems

Make sure git, mercurial, and subversion are all installed.

For building VisIt, install git large file storage: https://git-lfs.github.com/
(download the tarball, unpack, and run the install script)

Afterwards, configure the skip-smudge option:

git lfs install --force --skip-smudge

LaTeX

LaTeX is needed for building documentation using Sphinx.

Bilder prefers the texlive-latex package. For gui usage, see texworks: http://www.tug.org/texworks

If you cannot install in the system area, you can download

wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xzf install-tl-unx.tar.gz
cd install-tl-20150411 (date might be different)
./install-tl -no-gui

This is now interactive, so set

  • Set scheme to basic
    ** To do this type 'S' and hit enter.
    ** Then enter 'd' to set the scheme to basic.
    ** Type 'R' and hit enter to return to the main configuration page.

  • Set TEXDIR = $CONTRIB_DIR/texlive
    ** Start by typing 'D' and hit enter.
    ** Then enter '1' to change TEXDIR.
    ** Type $CONTRIB_DIR/texlive and hit return.
    ** To return to configuration type 'R' and return.

  • Set page size to Letter size
    ** Type 'O' and hit enter.
    ** Enter 'P'
    ** Return to main menu by typing 'R' and enter.

  • Install
    ** Type 'I' and hit enter to install.

  • Put your texlive in your PATH.
    ** Edit you bashrc (vim ~/.bashrc)
    ** Add "export PATH=$PATH:<$CONTRIB_DIR>/texlive/bin/x86_64-linux/" (enter the full CONTRIB_DIR value)
    ** Exit and save. Then source ~/.bashrc.

To ensure you are using the correct texlive installation type "which pdflatex" and make sure it
the one in $CONTRIB_DIR/texlive/bin/x86_64-linux/. If it is not the correct pdflatex, you may
have to remove the system version (sudo yum remove texlive).

and then install the packages noted at

LaTeX packages needed by Bilder

Additional packages

Other parts of the toolchain introduce other package requirements. Below are the initial lists.

Fedora

The following packages (cut and paste after dnf install or yum install) are needed for Fedora, Redhat, CentOS

bc bison glib2-devel imake lapack-devel libblas-devel libcurl-devel libxml2-devel openssl-devel patch redhat-lsb zlib-devel

For more recent versions of Fedora, you will need.

egl-wayland mesa-libEGL-devel redhat-rpm-config

For centos7 you will also need.

imake

Ubuntu

The following packages are needed for Ubuntu

ace-netsvcs
bc
bison
flex
gfortran
graphviz
libblas-dev
libfreetype6-dev
libgl1-mesa-dev
libglu1-mesa-dev
libgraphviz-dev
liblapack-dev
libntlm0
libpng-dev
libxext-dev
libxrender-dev
libxtst-dev
libzzip-dev
mailutils
python2.7
python2.7-dev
zlib1g-dev
  • You will probably want a lightweight command line editor other than gedit, so "sudo apt-get install vim" or "sudo apt-get install emacs"
  • zlib-dev doesn't exist on ubuntu 16.04 - use zlib1g-dev instead.

mailutils is necessary for configuring the system for jenkins.
You'll be offered to choose:

  • Internet site
  • Internet with smarthost
  • Satellite system
  • Local only

Internet with smarthost is recommended.

The use of the following commands are helpful. To search for an available package dealing with a keyword, use:

$ sudo apt-cache search keyword

To install a particular package, use:

$ sudo apt-get install libblah-dev

Note: that development packages names typically end with "dev" not "devel" as in other flavors of linux.

Suse Linux Enterprise Server (SLES)

The following packages (in cut/paste for zypper form) are needed on SLES

bc bison blas-devel blas-devel-static libblas3 flex freetype2-devel
gcc gcc-32bit gcc-fortran git glibc-devel glibc-devel-32bit
graphviz graphviz-devel libbz2-devel lapack-devel lapack-devel-static liblapack3 libpng-devel libssh-devel libxml2-devel
mailx mercurial Mesa-devel python-devel
xorg-x11-devel xorg-x11-libXext-devel xorg-x11-libXrender-devel xorg-x11-libs zlib-devel

The following are needed to build subversion

libapr-util1 libapr1 libneon27

To get blas-devel, blas-devel-static and lapack-devel, lapack-devel-static on SLES 11 SP3 , add the Science repository

zypper addrepo http://download.opensuse.org/repositories/science/SLE_11_SP3/science.repo
zypper refresh
zypper install blas-devel blas-devel-static lapack-devel lapack-devel-static

Qt Prerequisites

Qt-5 must be built with QtWebEngine, which particularly introduces requirements for other packages as noted at

Each of the above websites appears to have made assumptions about what is already installed, so as one encounters more workstations, one is likely to find yet another package missing. This is our list so far.

Fedora

sudo yum install alsa-lib-devel bison cups-devel dbus-devel flex fontconfig-devel gperf libicu-devel
sudo yum install libcap-devel libgcrypt-devel libgcrypt libgudev1-devel libsndfile-devel libwebp-devel
sudo yum install libXcomposite-devel libXcursor-devel libXi-devel libXrandr-devel libxslt-devel libXtst-devel
sudo yum install mesa-libEGL-devel nss-devel opus-devel pciutils-devel pulseaudio-libs-devel re2c ruby systemd-devel

Vendor-specific version of graphics driver

If you are preparing a Linux machine for the VisIt Visualization package, the vendor-specific graphics driver for your graphics card should be installed.

By default, a generic graphics driver is installed. On Fedora, the generic driver is "nouveau".

To determine if the nouveau driver is installed on your system, enter the command

lsmod | grep nouv

You will need to download and install the appropriate driver from your graphics card vendor. This generally uninstalls the nouveau drivers.

NVIDIA CUDA Toolkit

If you have a compatible GPU and wish to compile with nvcc code, you must first install the CUDA Toolkit. The linux installation page is

https://developer.nvidia.com/cuda-toolkit-70

Download the applicable file. Your Linux distribution may or may not be natively supported for version 7.0. You may alternatively use version 7.5 if supported or an older version if necessary. As an example, we will include the steps known to work for Fedora 22. On Fedora 22, download the Fedora 21 Local RPM package.

cd <location of download>
sudo rpm -i cuda-repo-fedora21-7-0-local-7.0-28.x86_64.rpm   #<or whatever file you downloaded> 
sudo dnf install cuda

Different Linux distributions will have different package handlers (here we use dnf, ubuntu has apt-get, fedora < 22 uses yum). You should now have the directory /usr/local/cuda-7.0. Add /usr/local/cuda-7.0/bin to your path. To ensure you have gotten the necessary components, type:

which nvcc

The output should be /usr/local/cuda-7.0/bin/nvcc. This will allow bilder to build GPU c++ code.

IMPORTANT NOTE: CUDA versions only support particular GCC versions, and the latest GCC may not support your CUDA. See this wiki page for details

Updated by Nathan Neri over 5 years ago · 51 revisions