Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{devel}[foss/2016b] TensorFlow v1.0.1, SWIG v3.0.10, wheel v0.30.0a0, ... #4412

Conversation

gppezzi
Copy link
Contributor

@gppezzi gppezzi commented Mar 29, 2017

(created using eb --new-pr)

@gppezzi gppezzi changed the title {devel}[foss/2016b] TensorFlow v1.0.0, SWIG v3.0.10, wheel v0.30.0a0, ... WIP {devel}[foss/2016b] TensorFlow v1.0.0, SWIG v3.0.10, wheel v0.30.0a0, ... Mar 29, 2017

name = 'SWIG'
version = '3.0.10'
pyver = '3.5.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop this, EB provides it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

('PCRE', '8.38'),
]

# fix for TensorFlow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain a bit more? Why does Tensorflow require an rpath in SWIG?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an issue on Cray and using older version of Bazel, I've just removed the fix and it seems to work now.


sanity_check_paths={
'files': ['%(builddir)s/tensorflow-%(version)s-cp35-cp35m-linux_x86_64.whl'],
'dirs': ['%(installdir)s/lib/python%(pyshortver)s/site-packages'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop installdir here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

]

sanity_check_paths={
'files': ['%(builddir)s/tensorflow-%(version)s-cp35-cp35m-linux_x86_64.whl'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why check something in the builddir? it gets deleted at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, I'll blame one of the co-authors 😄
Fixed.

}

moduleclass = 'devel'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no trailing empty lines

+
+sed -i s\@'$EBROOTGCCCORE'@"$EBROOTGCCCORE"@g third_party/gpus/crosstool/CROSSTOOL.tpl
+sed -i s\@'$EBROOTBINUTILS'@"$EBROOTBINUTILS"@g third_party/gpus/crosstool/CROSSTOOL.tpl
+sed -i s\@'$EBROOTGCCCORE'@"$EBROOTGCCCORE"@g third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should put things like this in an easyblock

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, but thanks for sharing @gppezzi, this is going to be a major help!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not against, but I don't have time to work on this :)

@@ -0,0 +1,103 @@
diff --git a/configure-cscs.sh b/configure-cscs.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claim authorship and explain what you patch does

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

# Patch to remove hardcoded paths for GCC and Binutils
patches = [('tensorflow-v%(version)s-Python-%(pyver)s-foss.patch')]

with_configure = False
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this have any effect on a CmdCp easyblock?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, CmdCp derives from MakeCp, so it's taken into account, but the default value is already False:

$ eb -a -e CmdCp | grep with_configure
with_configure*         Run configure script before building [default: False]

@gppezzi gppezzi changed the title WIP {devel}[foss/2016b] TensorFlow v1.0.0, SWIG v3.0.10, wheel v0.30.0a0, ... {devel}[foss/2016b] TensorFlow v1.0.1, SWIG v3.0.10, wheel v0.30.0a0, ... Mar 29, 2017
@gppezzi gppezzi mentioned this pull request Mar 29, 2017
@gppezzi
Copy link
Contributor Author

gppezzi commented Mar 29, 2017

Test report by @gppezzi
SUCCESS
Build succeeded for 5 out of 5 (4 easyconfigs in this PR)
leone2 - Linux RHEL 6.7, Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, Python 2.7.12
See https://gist.github.com/1eefb0944a837f2672ec3fa5be9a4b10 for a full test report.

@boegel
Copy link
Member

boegel commented Mar 29, 2017

Test report by @boegel
SUCCESS
Build succeeded for 33 out of 33 (4 easyconfigs in this PR)
node2520.golett.os - Linux centos linux 7.3.1611, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/75dbaa98a94f78994c167df3574033fe for a full test report.

@boegel
Copy link
Member

boegel commented Mar 29, 2017

Test report by @boegel
SUCCESS
Build succeeded for 4 out of 4 (4 easyconfigs in this PR)
node2156.delcatty.os - Linux centos linux 7.3.1611, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz, Python 2.7.5
See https://gist.github.com/3e20876b4d8d14d680e5821b37ab3d2d for a full test report.

@boegel boegel added this to the 3.2.0 milestone Mar 29, 2017
@RvDijk
Copy link
Contributor

RvDijk commented Apr 19, 2017

What is the status on this PR?
Also, is it possible that the protobuf-python module also needs to be loaded in order for this to work?

@gppezzi
Copy link
Contributor Author

gppezzi commented Apr 19, 2017

Status on this PR: the reviewers suggested to write a custom easyblock for fixing the hardcoded absolute paths (instead of this hack).

I'm not planning to work on this anytime soon, so PRs against my branch are welcome.

@RvDijk did you have problems because of missing protobuf?

I've removed it from the dependency list because Bazel was ignoring it and building a new one inside its own workspace (see fix for protobuf here).

@RvDijk
Copy link
Contributor

RvDijk commented Apr 19, 2017

@gppezzi leaving out the protobuf-python module gives me the following when importing the tensorflow module in Python (after having succesfully installed this tensorflow eb):

>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/software/software/tensorflow/1.0.1-foss-2016a-Python-3.5.2/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/software/software/tensorflow/1.0.1-foss-2016a-Python-3.5.2/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 75, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/software/software/tensorflow/1.0.1-foss-2016a-Python-3.5.2/lib/python3.5/site-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ImportError: No module named 'google'

And in this case including protobuf-python (3.2.0) fixed it. Could be a local issue if this does not occur anywhere else. Does it work for you without it?

@gppezzi
Copy link
Contributor Author

gppezzi commented Apr 20, 2017

@RvDijk thanks for reporting this, I'm including protobuf-python as dependency.

Maybe we should write a comment mentioning that this protobuf-python version is not the one used for building TF but it is needed at runtime?

Unless someone wants to find a way to re-use the contents of the bazel workspace 😄

@RvDijk
Copy link
Contributor

RvDijk commented Apr 20, 2017

@gppezzi it would be nice to mention it, otherwise it might confuse others.
I wonder if figuring out the bazel workspace for re-use is worth the time... 😃

@boegel
Copy link
Member

boegel commented Jul 12, 2017

@boegel
Copy link
Member

boegel commented Aug 12, 2017

More useful information for building Tensorflow from source with Intel compilers: https://software.intel.com/en-us/articles/tensorflow-optimizations-on-modern-intel-architecture

@boegel boegel modified the milestones: 3.5.0, 3.4.0 Sep 6, 2017
@boegel
Copy link
Member

boegel commented Sep 15, 2017

@boegel
Copy link
Member

boegel commented Sep 15, 2017

@boegel
Copy link
Member

boegel commented Nov 7, 2017

Finally made some progress here... First step: an easyblock for Bazel, see easybuilders/easybuild-easyblocks#1286, plus accompanying easyconfig file for latest Bazel version, see #5311.

@bartoldeman
Copy link
Contributor

@boegel boegel modified the milestones: 3.5.0, next release Dec 6, 2017
@boegel boegel modified the milestones: 3.5.1, 3.6.0 Jan 11, 2018
@boegel
Copy link
Member

boegel commented Feb 20, 2018

@gppezzi We now have a custom easyblock for TensorFlow, see easybuilders/easybuild-easyblocks#1287, and easyconfigs for building TensorFlow from source, both CPU-only (see #5819) and with GPU support (see #5769).

So this can be closed?

@gppezzi
Copy link
Contributor Author

gppezzi commented Feb 20, 2018

Sure.

@gppezzi gppezzi closed this Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants