Ubuntu, FEAP, and Virtualiza3on Jonathan Wong Lab Mee3ng 11/08/10
Mo3va3on Compiling and opera3ng FEAP requires knowledge of Unix/ Posix systems Being comfortable using command- line Naviga3ng the file system Modifying environment variables Basic knowledge about compilers Compiler flags Loca3on of required headers and libraries Understanding how to interpret compile and run3me errors (requires actual experience!) Google is some3mes useful.
Mo3va3on - Virtualiza3on What is sovware virtualiza3on? A virtual machine (VM) is a sovware implementa3on of a machine (i.e. a computer) that executes instruc3ons like a physical machine. The main advantages of system VMs are: mul3ple OS environments can co- exist on the same computer (isolated) the virtual machine can provide an instruc3on set architecture (ISA) that is somewhat different from that of the real machine applica3on provisioning, maintenance, high availability and disaster recovery [2] The main disadvantages of system VMs are: a virtual machine is less efficient than a real machine when it accesses the hardware indirectly when mul3ple VMs are concurrently running on the same physical host, each VM may exhibit a varying and unstable performance, which highly depends on the workload imposed on the system by other VMs, unless proper techniques are used for temporal isola3on among virtual machines. [hbp://en.wikipedia.org/wiki/virtual_machine]
Virtual Machines Virtualbox [Oracle/Sun] (hbp://www.virtualbox.org/) VirtualBox is a powerful x86 and AMD64/Intel64 virtualiza3on product for enterprise as well as home use. Cost : Free Cross- plagorm host opera3ng systems Ubuntu (hbp://ubuntu.com) "humanity towards others Cost : Free Popular : Desktop 50% of linux users Feature: Stability, Useability Applica3ons Extensive debian and Ubuntu repository 3 rd party binaries Compile from source
Virtual Machines Custom virtual machine of Ubuntu 10.10 (32bit) using Virtualbox FEAP requirements Being comfortable using command- line (Ubuntu) Naviga3ng the file system (Ubuntu) Modifying environment variables (Standardized VM) Basic knowledge about compilers (Standardized VM) Compiler flags Loca3on of required headers and libraries Understanding how to interpret compile and run3me errors (requires actual experience!)
VM - Example
VM - Import
VM - Import
VM - Import
VM - Start
VM - Start [user: FEAP pass:rlt]
VM - Start
VM Mul3ple / Simultaneous
VM Virtual hard disk contents Specifica3ons Minimal install (theme is ugly!) Gcc- 4.4 toolkit is installed (not including gdb) All X11 development files installed Vanilla FEAP ver83 compiled (makefile.in setup) Applica3ons Emacs (text editor) [origin: MIT] Mozilla Firefox
Unix - Introduc3on FEAP requirements Being comfortable using command- line (Ubuntu) Naviga3ng the file system (Ubuntu) Modifying environment variables (Standardized VM) Basic knowledge about compilers (Standardized VM) Compiler flags Loca3on of required headers and libraries Understanding how to interpret compile and run3me errors (requires actual experience!)
Unix - Introduc3on Being comfortable using command- line (Ubuntu) man an interface to the on- line reference manuals > man make > man which make GNU make u3lity to maintain groups of programs > make install > make clean which locate a command > which gcc
Unix Program execu3on Execu3ng programs in Unix All programs require a path (rela3ve or aboslute) Examples: > /usr/bin/xeyes > ~/Desktop/ver83/main/feap >./feap (only works if you are located in ~/Desktop/ver83/main) Why did other commands work without paths? If no path is supplied, the system will look through a series of paths set by ENVIRONMENT variables, specifically $PATH
Unix - Environment Examples: >echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/games >which which /usr/bin/which >which echo /bin/echo Environment variables: >printenv (shows current environment variables) >source <file> Executes commands from a file in the current shell >source.bashrc (sets environment variables described in.bashrc)
Unix File system naviga3on Basic commands > pwd print name of current/working directory > ls list directory contents Files that begin with. are hidden. You will not be able to see them in the graphical viewer (nau3lus), but they exist. You can s3ll access the files from a text editor such as emacs using the graphical user interface or command- line. > cd change the shell working directory cd directory shortcuts sends you back to the home directory / references the root directory. references the current directory.. references the parent directory ~ references the home directory
FEAP Compile 3me Instruc3ons are in the FEAP manual Summary 1. Set the FEAPHOME8_3 environment variable to point to wherever ver83/ folder is located in ~/.bashrc file export FEAPHOME8_3=~/Desktop/ver83 (already done in VM ignore!) 2. Modify makefile.in in FEAPHOME8_3 to point to the correct compiler and libraries (already done in VM ignore!) 3. Run make clean, then make install, in FEAPHOME8_3 (Already done, but you should run it yourself!) This must be done whenever you update the main program object files or move it to a new machine!)
FEAP - execu3on To execute FEAP, you can: 1. > $FEAPHOME8_3/main/feap 2. > cd $FEAPHOME8_3/main >./feap Finite element analysis program: Input file (contains mesh and loading instruc3ons) Read more about it in the FEAP documenta3on