Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running on Ubuntu as-is #1

Open
mikebentley15 opened this issue Feb 14, 2020 · 2 comments
Open

Problem running on Ubuntu as-is #1

mikebentley15 opened this issue Feb 14, 2020 · 2 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@mikebentley15
Copy link
Contributor

The instructions are fine for the intended initial environment of an AWS instance where everything was setup for you. But, when trying to run these examples on an Ubuntu machine not setup at all, the instructions are not sufficient.

@mikebentley15 mikebentley15 added bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 14, 2020
@mikebentley15
Copy link
Contributor Author

FLiT tutorial run-through

Here are my notes getting this working while sitting with John Jacobson.

Doing inside of a docker container running Ubuntu 18.04

Here are the things that were installed and the things done.

Dependencies

FLiT dependencies:

sudo apt install \
  bash \
  binutils \
  build-essential \
  coreutils \
  git \
  hostname \
  python3
sudo apt install \
  python3-toml \
  python3-pyelftools

We probably need to link to the installation instruction of FLiT from the
flit_tutorial

Tutorial dependencies

apt install \
  wget \
  mpich

Here, we are using mpich, but we could just have as easily used openmpi.
It's your choice. But some implementation of MPI needs to be installed
(specifically, we need the executables mpicc, mpic++, and mpirun)

Install FLiT

git clone https://github.com/PRUNERS/FLiT.git
cd FLiT
sudo make install

Developer tools

apt install vim screen sudo

Getting The Tutorial Examples Working

If you look in the flit-config.toml files, you will see that the compilers
specified are g++-7 and clang++-6.0. This is not to be hard-coded, but
rather to generate the results expected by the tutorial. If you change to a
different compiler, your results may vary.

If you want to use a different compiler, then please change the line saying
binary = 'g++-7' and binary = 'clang++-6.0' to whichever versions of GCC
and Clang you want.

Removing sequential build stuff

In many places in the tutorial, you will see make -j1. This is not because we cannot do a parallel build. It is there because of the initial target audience using shared pre-setup AWS instances. Since they were shared, we did everything sequentially so that we wouldn't have too many processes stepping on each other on these shared machines.

Naturally, when running locally, you can employ more parallelism. Here is what I did to get rid of some lack of parallelism

git clone https://github.com/PRUNERS/flit_tutorial.git
cd flit_tutorial
sed -i -e 's/-j1//g' $(git grep -l -- "-j1")

Now you can set parallelization to whatever you want. For example, if you want to run 20 things in parallel, then you can do the following:

export MAKEFLAGS=-j20

Running All Steps

To test things, I usually run all steps. But because I'm not patient, I do it programmatically in the terminal.

for file in exercise-*/step*.sh; do
  cd $(dirname $file)
  echo
  read -p "Press ENTER to run $file"
  echo
  ./$(basename $file)
  echo
  cd ..
done

@mikebentley15
Copy link
Contributor Author

@JohnJacobsonIII My notes are above. Will you please update the documentation for this tutorial accordingly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants