Dear Kenneth ,
here is an important update:
I've tried different solutions (see an unfinished report below), but
then I remembered that Cygwin has been designed to be as much
Linux-compatible
as possible;
Therefore, I simply modified get_os_type() as
------------------------------------------------------------------------------------------------------------------------------------
def get_os_type():
"""Determine system type, e.g., 'Linux', 'Darwin', 'Java'."""
os_type = platform.system()
if "CYGWIN" in os_type:
os_type = 'Linux'
if len(os_type) > 0:
return os_type
else:
raise SystemToolsException("Failed to determine system name
using platform.system().")
------------------------------------------------------------------------------------------------------------------------------------
So, to summarize my findings here is an exhaustive protocol of patches
to get python test/framework/systemtools.py working
(a have tested this sequence on clean distribution):
------------------------------------------------------------------------------------------------------------------------------------
git clone https://github.com/hpcugent/easybuild-framework
1) insert at the beginning of
easybuild-framework/test/framework/systemtools.py
import sys
import os
sys.path.append(os.path.abspath("."))
2) modify file easybuild-framework/easybuild/tools/systemtools.py as
def get_os_type():
"""Determine system type, e.g., 'Linux', 'Darwin', 'Java'."""
os_type = platform.system()
if "CYGWIN" in os_type:
os_type = 'Linux'
if len(os_type)> 0:
return os_type
else:
raise SystemToolsException("Failed to determine system name using
platform.system().")
3) replace
num_cores = int(sum(sched_getaffinity().cpus))
in easybuild-framework/easybuild/tools/systemtools.py with
import multiprocessing
num_cores = int(multiprocessing.cpu_count())
------------------------------------------------------------------------------------------------------------------------------------
The result is:
------------------------------------------------------------------------------------------------------------------------------------
*$ cat go
*#!/bin/bash
export PYTHONHOME=/usr/
export PYTHONPATH=/usr/lib/
cd easybuild-framework
python test/framework/systemtools.py
*$ ./go*
...........
----------------------------------------------------------------------
Ran 11 tests in 31.719s
OK
------------------------------------------------------------------------------------------------------------------------------------
Is it possible for you to make the aforementioned changes in the
development version of EasyBuild?
What should I do next in order to get EasyBuild installed on my Cygwin ?
Tymofii
*** AN OLD UNFINISHED REPORT ***
I installed a 'procps' package ("procps: System and process monitoring
utilities (installed binaries and support files)") which contains
sysctl.exe
and added /sbin into PATH
The result was
-------------------------
$ ./go
/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework
Python 2.7.3
AAAAA
E.EE..F.EFE
======================================================================
ERROR: test_core_count (__main__.SystemToolsTest)
Test getting core count.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 50, in test_core_count
for core_count in [get_avail_core_count(), get_core_count()]:
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 119, in get_avail_core_count
out, _ = run_cmd('sysctl -n hw.ncpu')
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.ncpu" exited with exitcode 255 and output:\nerror: "hw.ncpu" is an
unknown key\n'
======================================================================
ERROR: test_cpu_speed (__main__.SystemToolsTest)
Test getting CPU speed.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 61, in test_cpu_speed
cpu_speed = get_cpu_speed()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 257, in get_cpu_speed
raise SystemToolsException("Could not determine CPU clock frequency
(OS: %s)." % os_type)
SystemToolsException: Could not determine CPU clock frequency (OS:
CYGWIN_NT-5.1).
======================================================================
ERROR: test_cpu_vendor (__main__.SystemToolsTest)
Test getting CPU vendor.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 67, in test_cpu_vendor
cpu_vendor = get_cpu_vendor()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 179, in get_cpu_vendor
out, exitcode = run_cmd("sysctl -n hw.model")
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.model" exited with exitcode 255 and output:\nerror: "hw.model" is an
unknown key\n'
======================================================================
ERROR: test_platform_name (__main__.SystemToolsTest)
Test getting platform name.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 82, in test_platform_name
platform_name_nover = get_platform_name()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 315, in get_platform_name
raise SystemToolsException("Failed to determine platform name,
unknown system name: %s" % os_type)
SystemToolsException: Failed to determine platform name, unknown system
name: CYGWIN_NT-5.1
======================================================================
ERROR: test_system_info (__main__.SystemToolsTest)
Test getting system info.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 110, in test_system_info
system_info = get_system_info()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 460, in get_system_info
'core_count': get_avail_core_count(),
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 119, in get_avail_core_count
out, _ = run_cmd('sysctl -n hw.ncpu')
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.ncpu" exited with exitcode 255 and output:\nerror: "hw.ncpu" is an
unknown key\n'
======================================================================
FAIL: test_os_type (__main__.SystemToolsTest)
Test getting OS type.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 73, in test_os_type
self.assertTrue(os_type in [DARWIN, LINUX])
AssertionError: False is not true
======================================================================
FAIL: test_shared_lib_ext (__main__.SystemToolsTest)
Test getting extension for shared libraries.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 78, in test_shared_lib_ext
self.assertTrue(ext in ['dylib', 'so'])
AssertionError: False is not true
----------------------------------------------------------------------
Ran 11 tests in 24.938s
FAILED (failures=2, errors=5)
---------------------------------------
So, here is my modification for
easybuild-framework\easybuild\tools\systemtools.py as [
http://stackoverflow.com/questions/1006289/how-to-find-out-the-number-of-cpus-in-python
] suggested
---------------------------------------
else:
# BSD
try:
#out, _ = run_cmd('sysctl -n hw.ncpu')
#num_cores = int(out)
import multiprocessing
num_cores = int(multiprocessing.cpu_count())
---------------------------------------
Now I get
------------------------------------
$ ./go
/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework
Python 2.7.3
AAAAA
..EE..F.EFE
======================================================================
ERROR: test_cpu_speed (__main__.SystemToolsTest)
Test getting CPU speed.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 61, in test_cpu_speed
cpu_speed = get_cpu_speed()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 259, in get_cpu_speed
raise SystemToolsException("Could not determine CPU clock frequency
(OS: %s)." % os_type)
SystemToolsException: Could not determine CPU clock frequency (OS:
CYGWIN_NT-5.1).
======================================================================
ERROR: test_cpu_vendor (__main__.SystemToolsTest)
Test getting CPU vendor.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 67, in test_cpu_vendor
cpu_vendor = get_cpu_vendor()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 181, in get_cpu_vendor
out, exitcode = run_cmd("sysctl -n hw.model")
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.model" exited with exitcode 127 and output:\n/bin/bash: sysctl:
\xd0\xba\xd0\xbe\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0
\xd0\xbd\xd0\xb5 \xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd0\xb0\n'
======================================================================
ERROR: test_platform_name (__main__.SystemToolsTest)
Test getting platform name.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 82, in test_platform_name
platform_name_nover = get_platform_name()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 317, in get_platform_name
raise SystemToolsException("Failed to determine platform name,
unknown system name: %s" % os_type)
SystemToolsException: Failed to determine platform name, unknown system
name: CYGWIN_NT-5.1
======================================================================
ERROR: test_system_info (__main__.SystemToolsTest)
Test getting system info.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 110, in test_system_info
system_info = get_system_info()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 464, in get_system_info
'cpu_speed': get_cpu_speed(),
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 259, in get_cpu_speed
raise SystemToolsException("Could not determine CPU clock frequency
(OS: %s)." % os_type)
SystemToolsException: Could not determine CPU clock frequency (OS:
CYGWIN_NT-5.1).
======================================================================
FAIL: test_os_type (__main__.SystemToolsTest)
Test getting OS type.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 73, in test_os_type
self.assertTrue(os_type in [DARWIN, LINUX])
AssertionError: False is not true
======================================================================
FAIL: test_shared_lib_ext (__main__.SystemToolsTest)
Test getting extension for shared libraries.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 78, in test_shared_lib_ext
self.assertTrue(ext in ['dylib', 'so'])
AssertionError: False is not true
----------------------------------------------------------------------
Ran 11 tests in 26.797s
FAILED (failures=2, errors=4)
------------------------------------------
One more patch for easybuild-framework\easybuild\tools\systemtools.py:
---------------------------
def get_platform_name(withversion=False):
"""Try and determine platform name
e.g., x86_64-unknown-linux, x86_64-apple-darwin
"""
os_type = get_os_type()
release = platform.release()
machine = platform.machine()
if os_type == LINUX:
vendor = 'unknown'
release = '-gnu'
elif os_type == DARWIN:
vendor = 'apple'
elif os_type == CYG51NT:
vendor = 'cygwin'
-------------------------------------
and
-------------------------------------
def get_cpu_speed():
"""
Returns the (maximum) cpu speed in MHz, as a float value.
In case of throttling, the highest cpu speed is returns.
"""
os_type = get_os_type()
if (os_type == LINUX) | (os_type == CYG51NT):
-------------------------------------
and the final tweak is
-------------------------------------
def get_avail_core_count():
"""
Returns the number of available CPUs, according to cgroups and
taskssets limits
"""
# tiny inner function to help figure out number of available cores
in a cpuset
def count_bits(n):
"""Count the number of set bits for a given integer."""
bit_cnt = 0
while n > 0:
n &= n - 1
bit_cnt += 1
return bit_cnt
os_type = get_os_type()
if os_type == LINUX:
try:
# the preferred approach is via sched_getaffinity (yields a
long, so cast it down to int)
#num_cores = int(sum(sched_getaffinity().cpus))
import multiprocessing
num_cores = multiprocessing.cpu_count()
return num_cores
---------------------------------
Finally I have
===========================================
$ ./go
/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework
Python 2.7.3
AAAAA
...........
----------------------------------------------------------------------
Ran 11 tests in 26.953s
OK
===========================================
-------- Исходное сообщение --------
Тема: Re: [easybuild] Failed to install EasyBuild via bootstraping in
Cygwin
Дата: Tue, 08 Jul 2014 20:57:08 +0300
От: Tymofii Nikolaienko <[email protected]>
Отвечать: [email protected]
Кому: [email protected]
Dear Kenneth,
In fact, my motivation for installing EqsyBuild on Cygwin is very
"prosaic": I'd like to have such quantum-chemical
software as NwChem and PSI4 compiled for Windows.
I've succeeded in doing so with GROMACS and some related tools and with
NwChem 6.1 with Gygwin with some
tricks/workaround. However, many efforts with compiling NwChem 6.3 and
PSI4 beta 5 in a variety of ways failed.
Lately, I noted that on a certain Linux machine it was also VERY
problematic to compile above mentioned versions of
NwChem and PSI4. But when I installed GCC 4.7.2 from EasyBuild's
packages everything gone fine! This story makes
me suspect that if I use some EasyBuild's package of GCC under Cygwin I
may also be succeeded.
I think that it won't be a problem to try to play around with a
development setup of EasyBuild.
Unfortunately, I'm not very familiar with git/GitHub and Python
(regardless of the fact that recently one
of my friends has strongly advised me to get familiar with Python), but
I have some experience with Cygwin.
Here is the log of cloning files from gitHub under Cygwin:
------------------------------------------------
*$ git clone [email protected]:hpcugent/easybuild-framework.git
*Cloning into 'easybuild-framework'...
The authenticity of host 'github.com (192.30.252.128)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list
of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
*$ git clone [email protected]:hpcugent/easybuild-framework.git
*Cloning into 'easybuild-framework'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
*$ git clone https://github.com/hpcugent/easybuild-framework
*Cloning into 'easybuild-framework'...
remote: Reusing existing pack: 32648, done.
remote: Counting objects: 1032, done.
remote: Compressing objects: 100% (588/588), done.
remote: Total 33680 (delta 701), reused 649 (delta 430)
Receiving objects: 100% (33680/33680), 6.20 MiB | 465 KiB/s, done.
Resolving deltas: 100% (23696/23696), done.
----------------------------------------
Here is the next step:
---------------------------------------
*$ ls
*easybuild-framework go
*$ cat go
*#!/bin/bash
export PYTHONHOME=/usr/
export PYTHONPATH=/usr/lib/
cd easybuild-framework
python test/framework/systemtools.py
*$ ./go
*Traceback (most recent call last):
File "test/framework/systemtools.py", line 30, in <module>
from test.framework.utilities import EnhancedTestCase
ImportError: No module named test.framework.utilities
----------------------------------------
Then I followed this [
http://stackoverflow.com/questions/17976158/python-unable-to-import-module
] advice and modified easybuild-framework\test\framework\systemtools.py
by including
import sys
print "AAAAA"
sys.path.append("/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework")
After that I got
-------------------------------------
*$ ./go
*/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework
Python 2.7.3
AAAAA
Traceback (most recent call last):
File "test/framework/systemtools.py", line 35, in <module>
from test.framework.utilities import EnhancedTestCase
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/test/framework/utilities.py",
line 39, in <module>
import easybuild.tools.options as eboptions
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/options.py",
line 41, in <module>
from easybuild.framework.easyblock import EasyBlock
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyblock.py",
line 55, in <module>
from easybuild.framework.easyconfig.default import
get_easyconfig_parameter_default
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/__init__.py",
line 35, in <module>
from easybuild.framework.easyconfig.easyconfig import EasyConfig
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/easyconfig.py",
line 58, in <module>
from easybuild.framework.easyconfig.format.convert import Dependency
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/format/__init__.py",
line 33, in <module>
from easybuild.framework.easyconfig.format.one import FormatOneZero
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/format/one.py",
line 40, in <module>
from easybuild.framework.easyconfig.format.pyheaderconfigobj import
EasyConfigFormatConfigObj
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/format/pyheaderconfigobj.py",
line 38, in <module>
from easybuild.framework.easyconfig.templates import TEMPLATE_CONSTANTS
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/framework/easyconfig/templates.py",
line 113, in <module>
('SHLIB_EXT', get_shared_lib_ext(), 'extension for shared libraries'),
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 296, in get_shared_lib_ext
"unknown system name: %s" % os_type)
*easybuild.tools.systemtools.SystemToolsException: Unable to determine
extention for shared libraries,unknown system name: CYGWIN_NT-5.1*
-------------------------------------
I tried resolving this by modifying
easybuild-framework\easybuild\tools\systemtools.py (backslash by Windows
tradition ;) ) by adding
-------------------------
# constants
AMD = 'AMD'
ARM = 'ARM'
INTEL = 'Intel'
LINUX = 'Linux'
DARWIN = 'Darwin'
CYG51NT = 'CYGWIN_NT-5.1' # <---------------
-------------------------
and
-------------------------
def get_shared_lib_ext():
"""Determine extention for shared libraries
Linux: 'so', Darwin: 'dylib'
"""
shared_lib_exts = {
LINUX: 'so',
DARWIN: 'dylib',
CYG51NT: 'dll'
}
-------------------------
After this I got
-------------------------
*$ ./go
*/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework
Python 2.7.3
AAAAA
E.EE..F.EFE
======================================================================
ERROR: test_core_count (__main__.SystemToolsTest)
Test getting core count.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 50, in test_core_count
for core_count in [get_avail_core_count(), get_core_count()]:
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 119, in get_avail_core_count
out, _ = run_cmd('sysctl -n hw.ncpu')
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.ncpu" exited with exitcode 127 and output:\n/bin/bash: sysctl:
\xd0\xba\xd0\xbe\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0
\xd0\xbd\xd0\xb5 \xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd0\xb0\n'
======================================================================
ERROR: test_cpu_speed (__main__.SystemToolsTest)
Test getting CPU speed.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 61, in test_cpu_speed
cpu_speed = get_cpu_speed()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 257, in get_cpu_speed
raise SystemToolsException("Could not determine CPU clock frequency
(OS: %s)." % os_type)
SystemToolsException: Could not determine CPU clock frequency (OS:
CYGWIN_NT-5.1).
======================================================================
ERROR: test_cpu_vendor (__main__.SystemToolsTest)
Test getting CPU vendor.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 67, in test_cpu_vendor
cpu_vendor = get_cpu_vendor()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 179, in get_cpu_vendor
out, exitcode = run_cmd("sysctl -n hw.model")
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.model" exited with exitcode 127 and output:\n/bin/bash: sysctl:
\xd0\xba\xd0\xbe\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0
\xd0\xbd\xd0\xb5 \xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd0\xb0\n'
======================================================================
ERROR: test_platform_name (__main__.SystemToolsTest)
Test getting platform name.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 82, in test_platform_name
platform_name_nover = get_platform_name()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 315, in get_platform_name
raise SystemToolsException("Failed to determine platform name,
unknown system name: %s" % os_type)
SystemToolsException: Failed to determine platform name, unknown system
name: CYGWIN_NT-5.1
======================================================================
ERROR: test_system_info (__main__.SystemToolsTest)
Test getting system info.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 110, in test_system_info
system_info = get_system_info()
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 460, in get_system_info
'core_count': get_avail_core_count(),
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/systemtools.py",
line 119, in get_avail_core_count
out, _ = run_cmd('sysctl -n hw.ncpu')
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 80, in inner
return func(cmd, *args, **kwargs)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 153, in run_cmd
return parse_cmd_output(cmd, stdouterr, ec, simple, log_all,
log_ok, regexp)
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/run.py",
line 382, in parse_cmd_output
_log.error('cmd "%s" exited with exitcode %s and output:\n%s' %
(cmd, ec, stdouterr))
File
"/cygdrive/k/cygwin/dev-tools/EasyBuild/Kenneth/easybuild-framework/easybuild/tools/build_log.py",
line 103, in error
raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at
easybuild/tools/run.py:382 in parse_cmd_output): cmd " sysctl -n
hw.ncpu" exited with exitcode 127 and output:\n/bin/bash: sysctl:
\xd0\xba\xd0\xbe\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0
\xd0\xbd\xd0\xb5 \xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd0\xb0\n'
======================================================================
FAIL: test_os_type (__main__.SystemToolsTest)
Test getting OS type.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 73, in test_os_type
self.assertTrue(os_type in [DARWIN, LINUX])
AssertionError: False is not true
======================================================================
FAIL: test_shared_lib_ext (__main__.SystemToolsTest)
Test getting extension for shared libraries.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/framework/systemtools.py", line 78, in test_shared_lib_ext
self.assertTrue(ext in ['dylib', 'so'])
AssertionError: False is not true
----------------------------------------------------------------------
Ran 11 tests in 27.406s
FAILED (failures=2, errors=5)
-------------------------
But what do all these mean? What should I do next?...
P.S. Would you please advise how to convert
\xd0\xba\xd0\xbe\xd0\xbc\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0
\xd0\xbd\xd0\xb5
\xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd0\xb0 - like
strings into a printable ones (perhaps, there are some problems due to
cyrryllic encoding on my system...)
Thank you for support!
Tymofii
08.07.2014 10:03, Kenneth Hoste wrote:
Hi Tymofii,
Welcome to the wonderful world of EasyBuild!
On 08/07/14 08:24, [email protected] wrote:
Dear developers,
I ran into troubles when trying to install EasyBuild via
bootstraping under
Cygwin.
That's quite brave!
Can you elaborate a bit why you're looking into using EasyBuild on
Cygwin?
As far as I understand the error stems from here:
------------systemtools.py------------
def get_shared_lib_ext():
"""Determine extention for shared libraries
Linux: 'so', Darwin: 'dylib'
"""
shared_lib_exts = {
LINUX: 'so',
DARWIN: 'dylib'
}
os_type = get_os_type()
if os_type in shared_lib_exts.keys():
return shared_lib_exts[os_type]
else:
raise SystemToolsException("Unable to determine extention
for shared
libraries,"
"unknown system name: %s" % os_type)
-------------------------------------------
As the error message suggests, 'CYGWIN_NT-5.1' (or, more generally,
'CYGWIN*')
should be
present in shared_lib_exts array.
Is it possible to overcome this difficulty ?
You're exactly right: as far as I know, nobody has tried using
EasyBuild on Cygwin before (or gave up very soon after running into
this). Congratulations, you're not the EasyBuild maintainer for
Cygwin. ;-)
To start with making it work (or try it), you'll have to make
EasyBuild Cygwin-aware.
Since the bootstrap pulls in the latest EasyBuild release, installing
EasyBuild this way won't work.
We can't include Cygwin support before it has been tested properly, so
if you want to look into this, you'll need to play around with a
development setup of EasyBuild.
Are you up for that?
How familiar are you with git/GitHub, Python, Cygwin?
In short, here's what I recommend to get started:
0) get a copy of the EasyBuild framework code repository, check out
the develop branch:
git clone [email protected]:hpcugent/easybuild-framework.git
git checkout -b develop origin/develop
If you're unfamiliar with git, you can download the current develop
version directly by downloading and unpacking
https://github.com/hpcugent/easybuild-framework/archive/develop.tar.gz
(but you won't have an easy way of staying up to date).
1) Try running the EasyBuild unit tests, and see what kind of trouble
you run into. Start with the unit tests for systemtools.py specifically:
$ cd easybuild-framework
$ python test/framework/systemtools.py
...........
----------------------------------------------------------------------
Ran 11 tests in 3.871s
OK
To add initial Cygwin support, dive into
easybuild/tools/systemtools.py, and try extending the code to make it
Cygwin aware.
Let us know how that turns out, or if you have any further questions.
regards,
Kenneth