Manual compilation of Tephra2
11 Dec 2017tephraprob
tephra2
troubleshoot
codes
tips
TephraProb compiles Tephra2 through a bit of Matlab hocus pocus to facilitate problems of OS dependancy, but the mighty Matlab can sometime fail us. In this case, it becomes necessary to manually compile Tephra2 from the command line to see what the error message is. I spent a fair amount of time writing this procedure in emails to people who encountered problems and I thought I would write it down here.
Just to clarify things, compiling is the process of transforming files containing lines of code into a program that can be executed by the user. The whole compilation process depends on such aspects as the computer’s architecture or OS, so it needs to be performed on each computer separately. Again, most of the time everything should be taken care of smoothly within TephraProb, but just in case…
Unix for non-nerds
This process requires to access Tephra2 through the command line (Terminal on Unix, Cygwin Terminal on Windows). Here are some tips on how to use it.
Navigating through folders
The main command to navigate through folders is
Where to go?
Another useful command is
Locating Tephra2
The Tephra2 executable (tephra2-2012 on Unix, tephra2-2012.exe on Windows) should be located in the
On Windows/Cygwin, things are slightly different. Let’s assume that TephraProb is located in
Manual compilation
Once in the
Hopefully, that should result in the last line printed to the command line being:
There might be warnings, but these should be ok.
Common errors
Here, I will try and list common errors that have been encountered.
File format not recognised
This error was encountered on Cygwin:
This was solved by entering in the
Manual Tephra2 run
If the compilation worked, the Tephra2 executable should now be located in the folder
You now have to specify all input files including:
- A configuration file, typically a
.conf file located somewhere inTephraProb/RUNS/runName/runNumber/CONF/ - A grid file, typically a
.utm file located inTephraProb/GRID/gridName/ - A wind file, typically a
.gen file located inTephraProb/WIND/windName/ - A grain-size distribution file, typically a
.gsd file located somewhere inTephraProb/RUNS/runName/runNumber/GS/
You can either specify the full path to these files or copy them in the same folder as the Tephra2 executable, in which case Tephra2 can be run by typing:
Note that the last argument
Common errors
Permission denied
If a
Other problems
I am trying to build a database of common problems faced by TephraProb / Tephra2 users. Contact me (if you haven’t already done it) and we will post the answer here for other people.