This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
gasoline [2019/07/07 20:00] Wiki Admin [Variables] |
gasoline [2019/07/07 20:24] (current) Wiki Admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Gasoline ====== | + | ====== GASOLINE ====== |
| Gasoline Is A Modern SPH Simulation Code For Astrophysical Problems. Gasoline is written in modern C. All you need to build it is the MDL helper library and a C compiler. For more information please visit | Gasoline Is A Modern SPH Simulation Code For Astrophysical Problems. Gasoline is written in modern C. All you need to build it is the MDL helper library and a C compiler. For more information please visit | ||
| - | [[https://gasoline-code.com/]] | + | [[ https://gasoline-code.com/ ]] |
| =====Building Gasoline===== | =====Building Gasoline===== | ||
| Line 9: | Line 9: | ||
| Gasoline is pretty simple to compile. All you need is a C compiler (gcc/icc/clang/etc.), the machine dependent library, and the code for gasoline itself. | Gasoline is pretty simple to compile. All you need is a C compiler (gcc/icc/clang/etc.), the machine dependent library, and the code for gasoline itself. | ||
| - | ====Fetch Prerequisites==== | + | =====Fetch Prerequisites===== |
| Gasoline and the mdl library are both hosted by the N-Body Shop on github. If you have a github account with SSH keys enabled, you can fetch these repositories over git+ssh: | Gasoline and the mdl library are both hosted by the N-Body Shop on github. If you have a github account with SSH keys enabled, you can fetch these repositories over git+ssh: | ||
| - | git clone https://github.com/N-BodyShop/mdl | + | * Clone into the public repository |
| - | git clone https://github.com/N-BodyShop/gasoline | + | |
| - | If you don't have a github account, or your SSH keys are not set up, you can use HTTP to fetch the code. Note that some HPC facilities will block HTTP/HTTPS in their firewall rules, so if these fail with an HTTP 405 code (or other errors), you may need to use SSH. | + | <code> |
| + | $ git clone https://github.com/N-BodyShop/mdl | ||
| + | $ git clone https://github.com/N-BodyShop/gasoline | ||
| + | </code> | ||
| - | git clone https://github.com/N-BodyShop/mdl | + | If you don't have a github account, or your SSH keys are not set up, you can use HTTP to fetch the code. Note that some HPC facilities will block HTTP/HTTPS in their firewall rules, so if these fail with an HTTP 405 code (or other errors), you may need to use SSH. |
| - | git clone https://github.com/N-BodyShop/gasoline | + | |
| ====Configure The Makefile==== | ====Configure The Makefile==== | ||
| Line 24: | Line 25: | ||
| Gasoline uses a very simple build system: a single makefile! In the gasoline repository you have just cloned, you should find a file, Makefile.default. This is the skeleton Makefile you will use to build your copy of gasoline. First, copy this to Makefile: | Gasoline uses a very simple build system: a single makefile! In the gasoline repository you have just cloned, you should find a file, Makefile.default. This is the skeleton Makefile you will use to build your copy of gasoline. First, copy this to Makefile: | ||
| + | <code> | ||
| cp Makefile.default Makefile | cp Makefile.default Makefile | ||
| + | </code> | ||
| + | |||
| Next, you will open Makefile in your text editor of choice. By default, Gasoline is configured to build with "standard" physics options for doing galaxy/ISM/cosmological simulations, using gcc as the compiler. If you wish to use a different compiler, simply change the CC variable. | Next, you will open Makefile in your text editor of choice. By default, Gasoline is configured to build with "standard" physics options for doing galaxy/ISM/cosmological simulations, using gcc as the compiler. If you wish to use a different compiler, simply change the CC variable. | ||
| Line 39: | Line 43: | ||
| ====Building Gasoline with Grackle cooling support==== | ====Building Gasoline with Grackle cooling support==== | ||
| - | Currently, Gasoline only supports Grackle 2.1. To build Gasoline with Grackle cooling, first fetch the code: | + | Currently, Gasoline only supports Grackle 2.1. |
| - | hg clone https://bitbucket.org/grackle/grackle | + | * To build Gasoline with Grackle cooling, first fetch the code: |
| - | Then make sure you are on the grackle-2.1 tag: | + | |
| + | <code> | ||
| + | $ hg clone [[ https://bitbucket.org/grackle/grackle ]] | ||
| + | </code> | ||
| + | |||
| + | * Then make sure you are on the grackle-2.1 tag: | ||
| + | |||
| + | <code> | ||
| + | $ hg update grackle-2.1\ | ||
| + | </code> | ||
| - | hg update grackle-2.1 | ||
| Instructions on building grackle can be found on the grackle website | Instructions on building grackle can be found on the grackle website | ||
| Line 50: | Line 62: | ||
| You then simply need to set up your Makefile to use grackle: | You then simply need to set up your Makefile to use grackle: | ||
| - | + | <code> | |
| - | COOLING_OBJ = cooling_grackle.o | + | $ COOLING_OBJ = cooling_grackle.o |
| - | COOLING_DEF = -DCOOLING_GRACKLE -I/path/to/grackle_header_directory | + | $ COOLING_DEF = -DCOOLING_GRACKLE -I/path/to/grackle_header_directory |
| - | COOLING_LIB = /path/to/libgrackle.so -lhdf5 | + | $ COOLING_LIB = /path/to/libgrackle.so -lhdf5 |
| + | </code> | ||
| Then, compile as usual and you should have a Gasoline build with Grackle cooling! | Then, compile as usual and you should have a Gasoline build with Grackle cooling! | ||