Nguyen Lab Wiki

This is an old revision of the document!


Tahoe is a research-oriented platform for the development of numerical methods, finite element models, and material models. It is divided into 2 projects, the public tahoe project (Tahoe v 2.1) hosted by sourceforge and the private development project hosted by codesion. The open Tahoe project includes methods and models that have been published and implementations that have been verified. The development project contains unpublished methods and models and implementations that have not been verified and thus not yet ready for public release. Go to the tahoe project page for a user guide (incomplete), discussion forum, developer's wiki http://tahoe.sourceforge.net/

tahoe.user.pdf

Below are directions to download and install both the open and development modules and associated libraries and to update both projects using CVS. Mac OS users: you must have XQuartz and Developers' Tools installed before starting the process. XQuartz is the xwindows for mac. Execute all of your commands there instead of Terminal.

You will also need to install Fink and/or homebrew and get CVS, make, makedepend, cmake and perhaps a few additional compilers depending on the version of your OS and Xcode. Try it first. If you encounter errors, read the log files to figure out the error. If you can't, then email me the log files so that I can help you. Please do not just email me and say that you encountered an error. I need to know the specific error to help you debug.

Nguyen Lab: Please don't just do nothing or copy someone else's executable if you encounter an error. Past experience has shown that doing the latter will only create more problems and will severely hinder my ability to help you with programming, debugging etc…. Ask google, your lab mates and me for help. This is our primary computing tool and if you can't compile it you won't be getting any work done.

Installing the ACCESS Libraries - step 1

You will need to install the ACCESS libraries if you plan to use the exodus binary file format for the finite element geometry and output files. Do this before installing Tahoe.

Compiling ACCESS for Mac

Install Dependencies. These instructions are for the bash shell. If you're running a different shell, simply type bash at the prompt to work in the bash shell. Homebrew is the best way to install SEACAS dependencies on the Mac. Install Homebrew, tools and compilers:

$ ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)”

Add the homebrew/bin directory to your path in your .chsrc or .bashrc files. Then source the files or log out and log back in for it to take effect. Otherwise your shell won't be able find the executables like install. You will also have to do this for the /sw directory if you're using fink instead of homebrew,.

  • $ brew install git
  • $ brew install cmake
  • $ brew install gcc
  • $ brew install wget

Download SEACAS source code from git repository:

Download and build HDF5

Go to http://www.hdfgroup.org/HDF5/release/obtainsrc.html and download latest source code. The latest version as of this date is 5-1.10.5. There may be later versions by the time you get to install. If so, change all of the 5-1.10.5 to the latest version number.

Direct link: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.bz2

Extract to seacas/TPL/hdf5. (If you get error in ./configurem, check that you have two hyphens)

Download and Build NetCDF

Go to http://www.unidata.ucar.edu/downloads/netcdf/index.jsp and download latest source code. The latest version as of this date is 4.5.0. There may be later versions by the time you get to install. If so, change all of the 4.5.0 to the latest version number.

Build the library

Note that the configure script for the hdf5-1.10.1 distribution (latest version as of this edit) does not set the installation directory for the lib and include directories to $ACCESS as specified by the –prefix=($ACCESS) option (see build instruction for hdf5). This is a bug. Therefore, we have to define a H5DIR directory.

$ export H5DIR=“$ACCESS/TPL/hdf5/hdf5-1.10.1/hdf5” $ (export CFLAGS=“$CFLAGS -I${H5DIR}/include”; export LDFLAGS=“$LDFLAGS -L${H5DIR}/lib”; ./configure –enable-netcdf-4 –enable-shared –disable-fsync –prefix ${ACCESS} –disable-dap –disable-cdmremote)

If future distributions of hdf5 does indeed place the lib and include directors in $ACCESS then remove the comments (##) and run the commands below instead of the alternatives above. To check, (cd $ACCESS/lib; ls -al;) If you don't see libhdf5* then check $ACCESS/hdf5/hdf5-[latest-version]/hdf5/lib.

##$ (export CFLAGS=“$CFLAGS -I${ACCESS}/include”; export LDFLAGS=“$LDFLAGS -L${ACCESS}/lib”; ./configure –enable-netcdf-4 –enable-shared –disable-fsync –prefix=${ACCESS} –disable-dap –disable-cdmremote)

$ make && make install

Download and Build MatIO

Build SEACAS with Exodus (Tahoe Dependency) $ cd $ACCESS $ mkdir build

$ mkdir build

$ cd build Change the flag for the directory for hdf5 include and lib

$ vi ../cmake-exodus

cd Modify the following line

-D HDF5_ROOT:PATH=${H5DIR} \ $ ../cmake-exodus $ make

$ make install

Installing TAHOE - MAC

1) A few preliminaries

