I tried to compile CP2K-3 on my Windows 10 laptop PC
in accordance with "How to Compile and Install CP2K on Windows with Cygwin"
(https://www.cp2k.org/howto:compile_on_windows_with_cygwin)
cp2k-3.0/tools/build_utils/makedep.py in collect_include_deps
#=============================================================================
def collect_include_deps(parsed_files, fn):
# pf = parsed_files[fn]
# incs = []
# for i in pf['include']:
# fn_inc = normpath(path.join(dirname(fn), i))
# if(parsed_files.has_key(fn_inc)):
# incs.append(fn_inc)
# incs += collect_include_deps(parsed_files, fn_inc)
# return(list(set(incs)))
pf = parsed_files[fn]
incs = []
for i in pf['include']:
fn_inc = normpath(path.join(dirname(fn), i))
if(parsed_files.has_key(fn_inc)):
incs.append(fn_inc)
incs += list(set(incs))
return(list(set(incs)))
#=============================================================================
def collect_use_deps(parsed_files, fn):
# pf = parsed_files[fn]
# uses = pf['use']
# for i in pf['include']:
# fn_inc = normpath(path.join(dirname(fn), i))
# if(parsed_files.has_key(fn_inc)):
# uses += collect_use_deps(parsed_files, fn_inc)
# return(list(set(uses)))
pf = parsed_files[fn]
uses = pf['use']
for i in pf['include']:
fn_inc = normpath(path.join(dirname(fn), i))
if(parsed_files.has_key(fn_inc)):
uses += list(set(uses))
return(list(set(uses)))
#=============================================================================
Any way the python error did not happen after the rewite, another error came to happen.
Can't open module file "***.mod".
File "/Users/apadua/sw/cp2k-3.0/tools/build_utils/makedep.py", line 233, in collect_include_deps
incs += collect_include_deps(parsed_files, fn_inc)
File "/Users/apadua/sw/cp2k-3.0/tools/build_utils/makedep.py", line 230, in collect_include_deps
fn_inc = normpath(path.join(dirname(fn), i))
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 332, in normpath
slash, dot = (u'/', u'.') if isinstance(path, _unicode) else ('/', '.')
RuntimeError: maximum recursion depth exceeded while calling a Python object
though cp2k 2.6.2 compiles perfectly with the same makedep.py
Agilio
Hello
Cp2k-3.0 was successfully compiled with Cygwin after renaming src/dbcsr/mm/libxsmm.F to libxsmm_wrap.F
as suggested in an another post.