Re: python 3
Hi Jonathan, I am excited for PETSc and wish I could help! Is there any form adaptive mesh refinement on the horizon? Best, -Mike On 6/7/17 4:03 PM, Guyer, Jonathan E. Dr. (Fed) wrote: > Yes. More likely to happen is that we'll add support for PETSc, but that's > not imminent, either. > >> On Jun 7, 2017, at 3:08 PM, Michael J. Waters <waters.mik...@gmail.com> >> wrote: >> >> Hi Daniel, >> >> So FiPy running in Python 3 won't have MPI based parallelism until >> PyTrilinos supports Python 3? >> >> Best, >> >> -Mike >> >> >> On 6/7/17 2:01 PM, Daniel Wheeler wrote: >>> Hi Nils, >>> >>> FiPy is not written for Python 3, but it does work after applying >>> 2to3. However, only the Scipy solvers are then available. See, >>> >>> >>> https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#running-under-python-3 >>> >>> To fully make the switch to Python 3, FiPy needs to be natively >>> updated, which hasn't happened yet. Also, FiPy needs to move away from >>> using Trilinos as PyTrilinos hasn't been updated to Python 3. >>> Unfortunately, I can't give a timeline on when those changes will be >>> made. >>> >>> Cheers, >>> >>> Daniel >>> >>> >>> >>> >>> On Wed, Jun 7, 2017 at 6:16 AM, Nils Becker >>> <nils.bec...@bioquant.uni-heidelberg.de> wrote: >>>> hi, >>>> >>>> i'm considering updating my scripts from 2.7 to python 3.4 or 3.6. >>>> should i expect any problems? is fipy tested on py 3? >>>> >>>> thanks! >>>> >>>> ___ >>>> fipy mailing list >>>> fipy@nist.gov >>>> http://www.ctcms.nist.gov/fipy >>>>[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >>>> >>> >> ___ >> fipy mailing list >> fipy@nist.gov >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy >[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: python 3
Yes. More likely to happen is that we'll add support for PETSc, but that's not imminent, either. > On Jun 7, 2017, at 3:08 PM, Michael J. Waters <waters.mik...@gmail.com> wrote: > > Hi Daniel, > > So FiPy running in Python 3 won't have MPI based parallelism until > PyTrilinos supports Python 3? > > Best, > > -Mike > > > On 6/7/17 2:01 PM, Daniel Wheeler wrote: >> Hi Nils, >> >> FiPy is not written for Python 3, but it does work after applying >> 2to3. However, only the Scipy solvers are then available. See, >> >> >> https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#running-under-python-3 >> >> To fully make the switch to Python 3, FiPy needs to be natively >> updated, which hasn't happened yet. Also, FiPy needs to move away from >> using Trilinos as PyTrilinos hasn't been updated to Python 3. >> Unfortunately, I can't give a timeline on when those changes will be >> made. >> >> Cheers, >> >> Daniel >> >> >> >> >> On Wed, Jun 7, 2017 at 6:16 AM, Nils Becker >> <nils.bec...@bioquant.uni-heidelberg.de> wrote: >>> hi, >>> >>> i'm considering updating my scripts from 2.7 to python 3.4 or 3.6. >>> should i expect any problems? is fipy tested on py 3? >>> >>> thanks! >>> >>> ___ >>> fipy mailing list >>> fipy@nist.gov >>> http://www.ctcms.nist.gov/fipy >>> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >>> >> >> > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: python 3
Hi Daniel, So FiPy running in Python 3 won't have MPI based parallelism until PyTrilinos supports Python 3? Best, -Mike On 6/7/17 2:01 PM, Daniel Wheeler wrote: > Hi Nils, > > FiPy is not written for Python 3, but it does work after applying > 2to3. However, only the Scipy solvers are then available. See, > > > https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#running-under-python-3 > > To fully make the switch to Python 3, FiPy needs to be natively > updated, which hasn't happened yet. Also, FiPy needs to move away from > using Trilinos as PyTrilinos hasn't been updated to Python 3. > Unfortunately, I can't give a timeline on when those changes will be > made. > > Cheers, > > Daniel > > > > > On Wed, Jun 7, 2017 at 6:16 AM, Nils Becker > <nils.bec...@bioquant.uni-heidelberg.de> wrote: >> hi, >> >> i'm considering updating my scripts from 2.7 to python 3.4 or 3.6. >> should i expect any problems? is fipy tested on py 3? >> >> thanks! >> >> ___ >> fipy mailing list >> fipy@nist.gov >> http://www.ctcms.nist.gov/fipy >>[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >> > > ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: python 3
Hi Nils, FiPy is not written for Python 3, but it does work after applying 2to3. However, only the Scipy solvers are then available. See, https://www.ctcms.nist.gov/fipy/documentation/USAGE.html#running-under-python-3 To fully make the switch to Python 3, FiPy needs to be natively updated, which hasn't happened yet. Also, FiPy needs to move away from using Trilinos as PyTrilinos hasn't been updated to Python 3. Unfortunately, I can't give a timeline on when those changes will be made. Cheers, Daniel On Wed, Jun 7, 2017 at 6:16 AM, Nils Becker <nils.bec...@bioquant.uni-heidelberg.de> wrote: > hi, > > i'm considering updating my scripts from 2.7 to python 3.4 or 3.6. > should i expect any problems? is fipy tested on py 3? > > thanks! > > ___ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: Plan to migrate to Python 3?
Since neither of the primary sparse solvers we use, PySparse or PyTrilinos, has been migrated to Python 3, we're not in any rush. FiPy can be used with Python 3 by running the `2to3` converter and then using the SciPy sparse solvers. This doesn't perform as well, but is suitable if you need to be on Python 3 for some reason. On Jun 23, 2015, at 6:03 AM, Colin Stark cst...@ldeo.columbia.edu wrote: Is there a timetable to migrate Fipy to Python 3? Colin Stark ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Plan to migrate to Python 3?
Is there a timetable to migrate Fipy to Python 3? Colin Stark ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
TypeError when plotting a 2D diffusion (was: Re: Installation failure in Python 3 virtualenv)
Hi Daniel, Sorry for the somewhat long delay. I couldn't work on the problem for a while. On 2014-10-20 16:25, Daniel Wheeler wrote: On Sun, Oct 19, 2014 at 4:57 PM, Stefan Schwarzer sschwar...@sschwarzer.net wrote: I gave it a try and installed Anaconda3. When running `python setup.py install`, I still have/had some issues. For one, a few files have mixed indentation (mixed spaces and tabs) which Python 3 doesn't like: Sorry: TabError: inconsistent use of tabs and spaces in indentation (testBase.py, line 47) Sorry: TabError: inconsistent use of tabs and spaces in indentation (trilinosSolver.py, line 148) Sorry: TabError: inconsistent use of tabs and spaces in indentation (gistVectorViewer.py, line 70) I've never seen that before when installing with Python 3 in Anaconda. Which version of FiPy are you using? I saw this both in FiPy 3.1 and in the Git repository I fetched today. You don't see the problem in Python 2, but Python 3 complains if you mix tabs and spaces in one file. After fixing the files, I got that far: The required module(s) ['pysparse'] cannot be loaded. FiPy will not work properly until these modules are installed. -- The optional module(s) ['gist', 'mayavi'] cannot be loaded. FiPy will have improved capabilities if these modules are installed. It seems `pysparse` is only available for Python 2. Is this correct? Is it indeed needed? You don't need PySparse. It isn't available for Python 3 yet. The Scipy solvers are adequate to get started. None of the solvers are required packages, but you obviously need one of them. I suggest fixing the message then because it says `pysparse` is required. :-) Gist is a very old package that we need to remove from the dependencies. It's a viewer. You don't actually need any of the viewers to use FiPy. However to see stuff interactively while the simulation is running, it is good to have one of them. I would suggest using Matplotlib to get started. Mayavi is just optional. I've set up an Anaconda environment and installed FiPy from Git (I tried with FiPy 3.1 first), matplotlib 1.4.2 and NumPy 1.9.0. I tried to run the following code, mesh = fipy.Grid2D(dx=1.0, dy=1.0, nx=10, ny=10) initial_value = 0.0 concentration = fipy.CellVariable( mesh, concentration, value=initial_value) x, y = mesh.cellCenters concentration.setValue(10.0, where=(x3.0) (y3.0)) eq = fipy.TransientTerm() == fipy.DiffusionTerm(coeff=1.0) import ipdb; ipdb.set_trace() viewer = fipy.MatplotlibViewer(vars=concentration, xmin=0, xmax=1.0, ymin=0, ymax=1.0, datamin=0.0, datamax=10.0) # Solve. time_step = 0.01 steps = 1000 for step in range(steps): eq.solve(var=concentration, dt=time_step) viewer.plot() but it fails when setting up the viewer: /home/schwa/sd/python/diffusion/diffusion.py in _set_up(self) 88 eq = fipy.TransientTerm() == fipy.DiffusionTerm(coeff=1.0) 89 import ipdb; ipdb.set_trace() --- 90 viewer = fipy.MatplotlibViewer(vars=concentration, 91xmin=0, xmax=1.0, ymin=0, ymax=1.0, 92datamin=0.0, datamax=10.0) /home/schwa/sd/anaconda3/envs/diffusion/lib/python3.4/site-packages/FiPy-3.1-py3.4.egg/fipy/viewers/matplotlibViewer/__init__.py in MatplotlibViewer(vars, title, limits, cmap, colorbar, axes, **kwlimits) 115 try: 116 from fipy.viewers.matplotlibViewer.matplotlib2DGridViewer import Matplotlib2DGridViewer -- 117 return Matplotlib2DGridViewer(vars=vars, title=title, cmap=cmap, colorbar=colorbar, axes=axes, **kwlimits) 118 except MeshDimensionError: 119 try: /home/schwa/sd/anaconda3/envs/diffusion/lib/python3.4/site-packages/FiPy-3.1-py3.4.egg/fipy/viewers/matplotlibViewer/matplotlib2DGridViewer.py in __init__(self, vars, title, limits, cmap, colorbar, axes, figaspect, **kwlimits) 80 AbstractMatplotlib2DViewer.__init__(self, vars=vars, title=title, 81 cmap=cmap, colorbar=colorbar, axes=axes, figaspect=figaspect, --- 82 **kwlimits) 83 84 self.image = self.axes.imshow(self._data, /home/schwa/sd/anaconda3/envs/diffusion/lib/python3.4/site-packages/FiPy-3.1-py3.4.egg/fipy/viewers/matplotlibViewer/matplotlibViewer.py in __init__(self, vars, title, figaspect, cmap, colorbar, axes, log, **kwlimits) 108 109 if colorbar: -- 110 self.colorbar = _ColorBar(viewer=self) 111 else: 112 self.colorbar = None /home/schwa/sd/anaconda3/envs/diffusion/lib/python3.4/site-packages/FiPy-3.1-py3.4.egg/fipy/viewers/matplotlibViewer/matplotlibViewer.py in __init__(self, viewer, vmin
Re: Installation failure in Python 3 virtualenv
On Sun, Oct 19, 2014 at 4:57 PM, Stefan Schwarzer sschwar...@sschwarzer.net wrote: According to http://www.ctcms.nist.gov/fipy/documentation/USAGE.html#running-under-python-3 you should also run `2to3 --write --doctests_only`. Maybe that makes the difference? :-) Oh yeah. That works better. Thanks. I gave it a try and installed Anaconda3. When running `python setup.py install`, I still have/had some issues. For one, a few files have mixed indentation (mixed spaces and tabs) which Python 3 doesn't like: Sorry: TabError: inconsistent use of tabs and spaces in indentation (testBase.py, line 47) Sorry: TabError: inconsistent use of tabs and spaces in indentation (trilinosSolver.py, line 148) Sorry: TabError: inconsistent use of tabs and spaces in indentation (gistVectorViewer.py, line 70) I've never seen that before when installing with Python 3 in Anaconda. Which version of FiPy are you using? After fixing the files, I got that far: The required module(s) ['pysparse'] cannot be loaded. FiPy will not work properly until these modules are installed. -- The optional module(s) ['gist', 'mayavi'] cannot be loaded. FiPy will have improved capabilities if these modules are installed. It seems `pysparse` is only available for Python 2. Is this correct? Is it indeed needed? You don't need PySparse. It isn't available for Python 3 yet. The Scipy solvers are adequate to get started. None of the solvers are required packages, but you obviously need one of them. `gist` presumably is installed though: (diffusion)schwa@warpy:~/sd/python/diffusion/FiPy-3.1$ ~/sd/anaconda3/bin/pip install gist Requirement already satisfied (use --upgrade to upgrade): gist in /home/schwa/sd/anaconda3/lib/python3.4/site-packages Requirement already satisfied (use --upgrade to upgrade): requests in /home/schwa/sd/anaconda3/lib/python3.4/site-packages (from gist) Requirement already satisfied (use --upgrade to upgrade): argparse in /home/schwa/sd/anaconda3/lib/python3.4/site-packages (from gist) Cleaning up... (diffusion)schwa@warpy:~/sd/python/diffusion/FiPy-3.1$ ~/sd/anaconda3/bin/pip install --upgrade gist Requirement already up-to-date: gist in /home/schwa/sd/anaconda3/lib/python3.4/site-packages Requirement already up-to-date: requests in /home/schwa/sd/anaconda3/lib/python3.4/site-packages (from gist) Requirement already up-to-date: argparse in /home/schwa/sd/anaconda3/lib/python3.4/site-packages (from gist) Cleaning up... But I still get the message about the missing `gist` (see above). Gist is a very old package that we need to remove from the dependencies. It's a viewer. You don't actually need any of the viewers to use FiPy. However to see stuff interactively while the simulation is running, it is good to have one of them. I would suggest using Matplotlib to get started. Mayavi is just optional. /site-packages/ez_setup.py, line 116, in _build_egg raise IOError('Could not build the egg.') OSError: Could not build the egg. Could it be permission issues? Just speculation. Maybe. Also just speculation. ;-) But I don't get these messages anymore with Anaconda. Great. In [3]: len(dir(fipy)) Out[3]: 144 If you're in the fipy directory then that's not surprising. Kind of. ;-) Still the import might have failed if some things needed to be built but weren't. So it's not as natural as one would expect. That said, you know more about FiPy than me :-) ; is FiPy pure Python (apart from its dependencies) and is supposed to run without any installation other than copying the directory/file structure one to one? It is pure Python so an installation is exactly as you describe. When running `fipy.test()` from within the interpreter, the summary output is Ran 343 tests in 9.262s FAILED (failures=7) !!! Skipped 105 doctest examples because `gmsh` cannot be found on the $PATH Skipped 20 doctest examples because neither `lsmlib` nor `skfmm` can be found on the $PATH Skipped 1 doctest examples because `skfmm` must be used to run some tests Skipped 83 doctest examples because the `tvtk` package cannot be imported !!! An exception has occurred, use %tb to see the full traceback. Now I get the same message (when running FiPy installed in the environment, not from the unpacked FiPy directory). I think things are working. (diffusion)schwa@warpy:~/sd/python/diffusion/FiPy-3.1$ python examples/diffusion/variable.py Traceback (most recent call last): File examples/diffusion/variable.py, line 86, in module exec(fipy.tests.doctestPlus._getScript()) File string, line 8, in module File /home/schwa/sd/anaconda3/envs/diffusion/lib/python3.4/site-packages/FiPy-3.1-py3.4.egg