Ejemplo n.º 1
0
 public ClusterEnvironment(string headNode, int numberOfProcesses, ScheduleProcessPer schedulePer, string pickNodesFrom, string[] selectedItems) {
     _headNode = headNode;
     _numberOfProcesses = numberOfProcesses;
     _schedulePer = schedulePer;
     _pickNodesFrom = pickNodesFrom;
     _selectedNodes = selectedItems;
 }
Ejemplo n.º 2
0
        public ClusterEnvironment(string description) {
            if (description != null) {
                string[] elements = description.Split('/');
                if (elements.Length >= 1) {
                    _headNode = elements[0];
                    if (elements.Length >= 2) {

                        Int32.TryParse(elements[1], out _numberOfProcesses);

                        if (elements.Length >= 3) {
                            switch (elements[2].ToLower(CultureInfo.InvariantCulture)) {
                                case "node": _schedulePer = ScheduleProcessPer.Node; break;
                                case "socket": _schedulePer = ScheduleProcessPer.Socket; break;
                                case "core": _schedulePer = ScheduleProcessPer.Core; break;
                            }

                            if (elements.Length >= 4) {
                                _pickNodesFrom = elements[3];

                                if (elements.Length >= 5) {
                                    _selectedNodes = elements[4].Split(',');
                                }
                            }
                        }
                    }
                }
            } else {
                _headNode = "localhost";
                _numberOfProcesses = 1;
            }
        }
Ejemplo n.º 3
0
 public ClusterEnvironment(string headNode, int numberOfProcesses, ScheduleProcessPer schedulePer, string pickNodesFrom, string[] selectedItems)
 {
     _headNode          = headNode;
     _numberOfProcesses = numberOfProcesses;
     _schedulePer       = schedulePer;
     _pickNodesFrom     = pickNodesFrom;
     _selectedNodes     = selectedItems;
 }
Ejemplo n.º 4
0
        public ClusterEnvironment(string description)
        {
            if (description != null)
            {
                string[] elements = description.Split('/');
                if (elements.Length >= 1)
                {
                    _headNode = elements[0];
                    if (elements.Length >= 2)
                    {
                        Int32.TryParse(elements[1], out _numberOfProcesses);

                        if (elements.Length >= 3)
                        {
                            switch (elements[2].ToLower(CultureInfo.InvariantCulture))
                            {
                            case "node": _schedulePer = ScheduleProcessPer.Node; break;

                            case "socket": _schedulePer = ScheduleProcessPer.Socket; break;

                            case "core": _schedulePer = ScheduleProcessPer.Core; break;
                            }

                            if (elements.Length >= 4)
                            {
                                _pickNodesFrom = elements[3];

                                if (elements.Length >= 5)
                                {
                                    _selectedNodes = elements[4].Split(',');
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                _headNode          = "localhost";
                _numberOfProcesses = 1;
            }
        }