From b4d6130575299206d5f0b6047e8ac484740461ec Mon Sep 17 00:00:00 2001 From: glmdev Date: Thu, 2 May 2019 11:02:24 -0500 Subject: [PATCH] split sample means --- demos/sample_means/plots/bob.jpg | Bin 0 -> 15764 bytes demos/sample_means/slurm_generate_plots.R | 11 +++++++++++ .../sample_means/slurm_submit_generate_plots.sh | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 demos/sample_means/plots/bob.jpg create mode 100644 demos/sample_means/slurm_generate_plots.R diff --git a/demos/sample_means/plots/bob.jpg b/demos/sample_means/plots/bob.jpg new file mode 100644 index 0000000000000000000000000000000000000000..54a3beff19edd8c945de27ea5a79c0d0e49809fb GIT binary patch literal 15764 zcmeHt2UJwsw&f|Zr6KtOU3DFgw@NkBoeB0q84goG!wkzxx zE^v$UT)8SFA|e9ix-KIjEG=+NMEI94ft)*cj+BIyfsBkn_|k<-!vFRITMtkXL1rPd zxDYk~hYEsA1;I80Q1CwSA^-6J{__FB!NtQTAS60ROai{4j1s_s;Ns%o;o{@t;eqdd z30?>AsPL&T3CR=CXqXVP+0zQYicBS9zfs&kcfW6kRhGN)x+3w?R7^_0W-0so3!d*?_Z^j5SNU3 zw#-2Gs=ZBRF7(c_R_~>%>fO-#sHYrHUlDCyC}4EP`#>=Eg*2%YQlvnu4*8b`U9+_j z&+rnm%FVdx>ZtV2ctXNN@Q};xl0$l8`HqDhlNIYbPE$%|mp5Ec+B~y%=fBNc^L4$v zGj?UaK+@6f<+JzW1>KAeYMsyRdrS=tc_U)3OLW<1Jx>eb1-R3K{?cfuLuLh_*2ioF z1ox!5sPnIOaEI(S(cY&$v)5x1XO`TsWKJQe< z!+FW~q!@(-jv1Yk4O$7z|kR9J*S`GE0@dpplVnkGENr@xKNzo^%Atu zYRKXL!C+CC7d%Q(nMII>zqj2_2(BD-4P!Kjc=?8Fx5%)Fedjr5^r+HZXo;V^Q%9-v zbN6QQ>0;!OcA>T^+~sP3IUHf!*=TsThYH?aoChEIFmnPaRG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iuv*d?Jh`&K&k~pO1V=?5;mi53u-A==-6aLF7CFI z zUbYMlZ}E4h=v?W)J+n%qxaw~oTd#!|{o!OO-_nSo=96y|_pW|)#__aQD@+XaNDSG- zVIh%1#?RLhFHpY2?>EtL@aAj8wFVAr-Vh5@Vee*(h;!_<7M6A5pJXrg7dgAX*4B1W zcIDM?;0UIU>?-e_pt*kh?p4EbQ0va+nB3_VBg(33F-y}dz2jaHfmYr3^W3;R>a_SS z-6XcGERqjwYH)LOCUiGZQ5vK#{&gx@~1s!RV1q5`LNog|o~%8S)^lZwT! dM|bE()d0II`hd3iul?bV0O$YEbtrc1e*mrvqFDd{ literal 0 HcmV?d00001 diff --git a/demos/sample_means/slurm_generate_plots.R b/demos/sample_means/slurm_generate_plots.R new file mode 100644 index 0000000..eb3d59d --- /dev/null +++ b/demos/sample_means/slurm_generate_plots.R @@ -0,0 +1,11 @@ +arg = commandArgs(TRUE) + +samples = rep(NA, 100000) +for ( i in 1:100000 ){ samples[i] = mean(rexp(40, 0.2)) } + +jpeg(paste('plots/', arg, '.jpg', sep="")) + +hist(samples, main="", prob=T) +lines(density(samples), col="darkblue", lwd=3) + +dev.off() diff --git a/demos/sample_means/slurm_submit_generate_plots.sh b/demos/sample_means/slurm_submit_generate_plots.sh index 9584c63..32fee31 100644 --- a/demos/sample_means/slurm_submit_generate_plots.sh +++ b/demos/sample_means/slurm_submit_generate_plots.sh @@ -1,8 +1,8 @@ #!/bin/bash -#SBATCH --ntasks=5 +#SBATCH --ntasks=6 cd $SLURM_SUBMIT_DIR mkdir plots/ -mpiexec -n 1 R --vanilla -f generate_plots.R +R --vanilla -f slurm_generate_plots.R --args "plot$SLURM_ARRAY_TASK_ID"