1"use strict";(self.webpackChunksupportkc_new=self.webpackChunksupportkc_new||[]).push([[3389],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),d=p(n),m=r,c=d["".concat(l,".").concat(m)]||d[m]||h[m]||i;return n?a.createElement(c,s(s({ref:t},u),{},{components:n})):a.createElement(c,s({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:r,s[1]=o;for(var p=2;p<i;p++)s[p]=n[p];return a.createElement.apply(null,s)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},2803:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={sidebar_label:"GREASY User Guide",title:"GREASY User Guide",sidebar_position:5},s=void 0,o={unversionedId:"greasy",id:"greasy",title:"GREASY User Guide",description:"Introduction",source:"@site/docs-utilities/greasy.md",sourceDirName:".",slug:"/greasy",permalink:"/supportkc/docs-utilities/greasy",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_label:"GREASY User Guide",title:"GREASY User Guide",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Singularity User Guide",permalink:"/supportkc/docs-utilities/singularity"},next:{title:"Extrae and Paraver",permalink:"/supportkc/docs-utilities/pat"}},l={},p=[{value:"Introduction",id:"introduction",level:2},{value:"Installation",id:"installation",level:2},{value:"How to install Greasy",id:"howtoinstallgreasy",level:3},{value:"Installation structure",id:"installationstructure",level:3},{value:"Greasy Usage",id:"greasyusage",level:2},{value:"Writing the task file",id:"writingthetaskfile",level:3},{value:"Configuring Greasy",id:"configuringgreasy",level:3},{value:"Running Greasy",id:"runninggreasy",level:3},{value:"Understanding the log file",id:"understandingthelogfile",level:3},{value:"Something went wrong: the restart file",id:"somethingwentwrong:therestartfile",level:3},{value:"Support & Contact",id:"supportcontact",level:2}],u={toc:p},d="wrapper";function h(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"introduction"},"Introduction"),(0,r.kt)("p",null,"Greasy is a tool designed to make easier the deployment of\nembarrassingly parallel simulations in any environment. It is able to\nrun in parallel a list of different tasks, schedule them and run them\nusing the available resources. It is the perfect tool to use, for\nexample, when your application is a serial program, and you need to run\na large number of instances with different parameters. Greasy packs all\nthese separate runs and uses the resources granted to run as many tasks\nas possible in parallel. As this tasks finish, Greasy will continue\nstarting the tasks that were waiting for resources."),(0,r.kt)("p",null,"Since one of the main principles of Greasy is to keep it simple for the\nuser, the list of tasks is just that: a list of tasks in a text file.\nThen, each line in the file becomes a task to be run by Greasy. It is\nable to manage dependencies between tasks, or to rerun a task in case of\nfailure if desired."),(0,r.kt)("p",null,"Greasy can be easily configured by default with a configuration file,\nand can be also customized for each particular execution using\nenvironment variables. It also provides a log system where all greasy\nactions will be recorded to keep track of what is the progress of your\nrun."),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("h3",{id:"howtoinstallgreasy"},"How to install Greasy"),(0,r.kt)("p",null,"Greasy can be installed in any Linux machine or cluster. However,\nadditional requirements may be necessary depending on the features\ndesired:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"SLURM: If available, Greasy can use it to spawn tasks to remote\nnodes inside a job."),(0,r.kt)("li",{parentName:"ul"},"SSH: If available, Greasy can use it to spawn tasks to remote nodes."),
1(0,r.kt)("li",{parentName:"ul"},"MPI: If available, Greasy comes with an engine working over MPI that\nmay be used to run the tasks in a cluster.")),(0,r.kt)("p",null,"If none of these packages is available and usable, Greasy will only be\nable to run tasks using the local node. The standard installation\nprocedure is:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"tar xvzf greasy-X.Y.tar.gz\ncd greasy-X.Y\n./configure --prefix=<path-to-greasy-installation-dir>\nmake\nmake install\n")),(0,r.kt)("p",null,"Additional configuration options may be specified to configure in order\nto enable the additional engines to the greasy runtime. See ./configure\n--help for details."),(0,r.kt)("h3",{id:"installationstructure"},"Installation structure"),(0,r.kt)("p",null,"We will call GREASY","_","HOME to the root directory of the installation.\nOnce installed, a Greasy installation will contain the following files\nunder this directory structure:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("em",{parentName:"p"},"bin"),"/"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"greasy"),": The program wrapper that runs greasy."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"greasybin"),": The actual binary. It must not be called\ndirectly, but from the wrapper greasy."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"greasycolorlog"),": Utility script to give some color to the\ngreasy logfiles."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("em",{parentName:"p"},"etc"),"/"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"greasy.conf"),": Global configuration file."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("em",{parentName:"p"},"doc"),"/"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"greasy","_","userguide.pdf"),": This file."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("em",{parentName:"p"},"example"),"/"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"bsc","_","greasy.","*",".job"),": An example of job scripts to submit\nGreasy to the batch system. It is also valid to run Greasy\ninteractively in any machine."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"short-example.txt"),": a very short example of task file."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"example.txt"),": an example of task file containing both valid\nand invalid tasks.")))),(0,r.kt)("h2",{id:"greasyusage"},"Greasy Usage"),(0,r.kt)("h3",{id:"writingthetaskfile"},"Writing the task file"),(0,r.kt)("p",null,"The task file is the most important element, as here the user defines\nthe tasks to be executed. As mentioned before, each line of the file\nbecomes a task from Greasy's point of view. This way, each line contains\nexactly what you want to execute, for example, the path to the binary\nfollowed by the arguments with the necessary redirections. The line\nnumber corresponds to what we call the task ID. This task ID is useful\nto understand the log file and when depen
1dencies are needed."),(0,r.kt)("p",null,"Lines starting with ","#"," are treated as comments, and are not processed,\nbut still reserve an ID. That means, for example, if you have the first\nline commented and the second line contains a valid task, then this task\nwill have ID=2. This way, it is easy to use an editor to show the file\nline numbers (ie: vim), and address any task through its task ID just\njumping into the corresponding file line number."),(0,r.kt)("p",null,"Working directory is specified at the beginning of the line, preceding\nthe task command and between ","[","@ and @","]",". This syntax allows to execute\nthe task in the directory specified. As an example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"task 1 # executed on the directory which greasy has been launched from\n[@ /home/user/greasy @] task 2 # executes \u201ccd /home/user/greasy && task 2\u201d\n")),(0,r.kt)("p",null,"Dependencies are specified at the beginning of the line, right before\nthe task and between ",(0,r.kt)("strong",{parentName:"p"},"[","#")," and ",(0,r.kt)("strong",{parentName:"p"},"#","]"),". All tasks that must end\nbefore the current task must be included here, and more than one task\nmay be included as a dependency. The best way to understand dependency\nsyntax is through an example. This is an example task file with some\ndependencies among tasks:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"task 1\n[# 1 #] task 2\n[# -2, 2 #] task 3\ntask 4\n[# 2-4 #] task 5\n")),(0,r.kt)("p",null,'In this case, tasks 1 and 4 do not have any dependencies. Task 2 depends\non task 1, and task 3 depends on tasks 1 and 2. Note that with the "-2"\nwe specify a relative dependency: the parent task is the one 2 lines\nabove, which is task 1. And finally, task 5 depends on tasks 2, 3 and 4.\nIn this case, we specified the dependencies as a range. Remember that\nyou can add more dependencies separating the elements with commas, as in\ntask 3.'),(0,r.kt)("p",null,"It is important to point out that only backward dependencies are\nallowed. That means that you can only add dependencies to tasks with ID\nless than the current task ID. In other words, you can only add\ndependencies to tasks defined in previous lines in the task file."),(0,r.kt)("p",null,"In summary, when writing a Greasy task file, just keep in mind these\nsimple rules:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Each line is a task")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Lines starting with ",(0,r.kt)("strong",{parentName:"p"},"#")," are comments.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"There is a one-to-one correspondence between the file line number\nand the task ID.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"It is possible to specify the working directory for each task with\n","[","@ \\<path",">"," @","]",".")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Use tasks ID to express dependencies at the beginning of the line,\nand between brackets and sharps ",(0,r.kt)("strong",{parentName:"p"},"[","#"," \\<"),"list of dependencies goes\nhere",(0,r.kt)("strong",{parentName:"p"},">"," ","#","]")," .")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"And regarding dependencies, remember:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Only backward dependencies are allowed."),(0,r.kt)("li",{parentName:"ul"},'Use "," to separate dependencies.'),(0,r.kt)("li",{parentName:"ul"},'Use "',(0,r.kt)("strong",{parentName:"li"},"-"),'" to express a rank of dependencies. i.e.: ',"[","#"," 3--6\n","#","]"," means that the current task depends on task 3 though 6\n(including both)."),(0,r.kt)("li",{parentName:"ul"},'Use "',(0,r.kt)("strong",{parentName:"li"},"-"),'" also to express relative dependencies. i.e.: ',"[","#"," -1\n","#","]"," means that the current task depends on the previous task."),(0,r.kt)("li",{parentName:"ul"},'You can combine "',(0,r.kt)("strong",{parentName:"li"},","),'" and "-" as you want to separate tokens.'))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"A reference example (example/example.txt) of the syntax could be the\nfollowing:"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},' # this line is a comment\n /bin/sleep 2\n # the following task is 4. Tasks IDs 1 and 3 do not exist.\n /bin/sleep 4\n /bin/sleep 5\n /bin/sleep 6\n /bin/sleep 7\n # the following task will be run after completion of the "sleep 5"\n [# 5 #] /bin/sleep 9\n # the following task will be run after completion of the "sleep 9"\n [# -2 #] /bin/sleep 11\n # the following task is invali
1d because tasks 1 and 3 do not exist\n [#1-3#] /bin/sleep 13\n # the following task will be run after completion of tasks 2, 5, 6 and 7\n [#2, 5 - 7 #] /bin/sleep 15\n # the following task will be executed on the directory /tmp/scratch\n [@ /tmp/scratch @] pwd\n # it is possible to combine dependencies and working directory for a task\n [@ /tmp/scratch @][# -2 #] echo \u201cIt works!\u201d\n')),(0,r.kt)("h3",{id:"configuringgreasy"},"Configuring Greasy"),(0,r.kt)("p",null,"Greasy is configured using two different methods when it is executed:\nthe configuration file and environment variables. It is mandatory to\nhave a valid configuration file with the basic parameters set, and is\nlocated at GREASY","_","HOME/etc/greasy.conf."),(0,r.kt)("p",null,"In addition to the file, these parameters can be defined or overridden\nby the environment variables. That means that a parameter defined both\nin the configuration file and the environment will take the value of the\nlatter."),(0,r.kt)("p",null,"Here is a brief summary of the different parameters:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"GreasyEngine"),": Specify the engine to use to schedule and run the\njobs. Default is basic."),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"basic"),": It is the standard implementation of the engine. It\nonly allows local runs unless ssh or Slurm are available in the\nsystem (See BasicRemoteMethod)."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"mpi"),": MPI implementation of the scheduler. Only available if\nMPI is present and enabled at build time. When using this mode,\none cpu will be reserved only for scheduling tasks at runtime."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"thread"),": thread implementation for shared memory computers. It\nonly works in a single node."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"BasicRemoteMethod"),": Spawn method for the Basic engine. Values are\n",(0,r.kt)("em",{parentName:"p"},"ssh"),", ",(0,r.kt)("em",{parentName:"p"},"srun")," or ",(0,r.kt)("em",{parentName:"p"},"none"),". If none is set, Basic engine will only\nsupport local runs.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"StrictCheck"),": This variable controls whether greasy will continue\nor stop if any error is found in the tasks file. For example, there\ncould be syntax errors or tasks with bad dependencies, etc. In such\ncases greasy can keep on running and execute the rest of valid\ntasks. Of course, these tasks will be marked as invalid and they\nwill be reported as such at the end. Possible values: ",(0,r.kt)("em",{parentName:"p"},"yes")," or ",(0,r.kt)("em",{parentName:"p"},"no"),".")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"MaxRetries"),": Maximum number of retries of a task in case of\nfailure. If value is 0 or it is not set, then no retries will be\nattempted if any task fails. Possible values: a number ",">","= 0.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"LogFile"),": Path to the file where the log will be written. If not\nset or empty, the log entries will be printed out to standard error.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"LogLevel"),": Verbosity of the log. The higher the number is, the\nmore verbose the output will be. Each level includes the previous\nones. Level 3 is recommended for most cases. Possible values are:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"0")," : Silent mode. No log information will be recorded.."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"1")," : Error mode. Only fatal errors will be recorded."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"2")," : Warning mode. All errors and warnings will be recorded."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"3")," : Information mode. Standard information, warnings and\nerrors will be recorded."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"4")," : Debug mode. Information mode + some debug information."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("em",{parentName:"li"},"5")," : Developer mode. Debug mode + developer information about\nthe internals of Greasy. Not recommended for normal use."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Nworkers"),": The number of concurrent tasks that will run in\nparallel. It is better if defined using environment, as it is much\nmore flexible across different Greasy executions. At least one\nworker has to be defined in order to run Greasy.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"NodeList"),": The list of nodes where Greasy will run tasks for the\nbasic engine. It has to be at least Nworkers nodes separated by\ncommas. If not set, Greasy will run only in the local node. Note\nthat if multiple workers have to run in the same node, that node has\nto be in the list as many times as that number of workers per node.\nFor example, with quad-core nodes, each node in the list should\nappear 4 times."))),(0,r.kt)("p",null,"There are some considerations regarding the configuration of Greasy:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"}
1,"Greasy has native support for Slurm clusters. If Greasy detects that\nit is running inside a Slurm job, it will automatically set Nworkers\nand NodeList parameters according to the job resources, and will\nredirect the log file to greasy-\\<jobid",">",".log."),(0,r.kt)("li",{parentName:"ul"},"In order to set any parameter via environment, the name of the\nvariable will be ",(0,r.kt)("em",{parentName:"li"},"GREASY","_")," followed by the name of the parameter in\nuppercase. For example, to change the ",(0,r.kt)("em",{parentName:"li"},"LogFile")," parameter, the\ncorresponding environment variable would be ",(0,r.kt)("em",{parentName:"li"},"GREASY","_","LOGFILE"),".")),(0,r.kt)("h3",{id:"runninggreasy"},"Running Greasy"),(0,r.kt)("p",null,"There is an example of script to run greasy under ",(0,r.kt)("em",{parentName:"p"},"example")," directory in\n",(0,r.kt)("em",{parentName:"p"},"GREASY","_","HOME"),". The best way to get started with Greasy is copying this\nexample directory to the place where you want to work, and then use the\nprovided templates to set up your Greasy execution."),(0,r.kt)("p",null,"Greasy can be run interactively or using a batch system. There is an\nexample script called ",(0,r.kt)("em",{parentName:"p"},"bsc","_","greasy.job"),", which can be adapted to work in\nboth ways. If run interactively, the following changes are needed before\nlaunching the script:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set FILE to the path of your task file."),(0,r.kt)("li",{parentName:"ul"},"Set the GREASY","_","NWORKERS and GREASY","_","NODELIST to the desired values."),(0,r.kt)("li",{parentName:"ul"},"Optionally, modify the GREASY","_","LOGFILE if you want the log to be\nwritten in another file.")),(0,r.kt)("p",null,"As mentioned above, the script is also prepared to be submitted as a BSC\n/ RES job using mnsubmit. In this case, some additional modifications to\nthe script are necessary:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the total","_","tasks directive to the number of workers in the job\n(plus one if using MPI engine)."),(0,r.kt)("li",{parentName:"ul"},"Set the wall","_","clock","_","limit directive to the estimate amount of time\nto run the entire task file."),(0,r.kt)("li",{parentName:"ul"},"There is no need to set GREASY","_","NWORKERS or GREASY","_","NODELIST in this\ncase, since the values will be automatically inferred from job\nconfiguration.")),(0,r.kt)("h3",{id:"understandingthelogfile"},"Understanding the log file"),(0,r.kt)("p",null,"While Greasy is still running or after its execution, it is a good idea\nto check the log. The log provides information of what is being done at\nany time, when and where the tasks are executed, and possible errors or\nproblems occurred during the execution. LogLevel 3 (Information mode) is\nrecommended as it generates only the minimum useful information. Here is\nan example of log records extracted from an execution of the\nshort-example.txt with 3 workers:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"[2012-02-14 16:50:15] Start greasing short-example.txt\n[2012-02-14 16:50:15] INFO: BASIC engine is ready to run with 3 workers\n[2012-02-14 16:50:15] INFO: Allocating task 1\n[2012-02-14 16:50:15] INFO: Allocating task 2\n[2012-02-14 16:50:15] INFO: Allocating task 3\n[2012-02-14 16:50:20] INFO: Task 3 completed successfully on node lnx.site. Elapsed: 00:00:05\n[2012-02-14 16:50:25] INFO: Task 2 completed successfully on node lnx.site. Elapsed: 00:00:10\n[2012-02-14 16:50:35] INFO: Task 1 completed successfully on node lnx.site. Elapsed: 00:00:20\n[2012-02-14 16:50:35] INFO: BASIC engine finished\n[2012-02-14 16:50:35] INFO: Summary of 3 tasks: 3 OK, 0 FAILED, 0 CANCELLED, 0 INVALID.\n[2012-02-14 16:50:35] INFO: Total time: 00:00:20\n[2012-02-14 16:50:35] INFO: Resource Utilization: 58.33%\n[2012-02-14 16:50:35] Finished greasing short-example.txt\n")),(0,r.kt)("p",null,"As you can see, every record comes with a timestamp as a prefix, making\neasier to understand the behaviour of Greasy and the task scheduling\nthroughout the whole execution. Having a quick look at the log, we see\nthat the program started at 16:50:15 and finished at 16:50:35. We can\nalso observe that the engine used is the default ",(0,r.kt)("em",{parentName:"p"},"basic")," and that it is\nconfigured with 3 workers."),(0,r.kt)("p",null,"Since there are only 3 tasks to allocate and 3 workers, Greasy allocates\nall the tasks to all workers at the beginning. Later, Greasy re
1cords\ntasks completions reporting success or error, the node where the task\nwas launched and the time it took to run."),(0,r.kt)("p",null,"Finally, when all tasks have been executed, Greasy shows some statistics\nabout the execution, such as the tasks completed successfully, the\nfailures or the canceled tasks. It is also very useful to check the\nglobal elapsed time and the resource utilization. The higher this latter\nvalue is, the more efficiently Greasy used the resources available to\nrun the tasks. If you feel that this number is too low, consider\nchanging the number of workers in order to have them busy the maximum\ntime possible."),(0,r.kt)("h3",{id:"somethingwentwrong:therestartfile"},"Something went wrong: the restart file"),(0,r.kt)("p",null,"Sometimes things do not work as expected, and it is possible that some\ntasks or even the entire Greasy execution finishes abnormally. When that\nhappens, Greasy generates a restart file containing those tasks that\nhave failed, have been canceled or have just not been executed. The\nrestart file is a valid task file for Greasy, so it can be used to run\nthe tasks that could not run properly the first time. Here is an example\nof the restart file, running example.txt:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"# \n# Greasy restart file generated at 2012-02-14 16:53:50\n# Original task file: example.txt\n# Log file: greasy.log\n#\n# Warning: Task 2 failed\n/usr/bin/hostname\n# Warning: Task 13 was cancelled due to a dependency failure\n[# 8 #] /bin/sleep 13\n# Warning: Task 15 failed\n/usr/bin/hostname\n# Warning: Task 22 failed\n[ 1 ] /bin/sleep 22\n# Warning: Task 24 failed\n[ 1 #] /bin/sleep 24\n# Invalid tasks were found. Check these lines on example.txt:\n# 23, 26, 27, 29, 31, 32\n# End of restart file\n")),(0,r.kt)("p",null,"There is a little header which provides information about the restart\nitself: when it was created, the task file that was being executed and\nthe log file of the execution. This information is very useful to link\nthe tasks in the restart with the original execution and figure out what\nhappened."),(0,r.kt)("p",null,"When a task was failed or cancelled, Greasy adds a comment identifying\nthe task in the original file and telling the reason why it is in the\nrestart. If the task was not able to run because Greasy was told to quit\nbefore, then there will be no comment added. Finally, At the end of the\nrestart file, if there were invalid tasks in the original task file,\nbecause there were syntax or semantic errors, they are listed with their\ncorresponding IDs."),(0,r.kt)("h2",{id:"supportcontact"},"Support & Contact"),(0,r.kt)("p",null,"For any question, doubt or bug report about Greasy, please ",(0,r.kt)("a",{parentName:"p",href:"/contact"},"contact us")),(0,r.kt)("p",null,"Greasy is in continuous process of development, so if you feel that you\nhave an idea to improve greasy with new features, or just want to\nprovide some feedback, do not hesitate to contact to the address above.\nWe will be delighted to receive your comments and suggestions to make\nGreasy even more useful and powerful."))}h.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.