{"id":5023,"date":"2013-07-11T18:04:42","date_gmt":"2013-07-11T17:04:42","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=5023"},"modified":"2013-07-11T18:05:47","modified_gmt":"2013-07-11T17:05:47","slug":"determing-your-machine-name-using-r","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=5023","title":{"rendered":"Determing your machine name using R"},"content":{"rendered":"<p>I was recently working with someone who was running thousands of <a href=\"http:\/\/www.r-project.org\/\">R<\/a> jobs on our <a href=\"http:\/\/research.cs.wisc.edu\/htcondor\/\">Condor pool<\/a> and some of them were failing.\u00a0 As part of the diagnostic process, we needed to determine which machines in the pool were causing the problem.\u00a0 My solution was to add the line<\/p>\n<pre>hostname<\/pre>\n<p>To the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bash_%28Unix_shell%29\">Bash<\/a> script that eventually called R and the program he was running.  This gives output that looks like this<\/p>\n<pre>badmachine.ourdomain.ac.uk<\/pre>\n<p>His solution was to do exactly the same thing in R. To do this, he added the following line to the beginning of his R script<\/p>\n<pre>(Sys.info()[\"nodename\"])<\/pre>\n<p>Which produces output that looks like<\/p>\n<pre>nodename\r\n\"badmachine.ourdomain.ac.uk\"<\/pre>\n<p>Either way, the job was done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was recently working with someone who was running thousands of R jobs on our Condor pool and some of them were failing.\u00a0 As part of the diagnostic process, we needed to determine which machines in the pool were causing the problem.\u00a0 My solution was to add the line hostname To the Bash script that [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[36],"tags":[],"class_list":["post-5023","post","type-post","status-publish","format-standard","hentry","category-r"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1j1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5023"}],"version-history":[{"count":3,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5023\/revisions"}],"predecessor-version":[{"id":5034,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5023\/revisions\/5034"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}