Set your $ACCESS shell variable to the seacas directory. You can do this in your ~/.cshrc or ~/.bashrc file then source the files or log out and log back in. Also, set the CVS_RSH to ssh and the DYLD_LIBRARY_PATH to $ACCESS/lib the same way. If you don't have cvs, then install using fink or homebrew.

If you're using the tcsh shell, include the following in your ~/.cshrc file

  • setenv CVS_RSH ssh
  • setenv ACCESS [path to seacas]/seacas
  • setenv DYLD_LIBRARY_PATH $ACCESS/lib

If you're using the bash shell, write this in your ~/.bashrc file

  • export CVS_RSH=ssh
  • export ACCESS=[path to seacas]/seacas
  • export DYLD_LIBRARY_PATH=$ACCESS/lib

To set these variables, log back in and log back out. If you don't want to do that, then type source ~/.cshrc (or source ~`/.bashrc) in your current window. These variables will be defined for that window only.

  • $ cd $ACCESS
  • $ ln -s include/ inc
  • $ cd lib
  • $ ln -s libexodus.dylib libexoIIv2c.dylib
  • $ ln -s libexodus.a libexoIIv2c.a

1) You can download TAHOE from sourceforge as an anonymous user, who will only have read privileges, or as a developer, who will have read and write privileges and can modify the code in the repository. If you think you will be a developer, register for a username and password on sourceforge.net and send me your username so I can give you write privileges.

2) If you plan on installing the development project, you will need a developer's account. Email me ([email protected]) your source forge username, and I will create for you an account on codesion and add you to the Tahoe project. Wait for an email with your codesion password before going ton to step 3.

3) Download TAHOE from sourceforge.net (http://sourceforge.net/projects/tahoe/)

Direct link: http://downloads.sourceforge.net/project/tahoe/tahoe-install/tahoe-install%201.2/tahoe-install.tar.gz

4) $ tar xpfv tahoe-install.tar.gz

You will obtain two files after unzipping the folder downloaded in step 3: ReadMe and tahoe-manager

5) tahoe-manager is a perl script that manages the build options. The text ReadMe file contains instructions and runtime options for tahoe-manager. If you don't have perl, then install it using homebrew ($ brew install perl) or Fink.

6) Run tahoe-manager on command prompt:

  • $ cd tahoe-install
  • $ ./tahoe-manager

running tahoe-manager script at Mon Apr 5

17:06:46 2010

*

creating default config file ./.tahoe_config

*

found CVS_RSH env var, using cvs connection

Sourceforge server username [anonymous]:

7) Enter your sourceforge username (developer) or hit return to download as anonymous.

8) Enter your codesion username (tahoe.username). Hit return if you don't have a codehsion account. 9) Setup the configuration options in the building process.

  • Macros are shell script for plat-form specific compiling and linking option.
    • select: DARWIN-GCC4.X for fast execution on a Mac or DARWIN-GCC4.debug for execution with additional error checks for debugging on a mac.
    • select yes to: do you want this to be the default architecture for all modules?
  • Tahoe is installed with the following default modules:
    • macros - shell scripts for compiling and linking
    • expat - code to create and read XML inputs
    • toolbox - data structures, advance math functions, data I/O, MPI communication
    • tahoe - main.cpp, shape functions, boundary controllers, element models, and material models.
  • You will need to install additional optional modules
    • select: benchmark_XML, contrib (utility scripts and programs), f2c (fortran to C translator), and
    • spooles (Linear solver)
    • select access if you want to use the exodus binary file formate
    • select development and development_benchmark_xml if you plan to install the development module.
    • select metis and spoolesMPI if you plan to compile Tahoe for parallel execution.
    • the remaining modules are libraries for solving linear systems.

10) At this point, tahoe-manager will checkout each module from sourceforge and codehsion using cvs. You will need to type your sourceforge password many time, one for each module except the development modules, and your codesion password for the development and development_benchmark_XML modules. The script ends when all the modules are successfully downloaded.

11) Build Tahoe by typing tahoe-manager build.

12) After successful build, an executable file called tahoe will appear in tahoe-install/bin. If you received errors during the build, try looking at the build.log or init.log files for the affected modules to figure out the problem. You can also build each module separately using Make (see Building Tahoe Using Make section below). 13) Add the tahoe-install/bin directory to your path to either your .bashrc using “export path” or .cshrc using “set path” command.

Installing Tahoe for Linux Ubuntu

