...
- Familiarity with Linux, git, make
- Strong working knowledge of C++ in application development and using STL. No experience using OpenGL or 3D rendering is required.
- Working knowledge of Python, matplotlib
Helpful Material (though none is required for the exercise):
- Nano tutorial
- VisIt Python user guide and tutorial
- unofficial Docker overview
Prerequisites
Setup
Install Docker using either your package mananger (eg sudo apt-get install docker.io
on Ubuntu / Debian) or following the instructions on https://docs.docker.com/get-docker/ . Alternatively, you can try and directly install VisIt, demo code and the required packages onto your system (Linux will likely be the only one you succeed), by following what the Dockerfile does.
...
Code Block |
---|
sudo docker pull rhaas/spin2023:20230111v0 sudo docker create --name spin2023 rhaas/spin2023:20230111v0 |
Check your setup
Make sure that you can run VisIt in the container by first starting the container:
...
and that the image data.png looks like this:
Close down docker
Finally stop the container
Code Block |
---|
sudo docker stop spin2023 |
Exercise
- Log into Start and log in to the container as above
- Edit and edit the file
XYV/avtXYVFileFormat.C
such that instead of using space separated files like indata.xyv
it accepts comma separated filesdata2.xyv
. - There are
vim
,emacs
, andnano
editors present. If you are unfamiliar with all of then,nano
will be the easiest one to use since it shows all commands at the bottom of the screen. - Once you are done editing, recompile the code using
make
. - Then run the script
plot_XYV2.py
to produce (if all goes well)data2.png
- Finally copy
avtXYVFileFormat.C
anddata2.png
ouf the container and send me (rhaas@illinois.edu) both of them as an attachment in an email. - The file
avtXYVFileFormat-sol.C
contains the final solution (a 3 character change). You produced image file should look like this:
Commands required
...
Code Block |
---|
sudo docker start spin2023 sudo docker exec -ti spin2023 /bin/bash -i cd XYV nano avtXYVFileFormat.C make /home/visit/visit3_3_1.linux-x86_64/bin/visit -cli -nowin -s plot_XYV2.py sudo docker cp spin2023:/home/visit/XYV/data2.png ./data2.png sudo docker cp spin2023:/home/visit/XYV/avtXYVFileFormat.C ./avtXYVFileFormat.C sudo docker stop spin2023 |
Cleaning up
You can remove the docker image and container using:
...