Environment_Setup - nasa/gunns GitHub Wiki

Environment Setup

Some existing build environments, such as NExSyS and TS-21, already have a complete set-up for building GUNNS networks, and they can ignore this page. This page is meant for using GUNNS standalone.

All GUNNS code dependencies are relative to the gunns/ folder.

The remaining set up involves getting this locations into the Trick and other environment variables, paths, etc needed at compile-time.

Define User Environment Variables

If you’re going to build & run GUNNS standalone, then you should have these environment variables already defined first. A good place to put these is in your .cshrc or .bashrc file that’s automatically run on login, etc:

GUNNS_EXT_PATH

This is an environment variable that defines all the pathing to model dependencies external to the gunns/ folder. This would include paths to your GunnsDraw networks and any custom GUNNS code you are using. The environment variable should be set to a string with -I in front of each path, with spaces in between separate paths, like so (csh):

setenv GUNNS_EXT_PATH “-I/users/me/myProject/myNetworks -I/users/me/myProject/myCustomGunnsCode”

You can leave this blank if you already have such pathing included in your make.

GUNNS_TRICK_HOME

This is an environment variable that points to your Trick install, such as:

setenv GUNNS_TRICK_HOME “/users/trick/trick-13.5.0”

GUNNS_TRICK_VER

This is possibly an obsolete Trick term and can maybe go away soon, but for now we should keep using it. This should be set to the same Trick version that your GUNNS_TRICK_HOME path points to, i.e.:

setenv GUNNS_TRICK_VER “13.5.0”

Source bin/cshrc

Once you have the above environment variables set, use this script to complete the setup. In a new shell, change directories into your gunns/ folder, and do (currently only tcsh shell is supported):

$ source bin/cshrc

Once this is run, your environment should be ready to build and run Trick sims with your GUNNS networks and custom code in them!

⚠️ **GitHub.com Fallback** ⚠️