Frequently asked questions¶
Collection of frequently asked question with respective answers broadly organized by topic
Can I use a different editor when I hit spacebar? I like the auto-formatting and power emacs gives me…
File > preferencesand look for
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.
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.
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?
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.
What should I set the
The environmental variable
OMFIT_TMPDIRsets the base where working directories from multiple instances of OMFIT coexist. It is important that
OMFIT_TMPDIRis not a shared directory, this means that on clusters it should be a directory that is local to the node where OMFIT is running.
OMFIT_GLOBAL_TMPDIRsets 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.
Given an existing public installation, how can I run my own checkout of OMFIT?
Assuming that: 1. you have set up your environment so that the
omfitcommand 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 firstname.lastname@example.org: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
~/bin/myomfitto point to your version of OMFIT
On my Mac something is stealing the focus away from the OMFIT command box (that is from X11).
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
My OMFIT session takes a long time to start
You can set
export OMFIT_TIME_IMPORTS=1.0environmental 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.
I am running OMFIT via NoMachine and matplotlib plots come out with big black bands over them.
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