timestepping library and the last FEniCS

Issue #60 resolved
Miguel Salazar created an issue

Hello

I tried to load the timestepping library, but I got this error:

ValueError                                Traceback (most recent call last)
/home/miguel/myprojects/fenics_apps/df_adj_time/elastodynamics.py in <module>()
     31 
     32 from dolfin import *
---> 33 from timestepping import *
     34 
     35 Constant = StaticConstant

/home/miguel/midolfin/dolfin-adjoint/timestepping/python/timestepping/__init__.py in <module>()
     17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
     18 
---> 19 from fenics_patches import *
     20 from parameters import *
     21 

/home/miguel/midolfin/dolfin-adjoint/timestepping/python/timestepping/fenics_patches.py in <module>()
     56 
     57 # Only versions 1.2.x and 1.3.x have been tested.
---> 58 if dolfin_version() < (1, 2, 0) or dolfin_version() >= (1, 5, 0):
     59     dolfin.warning("DOLFIN version %s not supported" % dolfin.__version__)
     60 if ufl_version() < (1, 2, 0) or ufl_version() >= (1, 5, 0):

/home/miguel/midolfin/dolfin-adjoint/timestepping/python/timestepping/fenics_versions.pyc in dolfin_version()
    143     
    144 
--> 145     return Version(dolfin.__version__)
    146 
    147 def ffc_version():

/home/miguel/midolfin/dolfin-adjoint/timestepping/python/timestepping/fenics_versions.pyc in __init__(self, ver)
     60             else:
     61                 ver = ver.split(".")
---> 62         ver = numpy.array(ver, dtype = numpy.int)
     63         if len(ver) == 0 or not (ver >= 0).all():
     64             raise InvalidArgumentException("Invalid version")

ValueError: invalid literal for long() with base 10: 'dev0'

My dolfin.version is '2016.2.0.dev0'. I imagine this is the problem. I wonder if there is an effort to update the library to the new FEniCS and what are the necessary steps to do so.

Comments (9)

  1. Miguel Salazar reporter

    Still does not support version 2016.2.0.dev0. Has the FEniCS nomenclature changed for good? I mean, now all the versions > 1.6 start with 2016 or the year? I could try to change the version comparisons inside fenics_versions.py to start with.

  2. Simon Funke

    @salazardetroya : Looking at the code, it is clearly an issue with the new version format (as you indicated before). I suggest that you fix the function to allow for the new version format and submit a pull request.

  3. Miguel Salazar reporter

    @pefarrell how much progress on this have you done? I'm interested in using this library with the last FEniCS and I started making some of the necessary changes. I could continue and send the pull request at some point in the next two weeks if you're not going to do so earlier.

  4. James R. Maddison

    This should be fixed in the timestepping_2017.1.0 branch, so I have marked this as resolved.

  5. Log in to comment