Hi,
> -- I'm attempting to run Sailfish on Windows XP, using the Python
> X,Y environment. Is this a completely silly thing to try? I believe
It shouldn't be, though for quite sometime I haven't heard about
anybody running Sailfish on Windows. You might very well be exploring
uncharted territory ;)
> 1) I have no trouble running "from sailfish import geo, lbm" if I type
> it in the IPython interpreter, but if I run the example code I get:
> "ValueError: numpy.dtype does not appear to be the correct type
> object". From some googling I understand that this error is often due
Which module do you get this error from? Could you please post the
full traceback?
> to using a version of Numpy newer than that used to compile Cython
> extensions; I am using Numpy 1.5.1. Which files would I need to
> recompile?
> 2) Does lbm.FluidLBMSim still exist? I can not find it in the API
> (http://sailfish.us.edu.pl/api.html#module-lbm), or in the source I
> got from github. I changed lbm.FluidLBMSim to lbm.LBMSim.
Please don't do that, and use lb_single.FluidLBMSim instead. I
recently split single and binary fluid models into two files
(lb_single, lb_binary) to make the code easier to navigate.
> 3) After this replacement, I can reach the run() line of the example.
> The program errors out with "AttributeError: 'LDCSim' object has no
> attribute 'grid'". I have a feeling this is due to using LBMSim
> rather than the possibly-more-specified FluidLBMSim. How can I
> specify a grid parameter for LBMSim?
Short answer: don't, use FludiLBMSim instead.
> 4) Finally, when I try running an example from the /examples folder,
> specifically lbm_ldc.py, I get
> "exceptions.TemplateLookupException(str(e))
> TemplateLookupException: Cant locate template for uri u'sailfish/
> propagation.mako'". I know the /templates folder is in the Python
> path. If I move the .mako files (except lb_single) into the /sailfish/
> sailfish directory, the example does run! Is there way to tell
> Sailfish how to find the template files?
It should find it automatically, provided the sailfish root directory
is in your sys.path. I find it weird that moving them to
sailfish/sailfish works -- the template path explicitly contains
'sailfish/templates/..'. Could you please verify that it is there in
lbm.py, line 438?
Cheers,
--
Michal Januszewski
http://people.gentoo.org/spock
Hi,
> Hello, thank you for the help Michal! Sailfish examples are running
> on Windows XP 32-bit, Nvidia GTX 480 GPU.
That's great news -- we now have success stories for all 3 major
platforms: Linux, Mac OS X and Windows.
> [..]
> File "C:\Python26\lib\site-packages\OpenGL\arrays\numpymodule.py",
> line 25, in <module>
> from OpenGL_accelerate.numpy_formathandler import NumpyHandler
> File "numpy.pxd", line 30, in OpenGL_accelerate.numpy_formathandler
> (src\numpy_formathandler.c:3543)
> ValueError: numpy.dtype does not appear to be the correct type object
It looks like the error is coming from PyOpenGL, which is only used by
the vis_surf module. If you edit VIS_MODULES in lbm.py and remove
'vis_surf', this problem should go away.
> Using lb_single.FluidLBMSim, I can run the sim! No fluid appears,
> however; for that I need to change init_dist(self, dist) to
> init_fields(self).
Yes, the documentation is really out of date on this one. I created
an issue entry on code.google.com/sailfish-cfd so that we don't forget
to update them.
> I put the Sailfish path in my system path, but nothing changed.
> Probably a windows path thing. Even if I hard code the full /
> templates path ('C:\\Simulations\\sailfish\\sailfish\\templates'),
> into line 438, it does not work. But, easy enough to move the .mako
> files!
Agreed, but still this isn't something that should be happening. I
wonder if the mako template lookup could be somehow incompatible with
Windows paths..
> Just so you know, I'm getting many "Warning: divide by zero
> encountered in double_scalars" warnings when running the example.
Which module are they coming from?
Thanks,
Michal
--
Michal Januszewski
http://people.gentoo.org/spock