[FLASH-USERS] FLASH's python tools

Ong Jian Fuh jianfuh.ong at eli-np.ro
Mon May 31 02:46:08 EDT 2021


Dear Ryan,

Thanks for your reply. I am using FLASH4.6.2 and I believe this is the 
latest version. I still need to replace /print msg/ to /print(msg)/, 
which is still in python2.7. Fixing the symbol with "!=" then many more 
issues exist as you suggested. Such as

  File 
"/home/ong/.local/lib/python3.8/site-packages/flash/flmake/setup_globals.py", 
line 204, in set
     if type(value) != types.StringType:
AttributeError: module 'types' has no attribute 'StringType'

Then I try using python2.7. and return the following error

Writing /home/ong/.local/lib/python2.7/site-packages/flash-0.1.egg-info
Traceback (most recent call last):
   File "setup.py", line 207, in <module>
     run_setup()
   File "setup.py", line 199, in run_setup
     make_bash_completion()
   File "setup.py", line 118, in make_bash_completion
     import flash.flmake.__init__
ImportError: No module named flash.flmake.__init__

Is there any update from FLASH's python tools to python3? I am using 
jupyter notebook which run on python3.8.8. Switching from one version to 
another would be quite troublesome.

In addition, I am not clear what the following lines in the user's guide 
do and how it relate to the simulation

$ mkdir temp
$ cd temp
$ flmake setup -auto Sedov
$ flmake build -j 20
$ flmake run -n 20

Regards,

Dr. Ong Jian Fuh
Extreme Light Infrastructure - Nuclear Physics
"Horia Hulubei" National Institute for Physics and Nuclear Engineering
30 Reactorului Street, 077125 Magurele (Ilfov), Romania
www.eli-np.ro

On 28/05/2021 6:06 pm, Ryan Farber wrote:
> Hi Ong,
>
> I remember being mystified the first time I encountered that archaic 
> "diamond operator."
>
> The easiest solutions are:
> 1. Use the latest FLASH, where they updated the python code to be 
> compatible with python3
> 2. Use python2 if you need to use an old version of FLASH (like me :))
>
> Or, you can replace "<>" with "!=", although there will be many more 
> issues you'll subsequently need to convert.
>
> Best,
> --------
> Ryan
>
>
> On Fri, May 28, 2021 at 8:33 AM Ong Jian Fuh <jianfuh.ong at eli-np.ro 
> <mailto:jianfuh.ong at eli-np.ro>> wrote:
>
>     Dear all,
>
>     Good afternoon. I am trying to install the FLASH python tools for
>     the plotting.
>
>     Doing /python setup.py install --user
>     /
>
>     return/
>     /
>
>         /running install//
>         //running build//
>         //running build_py//
>         //copying python/metadata.json -> build/lib/flash//
>         //running build_scripts//
>         //running install_lib//
>         //copying build/lib/flash/metadata.json ->
>         /home/ong/.local/lib/python3.8/site-packages/flash//
>         //byte-compiling
>         /home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py
>         to utils.cpython-38.pyc//
>         //  File
>         "/home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py",
>         line 423//
>         //    if len(parts) <> 2://
>         //                         ^//
>         //SyntaxError: invalid syntax/
>
>     I am using python3.8. What can I do to fix this or use it with new
>     python? Thanks. /
>     /
>
>     -- 
>     Regards,
>
>     Dr. Ong Jian Fuh
>     Extreme Light Infrastructure - Nuclear Physics
>     "Horia Hulubei" National Institute for Physics and Nuclear Engineering
>     30 Reactorului Street, 077125 Magurele (Ilfov), Romania
>     www.eli-np.ro  <http://www.eli-np.ro>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210531/e47a9526/attachment-0001.htm>


More information about the flash-users mailing list