fortran debugging problem - ide

I have compiled code but it doesn't work properly.My makefile:
FC= ifort
LD = ifort -align all
FCFLAGS = -O0 -g -ipo -traceback -warn noalign
LDFLAGS = $(FCFLAGS)
# Executables
nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o $< $(INCS)
$(FC) $(LDFLAGS) $(FCFLAGS) -o nray main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o $< $(INCS)
main.o:main.f ray.par ray.com
$(FC) $(FCFLAGS) -c main.f
So if I want to see why backproj.o is not working,what should I do?
forrtl: severe (24): end-of-file during read, unit 29, file /home/milenko/fast/ray/num.cell
Image PC Routine Line Source
nray 080CBD03 Unknown Unknown Unknown
nray 080CAA20 Unknown Unknown Unknown
nray 080950BE Unknown Unknown Unknown
nray 0805E7AC Unknown Unknown Unknown
nray 0805E0AA Unknown Unknown Unknown
nray 0806B83D Unknown Unknown Unknown
nray 0804C6BB MAIN__ 226 main.f
num.cell is empty.
Breakpoint 1.1 at 0x804c5d5: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.2 at 0x804c887: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.3 at 0x804c8fa: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.4 at 0x804ca94: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.5 at 0x804cb0e: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.6 at 0x804cc2b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.7 at 0x804cc97: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.8 at 0x804cfa4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.9 at 0x804cff2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.10 at 0x804e527: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.11 at 0x804e73d: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.12 at 0x804f07b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.13 at 0x804f142: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.14 at 0x804f2e4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.15 at 0x804f3ab: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.16 at 0x8053eda: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.17 at 0x8053ff2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.18 at 0x8054168: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.19 at 0x80542c2: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.20 at 0x8054546: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.21 at 0x80545c8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.22 at 0x8054cef: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.23 at 0x8054dc8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.24 at 0x80551f4: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.25 at 0x8055261: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.26 at 0x80552bc: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.27 at 0x8055321: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.28 at 0x80553aa: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.29 at 0x805541e: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.30 at 0x8056bc6: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.31 at 0x8056cb3: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.32 at 0x8056d10: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.33 at 0x8056dd3: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.34 at 0x8056e54: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.35 at 0x8056f17: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.36 at 0x805784b: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.37 at 0x8057af0: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.38 at 0x8057b4d: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.39 at 0x8057df9: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.40 at 0x8057eb9: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.41 at 0x8057f45: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.42 at 0x8057fd8: file /home/milenko/fast/ray/main.f, line 226.
Breakpoint 1.43 at 0x8058064: file /home/milenko/fast/ray/main.f, line 226.

