Frequently asked questions

Collection of frequently asked question with respective answers broadly organized by topic

Development

Q

Can I use a different editor when I hit spacebar? I like the auto-formatting and power emacs gives me…

A

File > preferences and look for editor


Q

I have been editing and doing command-line commits outside OMFIT, but I don’t see my changes when I hit space bar to pull up the editor. I know there is an easier way inside OMFIT, just don’t know the procedure exactly.

A

OMFIT makes local copies within a project of the data/scripts that are in the repository. Thus editing the repository sources will not reflect the changes in the project unless you reload the modules.

Also, editing the scripts outside of OMFIT will not work if you are trying to add or remove a script, and it is generally discouraged.

The proper way of editing a module is to make the changes directly in OMFIT, so that you can test things out, and then export the module. You can then use OMFIT itself to push the changes to github or you can do it manually. Both methods are describe in two documents that you can find here: https://omfit.io/development.html#contributing-to-the-omfit-source-code

An alternative approach is to use the developer mode, which links the scripts in a project to the repository, thus making the edit/add/commit/push process faster. Note that developer mode has limitations when trying to add/remove scripts.


Q

I have been working in the OMFIT GUI to develop a script, which is great, but do I have to always use the GUI to run it?

A

Once you have developed an OMFIT script, you can run it without the GUI. At the command line, use omfit path_to_script.py. In your script you may want to take advantage of OMFIT.saveas('...') to save your project in its state before the script ends.


Installation

Q

What should I set the OMFIT_GLOBAL_TMPDIR and OMFIT_TMPDIR environmental variables?

A

The environmental variable OMFIT_TMPDIR sets the base where working directories from multiple instances of OMFIT coexist. It is important that OMFIT_TMPDIR is not a shared directory, this means that on clusters it should be a directory that is local to the node where OMFIT is running.

The OMFIT_GLOBAL_TMPDIR sets the base directory used to store temporary information that should be shared among different OMFIT sessions. On clusters this should be a temporary directory that is seen by all the nodes where a OMFIT could be running.


Q

Given an existing public installation, how can I run my own checkout of OMFIT?

A

Assuming that: 1. you have set up your environment so that the omfit command exists, is in your path, and can start OMFIT; 2. you have ssh keys setup on GitHub 3. you have access to the OMFIT-source repository on GitHub

Do the following:

git clone git@github.com:gafusion/OMFIT-source.git
OMFIT-source/bin/omfit_launch.sh

Alternatively, if the public installation has been set up differently, you might do:

cp `which omfit` ~/bin/mymfit

then modify ~/bin/myomfit to point to your version of OMFIT


Troubleshooting

Q

On my Mac something is stealing the focus away from the OMFIT command box (that is from X11).

A

Apparently is a relatively common issue on OSX. The code snippet in at this url allows users to understand what’s stealing the focus away: https://superuser.com/questions/734007/how-do-i-tell-which-app-stole-my-focus-in-os-x


Q

My OMFIT session takes a long time to start

A

You can set export OMFIT_TIME_IMPORTS=1.0 environmental variable before starting OMFIT to see what import statements take longer than 1.0 seconds to import. Unix module conflicts module load ... have been found to slow OMFIT startups. Try starting OMFIT from a clean environment (eg. by doing a module purge) and see if that fixes the slow startup times.


Q

I am running OMFIT via NoMachine and matplotlib plots come out with big black bands over them.

A

You can try to change the resolution of your nomachine session. For example with:

xrandr -s 1600x1200

Also, make sure to have the latest version of NoMachine installed https://www.nomachine.com/download