For instance on Ubuntu, use
sudo apt-get install mercurial bison flex libfl-dev patch zlib1g-dev libjpeg62 libjpeg62-dev libxi-dev gfortran g++ gnuplot paraview autoconf
to add the packages that are missing in a standard desktop installation.
For instance on Fedora, activate the following packages
autoconf, automake, binutils, gawk, gcc, g++, gfortran, glibc-devel, gnuplot, make, python, python-devel, Berkeley yacc, flex
and for parallel program development
openmpi, openmpi-devel, openmpi-libs
After verifying your installation, the following UNIX commands should be available on the machine:
gcc, g++, ld, ar, ranlib gfortran or f77 or g77 make python, awk yacc, lex autoconf, automake gnuplot
Among others file formats, VTF/AMROC supports binary VTK files for visualization. To visualize such files both Paraview or VisIt can be used. For instance on Fedora, Paraview is available as a package.
A convenient script is now provided to compile the HDF4 libraries. The script also creates the directories as assumed by the VTF software. If no such HDF4-installation is available, e.g., on a new system (own laptop, etc.), use
$ cd vtf/third-party/HDF4.2r5 $ ./install $HOME/hdf4
This creates the libraries once in the user's $HOME-directory. On Linux without Fortran 77 compiler set export F77=gfortran
(bash syntax) before running install.
The automatically generated files are not included anymore in the repository and this step is mandatory. Generate autoconf files configure, Makefile.in, etc.
$ autoreconf -v
(will also take several minutes)
cd vtf/third-party/autoconf
./install $HOME/autoconf
The configuration procedure has not changed and the info under InstallationConfiguration basically still applies. A typical configuration command would be
$ ./configure -C --enable-opt=yes --enable-mpi=yes --enable-maintainer-mode --enable-shellnewmat HDF4_DIR=$HOME/hdf4
On Linux without dedicated Fortran 77 compiler append F77=gfortran
to above line.
In order to compile the AMROC legacy visualizer hdf2v3 on 32-bit Linux systems, append VISUAL3_DIR=$HOME/HG/vtf/third-party/Visual3/linux
to above lines. Although the Visual3-library is only available for
certain 32-bit systems, it is also even possible to compile hdf2v3 on
64-bit Linux systems by providing the compiler definitions CC=gcc -m32 CXX=g++ -m32 F77=gfortran -m32 FC=gfortran -m32
to the configure script but note that this also requires 32-bit
versions of the HDF4 libraries and extensive installation of 32-bit
system libraries.
Then go into the directory build directory and compile the libraries
$ cd gnu-opt-mpi $ make
If the system has multiple cores, the last step can also be replaced by using
$ cd gnu-opt-mpi $ ../parmake
which would use all available cores for compilation, except in directories with F90 modules.
On Linux-32bit systems on which X11 development is possible, the AMROC's native Visual3 visualizer hdf2v3 should also be built. However, it is possible that the X11 environment is not correctly detected and building of hdf2v3 is nevertheless skipped. In this case, it might be possible to initiate the build directly:
$ cd gnu-opt-mpi/amroc/converters $ make hdf2v3 $ cp src/hdf2v3 ../../bin/.
Note that on 64-bit systems still 32-bit code needs to be built as the Visual3-library is only available in binary 32-bit versions. Building of 32-bit code on a 64-bit system can be accomplished by providing the option "-m32" to all compilers and installing the required i686 libraries, which works for instance very well on Fedora systems.
As the build environment for the VTF allows a user to keep multiple top-level build directories (e.g., gnu-debug-mpi, gnu-opt-mpi, intel-debug, ...) on one machine, scripts are provided to adjust the environment of the current shell to run executables transparently for the user from different locations. These scripts are vtf/ac/paths.sh and vtf/ac/paths.csh. They can be run from an arbitrary directory in the following way:
For instance:
$ cd vtf $ source ac/paths.sh gnu-opt-mpi
As a test for a correct setup the Amroc test script vtf/amroc/testrun.sh, the Amroc-GFM test script vtf/amroc/testrun_gfm.sh or the test script for coupled applications vtf/applications/testrun.sh can be used:
For instance:
$ cd gnu-opt-mpi $ ../amroc/testrun.sh -m make -s -r 4 $ ../amroc/testrun_gfm.sh -m make -s -r 4 $ ../fsi/testrun.sh -m make -s -r 4
To compare with the stored reference solutions:
$ ../amroc/testrun.sh -c $ ../amroc/testrun_gfm.sh -c $ ../fsi/testrun.sh -c
Rigid body motion:
For instance:
$ cd vtf $ source ac/paths.sh gnu-opt-mpi $ cd gnu-opt-mpi/amroc/clawpack/applications/euler/2d/SphereLiftOff $ make $ cd ../../../../../../../amroc/clawpack/applications/euler/2d/SphereLiftOff $ run.py $ hdf2tab.sh "-f display_file_visit.in"
FSI example (requires MPI):
More examples under http:www.cacr.caltech.edu/asc.
$ cd vtf $ source ac/paths.sh gnu-opt-mpi $ cd gnu-opt-mpi/amroc/clawpack/applications/euler_chem/Mechanisms $ make
Then run application through run.py script to create links to Chemkin binary files in the local directory and possible recompilation. For instance
$ cd vtf/amroc/clawpack/applications/euler_chem/1d/ReflecDet/H2O2Ar $ ./run.py 4 $ gnuplot Density.gnu
This chemistry case is very well documented, also reference results are available.