Skip to content

imogenproject/gpuImogen

Repository files navigation

=== SETUP

1) Make sure that Matlab, GCC (or compiler of choice), and NVCC are available. Test that
	* which [matlab | gcc | nvcc]
	all indicate an executable and not 'no file ... in path'
2) Copy Make.config.default to Make.config so you can edit it without git being git
3) Edit Make.config with paths to the required libraries
	a. If you are using the Modules system:
		* load up matlab, mpi, cuda
		* matlab r2011b, mpi-1.5.4, cuda-4.2 and gcc-4.5 are a known-working combo
	b. Check $PATH and use the paths to mpi, cuda & matlab to edit Make.config
	c. If using modules, make sure that the run/imogen invocation script loads
		the same modules as used to compile
3) Compile the MPI bindings and CUDA kernels:
	* from the imogen root: cd mpi; make; cd ../gpuclass; make
	* Both can be build with -jN
	* Poke one of the mexa64 files in both /mpi and /gpuclass with ldd and see that
		it can see all the required .so files, in particular libmpi_f90.

                If not then something is probably unhappy with versioning; make sure the libs
		you reference in Make.config, run/imogen and presently have loaded are the same.
	* ldd won't see the Matlab mex .so's; Matlab modifies your environment to provide them

=== USE

The Imogen HD/MHD code is a GPU-accelerated fluid simulation tool. It solves the Euler or Ideal 
MHD equations with multiple methods that are second-order space and time.

Simulations are started from the run/ directory using the 'imogen' command residing there. Run
	./imogen help
to get information on how to invoke Imogen. Currently cluster invocation assumes the use if qsub
and a Torque that feeds mpi the list of nodes to be used; Otherwise modification will be required -
please email changes for this to [[email protected]]

Imogen can run in parallel on one node with multiple GPUs (./imogen parallel ...) or in parallel
on multiple nodes with one or multiple GPUs (./imogen cluster ...). If there are multiple GPUs, it
must be arranged that there be one Matlab process per GPU at present, and on each node the
Matlab instances will activate GPUs in numeric order.

== ALGORITHMS & PROPERTIES

Imogen has three different GPU-accelerated solvers for the hydrodynamic Euler equations available:
  * HLL approximate Riemann (CFL < 0.5)
  * HLLC approximate Riemann (CFL < 0.5)
  * Xin/Jin Relaxing TVD method (CFL < 1.0)

The approximate Riemann methods draw strongly on the underlying physics of the Euler equations and
capture certain stationary features exactly (Both capture shocks, HLLC captures contacts). The more
general Xin/Jin method is the only one in Imogen which solves both HD and MHD flows, but exhibits
reduced resolution on HD flows.

The hydrodynamic algorithm is selected by altering the indicated # in fluid/relaxingFluid.m



About

Codeveloped version of the Imogen code that runs on the GPU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published