Closed PaoloBenigni closed 6 years ago
In our experience the windows POSIX extensions are a semi-functional nightmare, and we have no plans to support Win... Actually even getting TF working on windows was awful the last time we tried. That said: these routines in SH.hpp aren't really used in the code you would be interested in using. Actually we've since re-written them in Tensorflow.
I think you should try basically commenting out the function bodies. I think that should work for your purposes.
So it doesnt seem to be so straight forward. Other parts of MolEmb.cpp start falling apart. A few or to || conversions fixed some of it, but there are still other problems im trying to sort out.
./C_API/MolEmb.cpp(820): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(820): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(820): note: see usage of 'natom'
./C_API/MolEmb.cpp(832): error C3863: array type 'double [natom][3]' is not assignable
./C_API/MolEmb.cpp(833): error C3863: array type 'double [natom][3]' is not assignable
./C_API/MolEmb.cpp(834): error C3863: array type 'double [natom][3]' is not assignable
./C_API/MolEmb.cpp(1265): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(1265): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(1265): note: see usage of 'xyz'
./C_API/MolEmb.cpp(1309): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(1265): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(1265): note: see usage of 'xyz'
./C_API/MolEmb.cpp(1336): error C3863: array type 'int [nx]' is not assignable
./C_API/MolEmb.cpp(1414): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(1414): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(1414): note: see usage of 'dmat1'
./C_API/MolEmb.cpp(1417): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(1414): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(1414): note: see usage of 'dmat1'
./C_API/MolEmb.cpp(2063): error C2131: expression did not evaluate to a constant
./C_API/MolEmb.cpp(2063): note: failure was caused by a read of a variable outside its lifetime
./C_API/MolEmb.cpp(2063): note: see usage of 'dim_zeta'
./C_API/MolEmb.cpp(2089): error C3863: array type 'double [dim_zeta]' is not assignable
./C_API/MolEmb.cpp(2092): error C3863: array type 'double [dim_eta1]' is not assignable
./C_API/MolEmb.cpp(2094): error C3863: array type 'double [dim_eta2]' is not assignable
./C_API/MolEmb.cpp(2096): error C3863: array type 'double [dim_Rs]' is not assignable
@PaoloBenigni I recommend using Bash on Ubuntu on Windows if you really want to keep using windows. It's pretty easy to install and should make your life a lot easier.
Someone even has a gist on installing Tensorflow to it (although I would just follow normal install directions).
So actually tensorflow isnt too bad to get running on windows without doing too much. Im just confused as to why there are all these errors. It installs find on my debian subsystem, just not ideal for me.
I think there is some environment or compiler setting that is not quite correct, I'll keep poking around.
@PaoloBenigni Going back to your original errors
c:\users\hi\desktop\git\tensormol\c_api\SH.hpp(850): error C2131: expression did not evaluate to a constant
It seems that that the problem is likely because they are Variable Length Arrays, something which GCC supports, but MSVC does not. See this stack overflow question here. As @jordangarside suggests, I would recommend using the Windows Subsystem for Linux if you must stick with Windows.
So I was able to install TensorMol. The only code changes are adding sys imports as in this PR.
So I installed MINGW64 from here and added to path. For me this was C:\msys64\mingw64\bin
Then I had to change line 204 and 241 from _hypot to hypot in pyconfig.h. This is found in C:\Python36\include\
I had to add the folllowing lines to cygwincompiler.py in C:\Python36\Lib\distutils after line 84
elif msc_ver == '1700':
# Visual Studio 2012 / Visual C++ 11.0
return ['msvcr110']
elif msc_ver == '1800':
# Visual Studio 2013 / Visual C++ 12.0
return ['msvcr120']
elif msc_ver == '1900':
# Visual Studio 2015 / Visual C++ 14.0
# "msvcr140.dll no longer exists" http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
return ['vcruntime140']
Then create distutils.cfg in python36\Lib\distutils\distutils.cfg
[build]
compiler=mingw32
[build_ext]
compiler=mingw32
And finally copy vcruntime140.dll into C:\Python36\libs. Hope this helps!
<== Impressed. Just to motivate your explorations, 0.2 is only a few weeks away, and features support for many more elements, new calculation types, faster evaluation, etc. Thanks for your useful comments.
So I am trying to install this on windows, and I'm getting an odd error in SH.hpp that seems to be killing the installation. Here is the output code.
There are a few thing to change in the compiling arguments, but Im not quite sure why the error in SH.hpp comes out. Any thoughts?