1. You can install some libraries that you might need in order to install Tahoe on your Linux system by downloading “Install-tahoe-pre.sh” from:

install-tahoe-pre.sh

Make the file executable and execute the shell script:

* $chmod +x Install-tahoe-pre.sh

  * $./Install-tahoe-pre.sh 

Note: In the process of the installation of some the libraries, you might need to press enter.

Note: This script was tested on ubuntu-12.04.3 32 bit

Note: You can change to tcsh by this command: chsh -s /bin/tcsh

2. Go to the seacas github and install seacas following the instruction: https://github.com/gsjaardema/seacas.

3. Download and compile tahoe. The procedure should be the same as in MAC.

Installing Tahoe for MARCC

**Assuming what need in Tahoe serials compiling has been established.

1) load the module required for Tahoe parallel compile on MARCC (gcc, MARCC, cmake)

  module load MARCC
  module load gcc
  module load cmake
  • These can be added into the .bashrc (for bash shell) file

2) download the tahoe-install directory

  cvs -d [email protected]:/cvsroot/tahoe checkout tahoe-install
  

3) configure tahoe for build:

  cd tahoe-install
 ./tahoe-manager config
 enter Sourceforge "username"
 enter Cloudforge "tahoe.username"
 enter your password for Sourceforge or Cloudforge when prompted (if you don't have ssh key pairs setup)
 default build architecture number: ?   choose 112 (for openmpi on linux)
                                                            * you chose : RedHat.OpenMPI
 do want this to be the default architecture for all modules (y/n) [y]: 
                                                            * default modules : macros expat toolbox tahoe
 do want to add optional modules (y/n) [n]: y
 Choice or modules to toggle (applied left to right): 0 6 7 10 11 13 14 15 16 (turn on CBLAS access aztec contrib development f2c metis spooles spoolesMPI) 

4) Build Tahoe

./tahoe-manager build

After installation, If you get the following error when running Tahoe : error while loading shared libraries: libnetcdf.so.11: cannot open shared object file: No such file or directory. Then add “export LD_LIBRARY_PATH=/XXX/lib” (replace XXX with the directory of ACCESS, e.g. LD_LIBRARY_PATH=/home-2/[email protected]/seacas/lib) into the .bashrc file and restart the bash.

Tips: 1. When running parallel, make sure to use commad: $ mpirun -np number_of_cores tahoe -f. Using tahoe -f will run program in serial.

2. When running parallel, make sure that you choose SPOOLES under solver

3. MARCC underwent a change in compiler, if your tahoe does not compile, connect Zheliang Wang ([email protected]) for an updated zip file of tahoe.

4. For more information, see tahoe user manual.

Building Tahoe using Make

The Tahoe project is built using Make. Each module contains a makefile containing the build options and configurations for each module is.

1) To create a makefile for a module (e.g. tahoe), cd to the directory associated with the module (e.g. full_path_to_tahoe-install/tahoe) and cp makefile.template to makefile. Add the HOME_DIR for the module (e.g., full_path_to_tahoe-install/tahoe), the build architecture (e.g., DARWIN-GCC4.X). Uncomment modules that you want to link to in the build options (e.g. access).

2) Type make help to get all targets. For example targets for the tahoe module are:

  • init - (re-)initialize headers and file dependencies
  • build - (re-)build binaries
  • objects - (re-)compile object file, but don't link
  • clean - remove object files and build temporaries
  • help - display this list
  • additional targets for configuration:
  • clean_config - remove config files in src/config
  • update_config - update config files in src/config
  • additional targets for (un-)installing optional modules:
  • touch_spooles - sparse, direct solver library
  • touch_SuperLU - sparse, direct solver library
  • touch_Aztec - sparse, iterative solver library
  • touch_f2c - f2c support
  • touch_SEACAS - Sandia tools
  • touch_MPI - support for parallel execution
  • touch_METIS - domain decomposition using METIS
  • touch_qhull - computational geometry using qhull
  • touch_NOX - NOX nonlinear solver library
  • touch_fossum - geomaterial development module
  • touch_expat - XML parsing
  • touch_SIMOD - Shared Interface MODels libraries

3) Each module can be built individually with make init build -s. Initialize and build the toolbox and libraries before the tahoe directory.

4)Resources/instructions for Make

GNU Make

Free Software Foundation

Using SVN

SVN Subversion is an open source version control system used to manage the collaborative development of Tahoe. Browse through the tahoe svn repositories to see previous versions and track difference between versions.

The svn repository for the public tahoe project: https://sourceforge.net/p/tahoe/codesvn/HEAD/tree/

The svn repository for the development project: https://sourceforge.net/p/tahoe/codesvn_dev/HEAD/tree/

The svn repository for the development project benchmark: https://sourceforge.net/p/tahoe/codesvn_dev_bench/HEAD/tree/

A tutorial to svn: http://svnbook.red-bean.com/

key commands : commit, update, checkout

Creating Tahoe input files

1) Tahoe uses XML files as input files. There are many XML editors available for purchase and free download from the web. A common one used in the lab is the no-frills GUI XAmple editor.

Installing Xample XML editor on a mac

Xample is probably the best open source xml editor. It allows you to easily use load custom xml schemas (.xsd files), inform you of all the possible inputs for lists and sublists, and allows for easy adding and removing of nodes. Unfortunately, Xample is no longer supported by its original creator, which means it will not run on the latest java version. The last java version compatible that Xample ran on was version 8 (1.8.0_91). If you do not have version 8, you must install it. The easiest way to do this is to use homebrew.

  • $ brew install cask
  • $ brew cask install java8

check the paths of the versions installed:

  • $ /usr/libexec java_home -V

You should see something like this:

  • 9.0.1, x86_64: “Java SE 9.0.1” /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
  • 1.8.0_91, x86_64: “Java SE 8” /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home

Alternately, download the following disk image for v8 and try installing it yourself without brew

jre-8u151-macosx-x64.dmg

Download the following distribution of Xample

xample.tar

untar: tar -xvf xample.tar

If you're using csh or tcsh, you will execute Xample using the run-xample.csh script, but first you will need to set a few variables. open the the run-xample.csh script and add the following after “#!/bin/csh -f ”

1) setenv JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home

2) set JAVA = /usr/bin/java

3) set xampledir = [Full path to Xample]/XAmple-distr You can run Xample by running the script in the X-window.

Next, create the xml schema by typing tahoe -xsd (to create file tahoe.xsd). 3) Open tahoe.xsd in Xample. 4) At this point, you can create an .xml input file from scratch or open and edit an existing .xml input file (for example using a benchmark).

Install jedit

Another good open source xml editor is jedit. I allows you to load custom .xsd or .dtd xml schema and has a tree view of the inputs as well as a table of allowable inputs for each sublist. It's still not as convenient as Xample, but it is an actively supported application that runs on the latest version of java.

To install jedit, download the installation package for your platform from: http://www.jedit.org/index.php?page=download Install according to the directions on the website. For mac, you may have to run the application from the command line using the latest version of java.

% java -jar [full path to jEdit]/jEdit.app/Contents/Java jedit.jar

Next, install the xml pluggin. You can do this in the application's pull down menu Plugins → Plugin Manager and check the boxes for XML, XercesPlugin, and SideKick. To downloading and install the plug ins manually, follow the instructions at http://plugins.jedit.org/ .

When you open an existing tahoe ,xml file or create a new one, you have to associate either the tahoe.xsd or tahoe.dtd schema with it. To do so got to Plugins → Set Schema Type and choose between XSD or DTD. Next go to Plugins → Set Schema. The sidekick window will now show you a tree view of all of your lists and sublists of the input file. You can dock the sidekick window by clicking on the down arrow at the top of the window. To insert a new field, scroll to the line that you want to insert something in, then go to Plugins → XML Insert. This will create another window of all the input fields allowed for that list item. You can also dock this window in the main window by clicking on the down arrow at the top of the menu.

Benchmark examples

All benchmark examples reside in tahoe-install/benchmark_XML and are organized as follow:

  • level.0 - element formulations (e.g., elastodynamic, elastostatic, diffusion, adhesion, etc..)
  • level.1 - material formulations for solid and cohesive elements; stress smoothing algorithms
  • level.2 - boundary controllers and conditions, contact
  • level.3 - parallel execution

Running Tahoe

1) Run interactively by typing tahoe at the command line. You'll be prompted to enter the input file path or option.

2) Run tahoe with command line options (tahoe [-option]):

  • f [input_file.xml] executes tahoe with the specified input file.
  • xsd generates the xml template tahoe.xsd file.
  • dtd generates the xml template tahoe.dtd file
  • verbose executes tahoe with verbose message logs
  • decomp decomposes geometry file for parallel execution
  • join joins output files for parallel execution

3) Run tahoe batch processes

create a text file with @ in first line. List the input files in subsequent lines. Dowload example:

run.batch

Adding users and permissions Add user to sourceforge and cloudforge repositories. For sourceforge:

In the tahoe directory, checkout CVSROOT

  • cd CVSROOT
  • vi avail
  • Add the username to the avail file
  • cvs commit
DokuWiki CC Attribution-Share Alike 4.0 International