Closed jwscook closed 5 years ago
@jwscook you found a bug, which was resolved with https://github.com/gafusion/OMFIT-source/commit/c17625164c719f430cb9b036a7d4da498fe1ac7b
Still, what you are trying to do in iPython will not work.
OMAS itself does not have remote access capabilities. These are made available by OMFIT, using the infrastructure that the framework provides for handling remote connections, transferring of files, and executing remote code. This means that if you want to use such functionality you must start the OMFIT framework and work from within its environment.
Alternatively, you can login to the ITER cluster, and start the iPython session there, and use OMAS load_omas_imas
routine locally.
Here are some references: https://gafusion.github.io/omas/iter.html https://gafusion.github.io/omas/code.html
To start OMFIT at CCFE follow these instructions: http://gafusion.github.io/OMFIT-source/installations/CCFE.html @fitz-culham can help.
I see. Thanks.
That's a bummer.
Does OMFIT really have to be the whole experience with GUI etc? I guess the analogy would be MATLAB with and without the IDE. Similar debates have been raging in UNIX circles for years.
Something to think about @orso82
@fitz-culham No there does not have to be a GUI for OMFIT. But @jwscook should test the method first with the GUI, then he can transfer what he is doing out of the GUI to a script, such as
https://github.com/gafusion/OMFIT-source/blob/unstable/regression/test_small_script.py
and then the small script can be run as
omfit <path_to_script>
Now that is probably not what is wanted. So I looked at running python in inspection mode with -i
. With https://github.com/gafusion/OMFIT-source/commit/6f614ddaaa15e423df1b902ba87ead9b59fca3cd you can do
python -i omfit/omfit.py regression/test_small_script.py
which then leaves OMFIT
in your namespace. The script can be rerun as shown here:
Note that assigning the results of the script run to a variable (tmp
in the example) is vital, as otherwise a large namespace is printed. Also running with runNoGUI
is necessary for now; @orso82 this should be considered a bug (possibly reported by @gtrevisan on OMFIT), as a blank tk window should not be launched when run with .run
when there is no main OMFIT GUI.
@fitz-culham @jwscook Feedback is welcome.
Hi OMAS devs,
I'm attempting to use the
load_omas_imas_remote
functionality fromfreia
at UKAEA. However it is throwing an exception before telling me sensible reasons as to why it won't work, like incorrect pulse number or something.What I did:
I use
module load omfit-dev/20190417
which givesomas
andomfit
to python 2.7. Then inipython
I do the followingwhich gives the error message
AttributeError: 'module' object has no attribute 'fortran_environment'
. Complete output below:Any ideas how to fix this?
Thanks, James