WOLFSIM:InstallFrom OLEG
NOTE: RELOCATIONThese are for an outdated version of wolfsim, but will remain here for users that wish to continue using that version. The new versions installation instructions are here: Navigation
PreambleThe new version of WOLFSIM prefers to use HDF5 (but not required), which is a file format for scientific data. The basic procedure for installation is as follows:
You can find the complete instructions and download all requiredpackages for HDF5 at the following website: http://hdf.ncsa.uiuc.edu/HDF5/release/obtain5.html Why bother? If you don't want to spend time to learn HDF5,you still have the version of WOLFSIM with all new features but without HDF5.For the version without HDF5, go to Section 2 (skip Section 1).However, it might be a good chance to learn one of the most advanced scientific data formats.
HDF5 Installation (recommended)Acquiring HDF5 FilesFor most systems (Windows, PowerPC-based Macintosh,Linux, Sun), there are three steps to install HDF5 as follows (following theinstructions from the HDF5 website):
For Intel-based Macintosh computers, you must buildand install the HDF5 from the source package, not binaries. While it is possible to install itmanually using Terminal commands, it is easiest to do the following:
(optional) Verify HDF5 Application CompileOnce you complete the HDF5 installation, we recommend you totest one of the sample codes (e.g. h5write.c) within the HDF5 directory beforecompiling WOLFSIM. This willverify that HDF5 is installed correctly. The HDF5 package provides the h5cc(C), h5c++(C++), h5fc(F90) utilitiesfor compiling applications. Beforeyou compile your codes, you must first
After the above steps, you are ready to compile. The example script for gcc compiler onMac: >> h5cc -o h5write h5write.c
Install HDFViewTo visualize HDF5 data (apart from using Matlab or othersoftware), you need HDFView. For most systems (Windows, PowerPC-based Macintosh, Linux, Sun), you canobtain the current version of HDFView from the following website: http://hdf.ncsa.uiuc.edu/hdf-java-html/hdfview/ For Intel-based Macintosh computers, a beta versionof HDFView is available from ftp://ftp.hdfgroup.org/HDF5/hdf-java24-beta/hdfview/ and download hdfview_install_macosx_intel_novm.zip
Using MatlabWe often find that Matlab is useful for post-processing(i.e., generating figures). Thereis a built-in function of Matlab to read HDF5 data – hdf5read(filename,datasetname). We provide a sample M-code HDF5_Read.mto read all the data from Result.h5. This M-code stores the data in a single structure array (Result) and savesa Matlab data file Result.mat in the same directory.
Download WOLFSIM and WOLFSIM_GUIIf you have not already done so, download the WOLFSIM andWOLFSIM_GUI archives from the download page: http://www.ece.ncsu.edu/oleg/wolfsim_download.html
Compile WOLFSIMIf HDF5 and your C/C++ compiler are installed correctly, youare ready to compile the WOLFSIM.
>> h5cc -o wolfsim WOLFSIM.c For the version without HDF5, >> gcc -o wolfsim WOLFSIM.c On many systems, the following compile command leads to an optimized executablethat will run faster simulations. As background for this, we note that in GCC4.0, "-fast" is amagic optimization flag, which enables many other options including"-floop-optimize". SinceWOLFSIM includes a large number of loops, "-floop-optimize" willimprove the performance. In addition, GCC4.0 provides auto vectorization and itcan be enabled by "-ftree-vectorize". Therefore, the following command is particularly effectiveon dual processor Alti-Vec systems (e.g. Apple PowerMac Dual G5): >> h5cc -fast -ftree-vectorize -o wolfsimWOLFSIM.c For the version without HDF5, >> gcc -fast -ftree-vectorize -o wolfsim WOLFSIM.c
Running WOLFSIMTo run a simulation, you must have Input.txt file in thesame directory as the WOLFSIM executable (named wolfsim in the abovesteps). For the initial test, youmay use the default Input.txt file and use the following command to run WOLFSIMin the same directory: >> ./wolfsim
The New User Interface WOLFSIM_GUINew in this version of WOLFSIM is a Graphical User Interface(GUI) written in Java. This allows for easy model definition and simulationsetup.
The first Tab (About) includes brief descriptions for options of the other Tabs. |
