{"__v":10,"_id":"5731d28b4245100e00174508","category":{"__v":4,"_id":"55faf96917b9d00d00969f48","pages":["5626a5d644c87f0d00fe6396","5626a5e4e2ce610d004e3dd8","5626a89ce2ce610d004e3dde","56429a87f49bfa0d002f54e0"],"project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-17T17:33:29.016Z","from_sync":false,"order":17,"slug":"run-an-analysis","title":"RUN AN ANALYSIS"},"parentDoc":null,"project":"55faf11ba62ba1170021a9a7","user":"554340dfb7f4540d00fcef1d","version":{"__v":35,"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","createdAt":"2015-09-17T16:58:03.490Z","releaseDate":"2015-09-17T16:58:03.490Z","categories":["55faf11ca62ba1170021a9ab","55faf8f4d0e22017005b8272","55faf91aa62ba1170021a9b5","55faf929a8a7770d00c2c0bd","55faf932a8a7770d00c2c0bf","55faf94b17b9d00d00969f47","55faf958d0e22017005b8274","55faf95fa8a7770d00c2c0c0","55faf96917b9d00d00969f48","55faf970a8a7770d00c2c0c1","55faf98c825d5f19001fa3a6","55faf99aa62ba1170021a9b8","55faf99fa62ba1170021a9b9","55faf9aa17b9d00d00969f49","55faf9b6a8a7770d00c2c0c3","55faf9bda62ba1170021a9ba","5604570090ee490d00440551","5637e8b2fbe1c50d008cb078","5649bb624fa1460d00780add","5671974d1b6b730d008b4823","5671979d60c8e70d006c9760","568e8eef70ca1f0d0035808e","56d0a2081ecc471500f1795e","56d4a0adde40c70b00823ea3","56d96b03dd90610b00270849","56fbb83d8f21c817002af880","573c811bee2b3b2200422be1","576bc92afb62dd20001cda85","5771811e27a5c20e00030dcd","5785191af3a10c0e009b75b0","57bdf84d5d48411900cd8dc0","57ff5c5dc135231700aed806","5804caf792398f0f00e77521","58458b4fba4f1c0f009692bb","586d3c287c6b5b2300c05055"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["57f5838cba9c822b00d58b80"],"next":{"pages":[],"description":""},"createdAt":"2016-05-10T12:22:35.221Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"Each tool that is run in a task is executed on a computation instance in the cloud. Instances are virtual computers; different instance types have different allocations of CPU and memory, so are suited for workloads with different computational requirements. \nThe Platform uses a scheduling algorithm to select an appropriate computation instance for each tool that is run in a task. The algorithm assigns to each a tool an instance that has sufficient resources to run the tool, and, when running workflows made of multiple tools, is optimized to efficiently pack tools onto instances. While the scheduling algorithm will select a default instance that is suitable for your task, in some cases you might want to override the algorithm to select a specific instance type to run the task on. This page explains how to set the instance type for a task.\nTake a look at the Seven Bridges scheduling algorithm that is used to allocate instances to tasks.\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"To see how tool executions are fitted onto instances, take a look at [the scheduling algorithm](page:multi-instance-scheduling-algorithm) we use to allocate instances to tasks.\",\n  \"title\": \"Seven Bridges scheduling algorithm\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"* [Available instance types](doc:set-computation-instances#section-available-instance-types)\\n  * [Determining instance types](doc:set-computation-instances#section-determining-instance-types)\\n  * [Choose an instance type that is sufficient for your task](doc:set-computation-instances#section-choose-an-instance-type-that-is-sufficient-for-your-task)\\n  * [Running instances in parallel](doc:set-computation-instances#section-running-instances-in-parallel)\\n* [Set the instance type for a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-workflow)\\n* [Set the instance type for a tool](doc:set-computation-instances#section-set-the-instance-type-for-a-tool)\\n* [Set the instance type for any tool(s) in a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-tool-in-a-workflow)\",\n  \"title\": \"On this page\"\n}\n[/block]\n##Available instance types\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"To see which instance types are available, you should know which cloud infrastructure provider you run the Seven Bridges Platform on: Amazon Web Services (AWS) or Google Cloud Platform. If you didn't chose a cloud provider when you signed up for the Platform, you will be using AWS. If you signed up from early 2016, you will have had the option to select your cloud provider from AWS and Google Cloud Platform.\",\n  \"title\": \"Available instance types depend on your cloud infrastructure provider.\"\n}\n[/block]\n\n[See the AWS page on instance types for details of these instances' CPU and memory.\n](https://aws.amazon.com/ec2/instance-types/).\n\nIf you use the Seven Bridges Platform on AWS infrastructure, chose an instance type from the following list and specify it as a value for the **sbg:AWSInstanceType** hint:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"AWS instance types\",\n    \"0-0\": \"Default instance: c4.2xlarge with 1TB EBS\\nm1.small\\nm1.medium\\nm1.large\\nm1.xlarge\\nm2.xlarge\\nm2.2xlarge\\nm2.4xlarge\\nm3.medium\\nm3.large\\nm3.xlarge\\nm3.2xlarge\\nc1.medium\",\n    \"0-1\": \"c1.xlarge\\nc3.large\\nc3.xlarge\\nc3.2xlarge\\nc3.4xlarge\\nc3.8xlarge\\nr3.large\\nr3.xlarge\\nr3.2xlarge\\nr3.4xlarge\\nr3.8xlarge\\ni2.xlarge\",\n    \"0-2\": \"i2.2xlarge\\ni2.4xlarge\\ni2.8xlarge\\ncr1.8xlarge\\ncc2.8xlarg\\nc4.large with 700GB EBS\\nc4.xlarge with 700GB EBS\\nc4.2xlarge with 1TB EBS\\nc4.4xlarge with 700GB EBS\\nc4.8xlarge with 700GB EBS\",\n    \"0-3\": \"c4.8xlarge.ebs15 with 1.4TB EBS\\nr3.8xlarge.ebs15 with 1.4TB EBS\\nr3.8xlarge.ebs20 with  2TB EBS\\nm4.10xlarge.ebs14 with 1.4TB EBS\\nm4.16xlarge with 1TB EBS\",\n    \"h-3\": \"Plus the following custom instances:\"\n  },\n  \"cols\": 4,\n  \"rows\": 1\n}\n[/block]\n[See the AWS page on instance types for details of these instances' CPU and memory.\n](https://aws.amazon.com/ec2/instance-types/).\n\nIf you use the Seven Bridges Platform on Google Cloud infrastructure, chose an instance type from the following list and specify it as a value for the **sbg:GCPInstanceType** hint:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Google Cloud Platform instance types\",\n    \"0-0\": \"Default instance: n1-standard-8 with 160 GB SSD \\nn1-standard-1\\nn1-standard-2\\nn1-standard-4\\nn1-standard-8\\nn1-standard-16\\nn1-standard-32\",\n    \"0-1\": \"n1-highmem-2\\nn1-highmem-4\\nn1-highmem-8\\nn1-highmem-16\\nn1-highmem-32\",\n    \"0-2\": \"n1-highcpu-2\\nn1-highcpu-4\\nn1-highcpu-8\\nn1-highcpu-16\\nn1-highcpu-32\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n[See the Google Cloud Platform page on their instance types.\n](https://cloud.google.com/compute/docs/machine-types#predefined_machine_types).\n\nPlease note that only a subset of the instance types listed above are available to the scheduling algorithm. In particular, the scheduler will never allocate an instance with very low resources.\n\n###Determining instance types\nAll public tools and workflows have defined requirements for CPU and memory. These are used by the scheduler on the Platform to pick a suitable computation instance for the app to be run on.  You can override this selection in a number of ways:\n\n  * You can [set the instance type for an entire workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-workflow). This will override any setting that you have made for any given tool in the workflow.\n  * You can [set the instance type for any tool](doc:set-computation-instances#section-set-the-instance-type-for-a-tool) (either one you have added to the CGC yourself, using the SDK, or a public tool) using the tool editor.  This will override the instance type selected by the scheduler.\n  * You can [set the instance type for any tool(s) in a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-tool-in-a-workflow). This will override any setting you have made on the tool editor.\n \n###Choose an instance type that is sufficient for your task\nIf you override the instance type that the scheduling algorithm selects on the basis of the app's required resources, and instead pick your own instance, you may inadvertently select one that doesn't have enough resources to run the app successfully. To make sure you pick a suitable instance, check the required resources of the tool you want to use. To do this, open the tool in the tool editor, by clicking the Edit button. Note that you can only edit a tool that is in one of your projects.\nThe tool editor contains fields labelled CPU and Memory (MB). These contain the number of CPUs and amount of memory deemed necessary for running the tool by the person who wrapped it (either one of Seven Bridges' bioinformaticians, in the case of a publicly available tool, or another Seven Bridges Platform user who has shared an edited tool with you).\nIf you try to set an instance type that fails to meet a tool's required resources, then, wherever possible, you will see a warning notification. However, sometimes a tool's required resources are set dynamically. For instance, the tool may require two times as many CPUs as it has input files, and the number of input files to the tool will depend on the behavior of the tool before it in a pipeline. In this case, it may not be possible to raise an error about insufficient resources before running the app, and you will see an error during its execution.\n\nSee the documentation on [the tool editor](doc:the-tool-editor) for more information on how to describe a tool. In particular, see how to set a tool's [required resources](doc:general-tool-information#resources). For details of how dynamic expressions may be used, see the documentation on [dynamic expressions in tool descriptions](doc:dynamic-expressions-in-tool-descriptions).\n\n###Running instances in parallel\nYou can set the maximum number of instances to run in parallel for a workflow. See the instructions below on setting the instance type for an entire workflow for details.\n\n##Set the instance type for a workflow\nYou can set the instance for an entire workflow. This means that all tools in the workflow run on the selected instance type.\n\n1. To set the instance type for a workflow, you should add it to a project. Then, on the **Apps** tab of the project dashboard, click the pencil icon next to the tool to open the workflow editor.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/do5rTo2BS7ahdUlMoKSE_Screen%20Shot%202016-04-19%20at%2012.41.50.png\",\n        \"Screen Shot 2016-04-19 at 12.41.50.png\",\n        \"3274\",\n        \"734\",\n        \"#3cb454\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n2. Click the ellipses icon (**. . .**) in the top right corner of the workflow editor, and select **Settings**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/IF73jYHTsyQWvH2js8AA_Screen%20Shot%202016-04-20%20at%2015.54.13.png\",\n        \"Screen Shot 2016-04-20 at 15.54.13.png\",\n        \"3246\",\n        \"1324\",\n        \"#344b64\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n3. You will see the **Workflow settings** popup window, shown below. Enter the following information:\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/hIkhTaQfm3X1SqAZPUgC_Screen%20Shot%202016-05-17%20at%2011.21.27.png\",\n        \"Screen Shot 2016-05-17 at 11.21.27.png\",\n        \"1182\",\n        \"638\",\n        \"#4779a5\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**To set the instance type:\n**In the field marked **Requirement class** enter 'sbg:AWSInstanceType'.\nIn the field marked **Requirement value enter** an instance type from the [tables at the top of this page](doc:set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box.\n \n\nOn the **Workflow settings** popup you can also set the maximum number of instances to be used in parallel by the workflow.\nTo set the maximum number of instances to be used in parallel:\n \nClick the plus (**+**) icon to create new empty fields.\nIn the field marked **Requirement class** enter 'sbg: maxNumberOfParallelInstances'.\n \nIn the field marked **Requirement value** enter the number of instances to be run in parallel as an integer.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n##Set the instance type for a tool\nYou can set the instance type for a tool in [the Tool Editor](doc:the-tool-editor). \n1. To set the instance type for a tool, you should add it to a project. Then, on the **Apps** tab of the project dashboard, click the pencil icon next to the tool to open the tool editor.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/HkKC39e8Sl59eSICh1Sw_Screen%20Shot%202016-04-20%20at%2015.20.19.png\",\n        \"Screen Shot 2016-04-20 at 15.20.19.png\",\n        \"3242\",\n        \"798\",\n        \"#3db455\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n2. Click the ellipses icon (**. . .**) in the top right, and select **Settings**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7C250lwRTEGNyh5CbYxS_Screen%20Shot%202016-04-20%20at%2015.22.50.png\",\n        \"Screen Shot 2016-04-20 at 15.22.50.png\",\n        \"3248\",\n        \"1330\",\n        \"#3684d1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n3. You wll see the **Tool  settings** popup, shown below. On the Tool Settings pop-up, click the plus icon (**+**).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/rNh8Ba9DRVKPe0UKt6jw_Screen%20Shot%202016-04-20%20at%2015.24.59.png\",\n        \"Screen Shot 2016-04-20 at 15.24.59.png\",\n        \"1190\",\n        \"812\",\n        \"#555555\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n4. Then enter the following information:\n**To set the instance type:**\nIn the field marked Requirement class enter either 'sbg:AWSInstanceType'.\nIn the field marked Requirement value enter an instance type from the [tables at the top of this page](set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>\n\n##Set the instance type for a tool in a workflow\nYou can set the instance type(s) of individual tools in a workflow. For instance, you might want to use a smaller, cheaper, instance type for most tools in your workflow, but provide one tool with a more powerful instance.\n\nNote that if you are running the tool on its own and not in a workflow, see the instructions on how to [set the instance type for a tool that is not in a workflow](doc: set-computation-instances#section-set-the-instance-type-for-a-tool).\n\n1. Select the workflow that you want to configure. This can be a public workflow (in which case, you must have [copied it to a project](doc:copy-public-apps-to-a-project) \nto edit it), or it can be a workflow [you have built yourself](doc:create-a-workflow).\n\n2. Click the pencil icon to open the workflow in the workflow editor.\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Ta22FUqhSeS05R10i16x_Screen%20Shot%202016-04-19%20at%2012.41.50.png\",\n        \"Screen Shot 2016-04-19 at 12.41.50.png\",\n        \"3274\",\n        \"734\",\n        \"#3cb454\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n3. In the workflow editor, click the node representing the tool in the workflow whose instance you want to set. Selecting a node will show a green ellipses icon. In the example below, you can see this icon above the **STAR** node in the rna-seq-allignment-star workflow. Note that input and output nodes in a workflow don't represent tools, and you can't set their instances.\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/RUJrhXLRRyJF9eD907lY_Screen%20Shot%202016-04-19%20at%2012.43.05.png\",\n        \"Screen Shot 2016-04-19 at 12.43.05.png\",\n        \"3258\",\n        \"1332\",\n        \"#315980\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n4. Click the green ellipses icon (**. . .**) to see the settings for the node. Click the tab marked **HINTS**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7tMSKsWT1uokJJAaM1Yq_Screen%20Shot%202016-04-19%20at%2013.24.35.png\",\n        \"Screen Shot 2016-04-19 at 13.24.35.png\",\n        \"1188\",\n        \"774\",\n        \"#3885d1\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n5. Then enter the following information:\n**To set the instance type:\n**In the field marked Requirement class enter either 'sbg:AWSInstanceType'.\nIn the field marked Requirement value enter an instance type from the [tables at the top of this page](set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box.\n\n<div align=\"right\"><a href=\"#top\">top</a></div>","excerpt":"<a name=\"top\"></a>","slug":"set-computation-instances","type":"basic","title":"Set computation instances"}

Set computation instances

<a name="top"></a>

Each tool that is run in a task is executed on a computation instance in the cloud. Instances are virtual computers; different instance types have different allocations of CPU and memory, so are suited for workloads with different computational requirements. The Platform uses a scheduling algorithm to select an appropriate computation instance for each tool that is run in a task. The algorithm assigns to each a tool an instance that has sufficient resources to run the tool, and, when running workflows made of multiple tools, is optimized to efficiently pack tools onto instances. While the scheduling algorithm will select a default instance that is suitable for your task, in some cases you might want to override the algorithm to select a specific instance type to run the task on. This page explains how to set the instance type for a task. Take a look at the Seven Bridges scheduling algorithm that is used to allocate instances to tasks. [block:callout] { "type": "success", "body": "To see how tool executions are fitted onto instances, take a look at [the scheduling algorithm](page:multi-instance-scheduling-algorithm) we use to allocate instances to tasks.", "title": "Seven Bridges scheduling algorithm" } [/block] [block:callout] { "type": "warning", "body": "* [Available instance types](doc:set-computation-instances#section-available-instance-types)\n * [Determining instance types](doc:set-computation-instances#section-determining-instance-types)\n * [Choose an instance type that is sufficient for your task](doc:set-computation-instances#section-choose-an-instance-type-that-is-sufficient-for-your-task)\n * [Running instances in parallel](doc:set-computation-instances#section-running-instances-in-parallel)\n* [Set the instance type for a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-workflow)\n* [Set the instance type for a tool](doc:set-computation-instances#section-set-the-instance-type-for-a-tool)\n* [Set the instance type for any tool(s) in a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-tool-in-a-workflow)", "title": "On this page" } [/block] ##Available instance types [block:callout] { "type": "info", "body": "To see which instance types are available, you should know which cloud infrastructure provider you run the Seven Bridges Platform on: Amazon Web Services (AWS) or Google Cloud Platform. If you didn't chose a cloud provider when you signed up for the Platform, you will be using AWS. If you signed up from early 2016, you will have had the option to select your cloud provider from AWS and Google Cloud Platform.", "title": "Available instance types depend on your cloud infrastructure provider." } [/block] [See the AWS page on instance types for details of these instances' CPU and memory. ](https://aws.amazon.com/ec2/instance-types/). If you use the Seven Bridges Platform on AWS infrastructure, chose an instance type from the following list and specify it as a value for the **sbg:AWSInstanceType** hint: [block:parameters] { "data": { "h-0": "AWS instance types", "0-0": "Default instance: c4.2xlarge with 1TB EBS\nm1.small\nm1.medium\nm1.large\nm1.xlarge\nm2.xlarge\nm2.2xlarge\nm2.4xlarge\nm3.medium\nm3.large\nm3.xlarge\nm3.2xlarge\nc1.medium", "0-1": "c1.xlarge\nc3.large\nc3.xlarge\nc3.2xlarge\nc3.4xlarge\nc3.8xlarge\nr3.large\nr3.xlarge\nr3.2xlarge\nr3.4xlarge\nr3.8xlarge\ni2.xlarge", "0-2": "i2.2xlarge\ni2.4xlarge\ni2.8xlarge\ncr1.8xlarge\ncc2.8xlarg\nc4.large with 700GB EBS\nc4.xlarge with 700GB EBS\nc4.2xlarge with 1TB EBS\nc4.4xlarge with 700GB EBS\nc4.8xlarge with 700GB EBS", "0-3": "c4.8xlarge.ebs15 with 1.4TB EBS\nr3.8xlarge.ebs15 with 1.4TB EBS\nr3.8xlarge.ebs20 with 2TB EBS\nm4.10xlarge.ebs14 with 1.4TB EBS\nm4.16xlarge with 1TB EBS", "h-3": "Plus the following custom instances:" }, "cols": 4, "rows": 1 } [/block] [See the AWS page on instance types for details of these instances' CPU and memory. ](https://aws.amazon.com/ec2/instance-types/). If you use the Seven Bridges Platform on Google Cloud infrastructure, chose an instance type from the following list and specify it as a value for the **sbg:GCPInstanceType** hint: [block:parameters] { "data": { "h-0": "Google Cloud Platform instance types", "0-0": "Default instance: n1-standard-8 with 160 GB SSD \nn1-standard-1\nn1-standard-2\nn1-standard-4\nn1-standard-8\nn1-standard-16\nn1-standard-32", "0-1": "n1-highmem-2\nn1-highmem-4\nn1-highmem-8\nn1-highmem-16\nn1-highmem-32", "0-2": "n1-highcpu-2\nn1-highcpu-4\nn1-highcpu-8\nn1-highcpu-16\nn1-highcpu-32" }, "cols": 3, "rows": 1 } [/block] [See the Google Cloud Platform page on their instance types. ](https://cloud.google.com/compute/docs/machine-types#predefined_machine_types). Please note that only a subset of the instance types listed above are available to the scheduling algorithm. In particular, the scheduler will never allocate an instance with very low resources. ###Determining instance types All public tools and workflows have defined requirements for CPU and memory. These are used by the scheduler on the Platform to pick a suitable computation instance for the app to be run on. You can override this selection in a number of ways: * You can [set the instance type for an entire workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-workflow). This will override any setting that you have made for any given tool in the workflow. * You can [set the instance type for any tool](doc:set-computation-instances#section-set-the-instance-type-for-a-tool) (either one you have added to the CGC yourself, using the SDK, or a public tool) using the tool editor. This will override the instance type selected by the scheduler. * You can [set the instance type for any tool(s) in a workflow](doc:set-computation-instances#section-set-the-instance-type-for-a-tool-in-a-workflow). This will override any setting you have made on the tool editor. ###Choose an instance type that is sufficient for your task If you override the instance type that the scheduling algorithm selects on the basis of the app's required resources, and instead pick your own instance, you may inadvertently select one that doesn't have enough resources to run the app successfully. To make sure you pick a suitable instance, check the required resources of the tool you want to use. To do this, open the tool in the tool editor, by clicking the Edit button. Note that you can only edit a tool that is in one of your projects. The tool editor contains fields labelled CPU and Memory (MB). These contain the number of CPUs and amount of memory deemed necessary for running the tool by the person who wrapped it (either one of Seven Bridges' bioinformaticians, in the case of a publicly available tool, or another Seven Bridges Platform user who has shared an edited tool with you). If you try to set an instance type that fails to meet a tool's required resources, then, wherever possible, you will see a warning notification. However, sometimes a tool's required resources are set dynamically. For instance, the tool may require two times as many CPUs as it has input files, and the number of input files to the tool will depend on the behavior of the tool before it in a pipeline. In this case, it may not be possible to raise an error about insufficient resources before running the app, and you will see an error during its execution. See the documentation on [the tool editor](doc:the-tool-editor) for more information on how to describe a tool. In particular, see how to set a tool's [required resources](doc:general-tool-information#resources). For details of how dynamic expressions may be used, see the documentation on [dynamic expressions in tool descriptions](doc:dynamic-expressions-in-tool-descriptions). ###Running instances in parallel You can set the maximum number of instances to run in parallel for a workflow. See the instructions below on setting the instance type for an entire workflow for details. ##Set the instance type for a workflow You can set the instance for an entire workflow. This means that all tools in the workflow run on the selected instance type. 1. To set the instance type for a workflow, you should add it to a project. Then, on the **Apps** tab of the project dashboard, click the pencil icon next to the tool to open the workflow editor. [block:image] { "images": [ { "image": [ "https://files.readme.io/do5rTo2BS7ahdUlMoKSE_Screen%20Shot%202016-04-19%20at%2012.41.50.png", "Screen Shot 2016-04-19 at 12.41.50.png", "3274", "734", "#3cb454", "" ] } ] } [/block] 2. Click the ellipses icon (**. . .**) in the top right corner of the workflow editor, and select **Settings**. [block:image] { "images": [ { "image": [ "https://files.readme.io/IF73jYHTsyQWvH2js8AA_Screen%20Shot%202016-04-20%20at%2015.54.13.png", "Screen Shot 2016-04-20 at 15.54.13.png", "3246", "1324", "#344b64", "" ] } ] } [/block] 3. You will see the **Workflow settings** popup window, shown below. Enter the following information: [block:image] { "images": [ { "image": [ "https://files.readme.io/hIkhTaQfm3X1SqAZPUgC_Screen%20Shot%202016-05-17%20at%2011.21.27.png", "Screen Shot 2016-05-17 at 11.21.27.png", "1182", "638", "#4779a5", "" ] } ] } [/block] **To set the instance type: **In the field marked **Requirement class** enter 'sbg:AWSInstanceType'. In the field marked **Requirement value enter** an instance type from the [tables at the top of this page](doc:set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box. On the **Workflow settings** popup you can also set the maximum number of instances to be used in parallel by the workflow. To set the maximum number of instances to be used in parallel: Click the plus (**+**) icon to create new empty fields. In the field marked **Requirement class** enter 'sbg: maxNumberOfParallelInstances'. In the field marked **Requirement value** enter the number of instances to be run in parallel as an integer. <div align="right"><a href="#top">top</a></div> ##Set the instance type for a tool You can set the instance type for a tool in [the Tool Editor](doc:the-tool-editor). 1. To set the instance type for a tool, you should add it to a project. Then, on the **Apps** tab of the project dashboard, click the pencil icon next to the tool to open the tool editor. [block:image] { "images": [ { "image": [ "https://files.readme.io/HkKC39e8Sl59eSICh1Sw_Screen%20Shot%202016-04-20%20at%2015.20.19.png", "Screen Shot 2016-04-20 at 15.20.19.png", "3242", "798", "#3db455", "" ] } ] } [/block] 2. Click the ellipses icon (**. . .**) in the top right, and select **Settings**. [block:image] { "images": [ { "image": [ "https://files.readme.io/7C250lwRTEGNyh5CbYxS_Screen%20Shot%202016-04-20%20at%2015.22.50.png", "Screen Shot 2016-04-20 at 15.22.50.png", "3248", "1330", "#3684d1", "" ] } ] } [/block] 3. You wll see the **Tool settings** popup, shown below. On the Tool Settings pop-up, click the plus icon (**+**). [block:image] { "images": [ { "image": [ "https://files.readme.io/rNh8Ba9DRVKPe0UKt6jw_Screen%20Shot%202016-04-20%20at%2015.24.59.png", "Screen Shot 2016-04-20 at 15.24.59.png", "1190", "812", "#555555", "" ] } ] } [/block] 4. Then enter the following information: **To set the instance type:** In the field marked Requirement class enter either 'sbg:AWSInstanceType'. In the field marked Requirement value enter an instance type from the [tables at the top of this page](set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box. <div align="right"><a href="#top">top</a></div> ##Set the instance type for a tool in a workflow You can set the instance type(s) of individual tools in a workflow. For instance, you might want to use a smaller, cheaper, instance type for most tools in your workflow, but provide one tool with a more powerful instance. Note that if you are running the tool on its own and not in a workflow, see the instructions on how to [set the instance type for a tool that is not in a workflow](doc: set-computation-instances#section-set-the-instance-type-for-a-tool). 1. Select the workflow that you want to configure. This can be a public workflow (in which case, you must have [copied it to a project](doc:copy-public-apps-to-a-project) to edit it), or it can be a workflow [you have built yourself](doc:create-a-workflow). 2. Click the pencil icon to open the workflow in the workflow editor. [block:image] { "images": [ { "image": [ "https://files.readme.io/Ta22FUqhSeS05R10i16x_Screen%20Shot%202016-04-19%20at%2012.41.50.png", "Screen Shot 2016-04-19 at 12.41.50.png", "3274", "734", "#3cb454", "" ] } ] } [/block] 3. In the workflow editor, click the node representing the tool in the workflow whose instance you want to set. Selecting a node will show a green ellipses icon. In the example below, you can see this icon above the **STAR** node in the rna-seq-allignment-star workflow. Note that input and output nodes in a workflow don't represent tools, and you can't set their instances. [block:image] { "images": [ { "image": [ "https://files.readme.io/RUJrhXLRRyJF9eD907lY_Screen%20Shot%202016-04-19%20at%2012.43.05.png", "Screen Shot 2016-04-19 at 12.43.05.png", "3258", "1332", "#315980", "" ] } ] } [/block] 4. Click the green ellipses icon (**. . .**) to see the settings for the node. Click the tab marked **HINTS**. [block:image] { "images": [ { "image": [ "https://files.readme.io/7tMSKsWT1uokJJAaM1Yq_Screen%20Shot%202016-04-19%20at%2013.24.35.png", "Screen Shot 2016-04-19 at 13.24.35.png", "1188", "774", "#3885d1", "" ] } ] } [/block] 5. Then enter the following information: **To set the instance type: **In the field marked Requirement class enter either 'sbg:AWSInstanceType'. In the field marked Requirement value enter an instance type from the [tables at the top of this page](set-computation-instances#section-available-instance-types). When you start typing an instance type, you will see automatically generated suggestions in the drop-down box. <div align="right"><a href="#top">top</a></div>