Salome HOME
Fixing iterating observation use (4)
[modules/adao.git] / src / daComposant / daCore / PlatformInfo.py
index cad303eb0adc0922422efc88f206660ad54cbe03..950e0bbb53fb528dba60d61ebab5bb2a642e3509 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2020 EDF R&D
+# Copyright (C) 2008-2021 EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -116,6 +116,12 @@ class PlatformInfo(object):
         __msg += "\n%s%30s : %s" %(__prefix,"sys.getfilesystemencoding",str(sys.getfilesystemencoding()))
         __msg += "\n%s%30s : %s" %(__prefix,"locale.getdefaultlocale",str(locale.getdefaultlocale()))
         __msg += "\n"
+        __msg += "\n%s%30s : %s" %(__prefix,"os.cpu_count",os.cpu_count())
+        if hasattr(os, 'sched_getaffinity'):
+            __msg += "\n%s%30s : %s" %(__prefix,"len(os.sched_getaffinity(0))",len(os.sched_getaffinity(0)))
+        else:
+            __msg += "\n%s%30s : %s" %(__prefix,"len(os.sched_getaffinity(0))","Unsupported on this platform")
+        __msg += "\n"
         __msg += "\n%s%30s : %s" %(__prefix,"platform.node",platform.node())
         __msg += "\n%s%30s : %s" %(__prefix,"os.path.expanduser",os.path.expanduser('~'))
         return __msg