You are reading past the end of the file:
/home/milenko/fast/ray/num.cell
this is either because num.cell isn't long enough or your reading routine isn't stopping at the right place. The offending read is at line 226 of main.f or at least called there.
Can't really say much more without seeing some code.
It seems unlikely the problem is with backproj.f (doesn't sound like the sort of routine which should/will be reading a file) but that's just a guess based on the names of your routines.

You are getting and end of file error from the fortran runtime library trying to read the file num.cell. The first step should be to check whether the contents of that file are valid.

Related

PYPY3 -- Unable to install Pandas

I have been trying to install pandas in PYPY with out any success. Below is the complete log message.
Windows 10 64 Bit OS.
Have installed the Visual C++ 2015-2019 redistributable.
Python 3.7 , pip 19.3.1 ( installed through Anaconda)
pypy3.6-v7.2.0-win32
how to resolve this error?
Collecting pandas
Using cached
https://files.pythonhosted.org/packages/b7/93/b544dd08092b457d88e10fc1e0989d9397fd32ca936fdfcbb2584178dd2b/pandas-0.25.3.tar.gz
Complete output from command python setup.py egg_info:
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\setup.py:419: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\system_info.py:690: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
self.calc_info()
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\egg_info.py", line 26, in run
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\build_src.py", line 142, in run
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\build_src.py", line 153, in build_sources
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\build_src.py", line 286, in build_library_sources
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\build_src.py", line 369, in generate_sources
File "numpy\core\setup.py", line 667, in get_mathlib_info
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\command\config.py", line 243, in try_link
self._check_compiler()
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\command\config.py", line 54, in _check_compiler
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\msvc9compiler.py", line 50, in initialize
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\msvc9compiler.py", line 385, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\msvc.py", line 147, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\msvc.py", line 1227, in return_env
[self.VCIncludes,
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\msvc.py", line 876, in VCIncludes
return [os.path.join(self.si.VCInstallDir, 'Include'),
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\msvc.py", line 555, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\setup.py", line 444, in <module>
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\setup.py", line 436, in setup_package
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\core.py", line 171, in setup
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\setup.py", line 444, in <module>
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\setup.py", line 436, in setup_package
File "C:\Users\Nawab\AppData\Local\Temp\easy_install-2kmbrdot\numpy-1.17.4\numpy\distutils\core.py", line 171, in setup
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\lib-python\3\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Nawab\AppData\Local\Temp\pip-install-e7lqmamq\pandas\setup.py", line 840, in <module>
**setuptools_kwargs
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\__init__.py", line 142, in setup
_install_setup_requires(attrs)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\__init__.py", line 137, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\dist.py", line 586, in fetch_build_eggs
replace_conflicting=True,
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\pkg_resources\__init__.py", line 780, in resolve
replace_conflicting=replace_conflicting
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\pkg_resources\__init__.py", line 1063, in best_match
return self.obtain(req, installer)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\pkg_resources\__init__.py", line 1075, in obtain
return installer(requirement)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\dist.py", line 653, in fetch_build_egg
return cmd.easy_install(req)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Users\Nawab\Desktop\pypy3.6-v7.2.0-win32\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
Got this solved. numpy is not supported PYPY3 yet, installed pypy then numpy and pandas, worked fine.
I resolved this error in the past by using visual studio and installed only the visual c++ redistribution.
https://visualstudio.microsoft.com/downloads
I hope this may help.
You could try to update setuptools by
pip install --upgrade setuptools
Also, you can see that log suggest you download MCV C++
SystemExit: error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Issues while using Snappy for tensorflow preprocessing using BeamIO

While using Apache beamIO for preprocessing data, snappy library was a good to have module for compression but looks like the file transformation doesnt seems to work as it cannot find the crc32 compress function in the library! Im using snappy-0.5.2 version
the error looks like this -
INFO:tensorflow:Saver not created because there are no variables in the graph to restore
ERROR:root:Exception at bundle <apache_beam.runners.direct.bundle_factory._Bundle object at 0x7f1dd1d60e50>, due to an exception.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/direct/executor.py", line 312, in call
side_input_values)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/direct/executor.py", line 347, in attempt_call
evaluator.process_element(value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/direct/transform_evaluator.py", line 551, in process_element
self.runner.process(element)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/common.py", line 390, in process
self._reraise_augmented(exn)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/common.py", line 388, in process
self.do_fn_invoker.invoke_process(windowed_value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/common.py", line 281, in invoke_process
self._invoke_per_window(windowed_value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/runners/common.py", line 307, in _invoke_per_window
windowed_value, self.process_method(*args_for_process))
File "/usr/local/lib/python2.7/dist-packages/apache_beam/typehints/typecheck.py", line 63, in process
return self.wrapper(self.dofn.process, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/typehints/typecheck.py", line 81, in wrapper
result = method(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/iobase.py", line 965, in process
self.writer.write(element)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/filebasedsink.py", line 299, in write
self.sink.write_record(self.temp_handle, value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/filebasedsink.py", line 129, in write_record
self.write_encoded_record(file_handle, self.coder.encode(value))
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/tfrecordio.py", line 235, in write_encoded_record
_TFRecordUtil.write_record(file_handle, value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/tfrecordio.py", line 97, in write_record
struct.pack('<I', cls._masked_crc32c(encoded_length)), #
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/tfrecordio.py", line 77, in _masked_crc32c
crc = crc32c_fn(value)
File "/usr/local/lib/python2.7/dist-packages/apache_beam/io/tfrecordio.py", line 43, in _default_crc32c_fn
_default_crc32c_fn.fn = snappy._crc32c # pylint: disable=protected-access
AttributeError: 'module' object has no attribute '_crc32c' [while running 'WriteTrainData/Write/WriteImpl/WriteBundles']
If any one could help me to use snappy with tensorflow correctly!
Thank you
I just hit this issue; I think it is due to Beam being a little careless about versions of optional test-dependencies (in this case, tensorflow and python-snappy).
The problematic code:
import snappy
snappy._crc32c
works in python-snappy version 0.5.1 but not in 0.5.2 (the latest version).
I got these Beam tests passing by installing python-snappy 0.5.1 via:
pip install \
--upgrade --ignore-installed \
python-snappy==0.5.1 \
--global-option=build_ext \
--global-option="-I/usr/local/include" \
--global-option="-L/usr/local/lib"
On OSX I need the three --global-option flags otherwise it doesn't find my snappy headers (symptom: errors about #include <snappy-c.h>) and library files, which brew install snappy placed in /usr/local/include and /usr/local/lib, respectively.
The bits before that seem necessary to override pip's default of wanting to give me the latest version.

how to compile the tutorial program on tensorflow

After configuring the tensorflow, I tried to run the command
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
But an error occured which I tried every possible but failed to solve.
ERROR: Skipping '//tensorflow/cc:tutorials_example_trainer': error loading package 'tensorflow/cc': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '#local_config_cuda//cuda': Traceback (most recent call last):
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 1042
_create_local_cuda_repository(repository_ctx)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 975, in _create_local_cuda_repository
_host_compiler_includes(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 145, in _host_compiler_includes
get_cxx_inc_directories(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 120, in get_cxx_inc_directories
set(includes_cpp)
The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/cc': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '#local_config_cuda//cuda': Traceback (most recent call last):
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 1042
_create_local_cuda_repository(repository_ctx)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 975, in _create_local_cuda_repository
_host_compiler_includes(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 145, in _host_compiler_includes
get_cxx_inc_directories(repository_ctx, cc)
File "/home/manyz/tensorflow/third_party/gpus/cuda_configure.bzl", line 120, in get_cxx_inc_directories
set(includes_cpp)
The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false
INFO: Elapsed time: 2.293s
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: tensorflow/cc
Note that: I've installed the CUDA8.0, cuDNN 5.0 and Bazel 0.6.0, My system is Ubuntu 16.04.
It seems there is already an issue open for this problem: https://github.com/tensorflow/tensorflow/issues/11859. Last comment says that the issue can be fixed by editing line 120 in tensorflow/third_party/gpus/cuda_configure.bzl. If that doesn't help I'd subscribe to the issue and wait for a fix.

Error loading library gpuarray with Theano

I am trying to run this script to test Theano's use of my GPU and get the following error:
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 164, in <module>
use(config.device)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 151, in use
init_dev(device)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 60, in init_dev
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
pygpu.gpuarray.GpuArrayException: Error loading library: -1
I need to use the nvidia-381 driver since my GPU is a 1080 ti and is not compatible with nvidia-375. I'm not sure if that matters but installing nvcc overwrites 381 and causes some errors if I reinstall 381 after setting up nvcc so I can't use nvcc.
I can import pygpu without errors but if I run pygpu.test() I get the following error and I don't know how to specify the DEVICE variable without nvcc.
======================================================================
ERROR: Failure: RuntimeError (No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/me/anaconda3/envs/py35/lib/python3.5/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/home/me/anaconda3/envs/py35/lib/python3.5/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/test_tools.py", line 5, in <module>
from .support import (guard_devsup, rand, check_flags, check_meta, check_all,
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/support.py", line 32, in <module>
context = gpuarray.init(get_env_dev())
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/support.py", line 29, in get_env_dev
raise RuntimeError("No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.")
RuntimeError: No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.
----------------------------------------------------------------------
Ran 7 tests in 0.003s
FAILED (errors=7)
<nose.result.TextTestResult run=7 errors=7 failures=0>
Warning: its entirely possible that this is all wrong and the actual reason for your problem is in fact - as you suspect - your gpu driver.
I had the same issue with gpuarray on Windows 10.
In the end I solved it by:
completely uninstall python
install cuda 8.0 (with cudnn 5.1)
install anaconda
install theano through anaconda:
conda install theano pygpu
As you are using linux: This error message basically means It didn't work, don't ask me why And is mostly shown if something with your setup is wrong (e.g. different compilers used for compiling python and theano, or incompatible cuda version)
I would recommend to update to cuda 8.0 and to reinstall your python environment over anaconda (just in case)
On a side note: I tested your example script from the docu and at least that is working....
Note for windows users: Never try to install Anaconda in a location where you have spaces in the path... Everything looks fine ... until theano starts having trouble finding and compiling things.
Note regarding the pygpu.test():
Normally you just set the environment variable:
windows: set DEVICE=cuda
linux: export DEVICE=cuda
BUT The test has the habit of saying you didn't specify a device if the library couldn't be loaded...

How to setup odoo 10 for development in macOS

I have installed all the pre-requests as in the tutorials.
When I tried to run odoo by using the following command,
./odoo.py --addons-path=addons,../mymodules --db-filter=mydb$
I am getting the following error message.
-bash: ./odoo.py: No such file or directory
Jinn-MacBook-Air:odoo juasoft$ ./odoo-bin
Traceback (most recent call last):
File "./odoo-bin", line 9, in <module>
odoo.cli.main()
File "/Users/juasoft/git/odoo/odoo/cli/command.py", line 64, in main
o.run(args)
File "/Users/juasoft/git/odoo/odoo/cli/server.py", line 164, in run
main(args)
File "/Users/juasoft/git/odoo/odoo/cli/server.py", line 122, in main
odoo.tools.config.parse_config(args)
File "/Users/juasoft/git/odoo/odoo/tools/config.py", line 315, in parse_config
odoo.netsvc.init_logger()
File "/Users/juasoft/git/odoo/odoo/netsvc.py", line 120, in init_logger
resetlocale()
File "/Users/juasoft/git/odoo/odoo/tools/translate.py", line 1185, in resetlocale
for ln in get_locales():
File "/Users/juasoft/git/odoo/odoo/tools/translate.py", line 1154, in get_locales
lang = locale.getdefaultlocale()[0]
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Jinn-MacBook-Air:odoo juasoft$
change to your home directory
cd ~
Edit .bash_profile (with vim or any text editor)
vim .bash_profile
Add the following lines to it
export LC_ALL=es_US.UTF-8
export LANG=en_US.UTF-8
And then finally source the file to make the changes take effect immediately (without this you'll have to logout and login again as .bash_profile is executed only on login)
source .bash_profile