Repository: devitocodes/devito
Issue: Logging level breaks code caching

The library fails to load on `cache hit` if the log level is changed

```
devito @ mathias-2 [mathiaslouboutin]: python3 examples/seismic/acoustic/acoustic_example.py -nd 1
Applying Forward
GNUCompiler: compiled `/var/folders/mx/qs0dn9rx7zn6dz2zvwv7tkk00000gn/T/devito-jitcache-uid501/6d6742923d061de6b8ae547876c2117421e010a5.c` [1.21 s]
=========================================================================================
section0<297,131> with OI=1.89 computed in 0.020 s [0.06 GFlops/s, 0.00 GPts/s]
section1<297,1> with OI=1.55 computed in 0.021 s [0.00 GFlops/s, 0.00 GPts/s]
section2<297,51> with OI=1.50 computed in 0.010 s [0.03 GFlops/s]
=========================================================================================
devito @ mathias-2 [mathiaslouboutin]: DEVITO_LOGGING=DEBUG python3 examples/seismic/acoustic/acoustic_example.py -nd 1
Allocating memory for m(143,)
Allocating memory for damp(133,)
Allocating memory for src(299, 1)
Allocating memory for src_coords(1, 1)
Allocating memory for rec_coords(51, 1)
Applying Forward
Allocating memory for rec_coords(51, 1)
DSE: extract_time_invariants [flops: 39, elapsed: 0.00] >>
     eliminate_inter_stencil_redundancies [flops: 39, elapsed: 0.00] >>
     eliminate_intra_stencil_redundancies [flops: 30, elapsed: 0.01] >>
     factorize [flops: 27, elapsed: 0.02] >>
     finalize [flops: 31, elapsed: 0.00]
     [Total elapsed: 0.03 s]
DLE: avoid_denormals [elapsed: 0.00] >>
     loop_blocking [elapsed: 0.02] >>
     simdize [elapsed: 0.00] >>
     parallelize [elapsed: 0.01] >>
     create_elemental_functions [elapsed: 0.01] >>
     minimize_remainders [elapsed: 0.00]
     [Total elapsed: 0.04 s]
Allocating memory for rec(299, 51)
Allocating memory for u(3, 143)
GNUCompiler: cache hit `/var/folders/mx/qs0dn9rx7zn6dz2zvwv7tkk00000gn/T/devito-jitcache-uid501/44392e366c785972c2a5c1b851f1b7b9a1692870.c` [0.01 s]
Traceback (most recent call last):
  File "examples/seismic/acoustic/acoustic_example.py", line 138, in <module>
    checkpointing=args.checkpointing)
  File "examples/seismic/acoustic/acoustic_example.py", line 81, in run
    rec, u, summary = solver.forward(save=save, autotune=autotune)
  File "/Users/mathiaslouboutin/Dropbox (Personal)/London/CodeGen/devito/examples/seismic/acoustic/wavesolver.py", line 104, in forward
    dt=kwargs.pop('dt', self.dt), **kwargs)
  File "/Users/mathiaslouboutin/Dropbox (Personal)/London/CodeGen/devito/devito/operator.py", line 387, in apply
    self.cfunction(*arg_values)
  File "/Users/mathiaslouboutin/Dropbox (Personal)/London/CodeGen/devito/devito/operator.py", line 214, in cfunction
    self._lib = load(self._soname)
  File "/Users/mathiaslouboutin/Dropbox (Personal)/London/CodeGen/devito/devito/compiler.py", line 298, in load
    return npct.load_library(str(get_jit_dir().joinpath(soname)), '.')
  File "/usr/local/lib/python3.6/site-packages/numpy/ctypeslib.py", line 155, in load_library
    raise OSError("no file with expected extension")
OSError: no file with expected extension
```

Changed files:
devito/parameters.py

diff --git a/devito/parameters.py b/devito/parameters.py
index db33a0506..58310a507 100644
--- a/devito/parameters.py
+++ b/devito/parameters.py
@@ -94,7 +94,9 @@ class Parameters(OrderedDict, Signer):
         return self._name
 
     def _signature_items(self):
-        return tuple(str(sorted(self.items()))) + tuple(str(sorted(self.backend.items())))
+        items = sorted(it for it in self.items()
+                       if it[0] not in ['log_level', 'first_touch'])
+        return tuple(str(items)) + tuple(str(sorted(self.backend.items())))
 
 
 env_vars_mapper = {