<br><br><div><div><signature id="initial"><div><div>Sent from <a href="https://link.getmailspring.com/link/1525569168.local-b056fee5-454d-v1.2.1-7e7447b6@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=c2x1cm0tdXNlcnNAbGlzdHMuc2NoZWRtZC5jb20%3D">Mailspring</a>, the best free email app for work</div></div></signature></div></div><img class="mailspring-open" alt="Open Tracking" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/1525569168.local-b056fee5-454d-v1.2.1-7e7447b6@getmailspring.com?recipient=c2x1cm0tdXNlcnNAbGlzdHMuc2NoZWRtZC5jb20%3D"><div class="gmail_quote"><br><div>---------- Forwarded message ---------</div><br><div>From: Kenneth Russell <linux-ken@comcast.net></div><div>Subject: Re: [slurm-users] After Each slurm Run, I Need to Reinstall slurm</div><div>Date: May 5 2018, at 6:02 pm</div><div>To: Slurm User Community List <slurm-users@lists.schedmd.com></div><br><br><div><br><div>Eric, I had already installed the latest version of slurm (V17.11.5). I followed you advice and upgraded Ubuntu server to V 18.04. That didn't solve the problem.</div><br><div><div>To install slurm I used the instructions in the web site:</div><div><a href="https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.md" title="https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.md">https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.mdEric, I had already installed the latest version of slurm (V17.11.5). I followed you advice and upgraded Ubuntu server to V 18.04. That didn't solve the problem.To install slurm I used the instructions in the web site: https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.md</a></div><div><div><a href="https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.md" title="https://github.com//mknoxnv/ubuntu-slurm/blob/master/REEADME.md">I suggest that you follow the steps manually the first time.If you find that you have the same problem as me , you can use the script file below to automate the reinstall process. As I said in my original note, this is a very inefficient way to run slurm</a></div></div><div>I suggest that you follow the steps manually the first time.</div><br><div>If you find that you have the same problem as me , you can use the script file below to automate the reinstall process. As I said in my original note, this is a very inefficient way to run slurm</div><br><div>Here's the reinstall script:</div><br><div>#</div><div># Script to install slurm from a previously downloaded slurm-17.11.5.tar.bz2 file</div><div># Commands taken fro slurm install instructions from:</div><div># https://github.com/mknoxnv/ubuntu-slurm/blob/masttart. To speed things up, I have created a bash script to reinstall slurm, starting with the tarball extraction step. This is a very inefficient work-around.</div><div>​</div><div>Can anyone help me solve the problem of why slurm runs only once and then fails on subsequent starts?</div><div>​</div><div>I can send copies of conf and log files if requested.</div><div>​</div><div>Thanks, in advance.</div><div>​</div><div>Ken Russell</div><br><br><br><br><br><br><div>​</div><div>​#</div><div>#!/bin/sh</div><div>#</div><div>cd /</div><div>cd /storage</div><div>echo extract slurm tarball</div><div>sudo tar xvjf slurm-17.11.5.tar.bz2</div><div>echo Go to slurm-17.11.5 folder</div><div>cd slurm-17.11.5</div><div>echo configure slurm</div><div>sudo ./configure --prefix=/tmp/slurm-build --sysconfdir=/etc/slurm --enable-pam --with-pam_dir=/lib/x86_64-linux-gnu/security/</div><div>echo run 'make'</div><div>sudo make</div><div>echo Run 'make contrib'</div><div>sudo make contrib</div><div>echo Run 'make install'</div><div>sudo make install</div><div>cd ..</div><div>echo Run fpm</div><div>sudo fpm -s dir -t deb -v 1.0 -n slurm-17.11.5 --prefix=/usr -C /tmp/slurm-build .</div><div>echo Run dpkg -i slurm-17.11.5_1.0_amd64.deb</div><div>sudo dpkg -i slurm-17.11.5_1.0_amd64.deb</div><div>echo User Slurm already exists</div><div># sudo useradd slurm</div><div># The following directories already exist from prior installs</div><div># sudo mkdir -p /etc/slurm /var/spool/slurm/ctld /var/spool/slurm/d /var/log/slurm</div><div># Directory ownership already changed from prior installs</div><div># sudo #!/bin/shThanks, in advance.chown slurm /var/spool/slurm/ctld /var/spool/slurm/d /var/log/slurm</div><div>sudo cd storage</div><div>echo Copy service files</div><div>sudo cp ubuntu-slurm/slurmdbd.service /etc/systemd/system/</div><div>sudo cp ubuntu-slurm/slurmctld.service /etc/systemd/system/</div><div># The edited conf files have already been copied to /etc/slurm</div><div># sudo cp ubuntu-slurm/slurm.conf /etc/slurm/</div><div># sudo cp ubuntu-slurm/slurmdbd.conf /etc/slurm/</div><br><div>Here's another very simple script to start slurm once it's installed and working It follows the steps from the web page above.</div><br><div>#</div><div># Script to start SLURM and associated programs and services</div><div># Commands taken from Slurm installation instructions from</div><div># https://github.com/mknoxnv/ubuntu-slurm/blob/master/README..md</div><div>#</div><div>#!/bin/sh</div><div>echo Starting munge</div><div>sudo service munge start</div><div>echo Starting mysql Mariadb mysql look-alike</div><div>sudo systemctl start mysql</div><div>echo Reloading daemons</div><div>sudo systemctl daemon-reload</div><div>echo Enable the bd manager daemon slurmdbd</div><div>sudo systemctl enable slurmdbd</div><div>echo Starting slurmdbd</div><div>sudo systemctl start slurmdbd</div><div>echo Enable the slurm control daemon slurmctls</div><div>sudo systemctl enable slurmctld</div><div>echo Starting slurmctld</div><div>sudo systemctl start slurmctld</div><br><div>If you get errors from slurmdbd or slurmctld, run the reinstall script and then the slurm start script above.</div><br><div>Here's a couple more goodies:</div><br><div>I wrote a simple C++ program to test submitting a job to slurm.</div><br><div>Here's the pgm listing: (my fie name is slurm-test2.cpp</div><br><div>#include <iostream></div><div>#include <time.h></div><div>#include <stdio.h></div><div>using namespace std;</div><br><div>int main() {</div><br><div>// Get system time prior to the looping</div><br><div>time_t rawtime;</div><div>struct tm * timeinfo;</div><br><div>time ( &rawtime );</div><div>cout << "Current local time and date is :" <<ctime (&rawtime)<<endl;</div><br><div>int j ;</div><div>long i ;</div><div>long total_count ;</div><br><div>i = 0 ;</div><div>j = 0 ;</div><br><div>total_count = 1 ;</div><br><div>while (i <=1000000000) {</div><div>// while (j <=1000 ) {</div><div>total_count = total_count + 1 ;</div><div>// j = j + 1 ;</div><div>// }</div><br><div>i = i + 1 ;</div><br><div>}</div><div>cout << " The value of i is " << i<<endl ;</div><div>// cout << " The value of j is " << j<<endl ;</div><div>cout << "The value of total_count is " <<total_count<< endl ;</div><br><div>// Get time after looping</div><br><div>// time_t rawtime;</div><div>// struct tm * timeinfo;</div><br><div>time ( &rawtime );</div><div>cout << "Current local time and date is :" <<ctime (&rawtime)<<endl;</div><br><div>return 0;</div><div>}</div><br><div>I would attach the compiled executable but I'm using Mailspring mail client and it doesn't seem to have the ability to add attachments. If you have the gcc compiler installed, here's the command to compile the program.</div><br><div>g++ {filenaame.cpp} -o {executable file name}</div><br><div>Run the executable from the terminal command line to be sure it compiled OK.</div><br><div>To run the sample c++ program in slurm, be sure slurm started ok then</div><div>run the commands in the following script file of make a copy of it and run the script. I named my script slurm-submit.sh.</div><br><div>#!/bin/bash</div><br><div># This script will instruct slurm to run a compiled C++ program called</div><div># slurm-test2 in Ken's c++_source folder. The script was listed on web</div><div># page http://www.arc.ox.ac.uk/content/slurm-job-scheduler#SLURMcommands</div><br><br><div># set the number of nodes</div><div>#SBATCH --nodes=1</div><br><div># set max wallclock time (1 hour in this case)</div><div>#SBATCH --time=1:00:00</div><br><div># set name of job</div><div>#SBATCH --job-name=test-slurm</div><br><div># mail alert at start, end and abortion of execution</div><div>#SBATCH --mail-type=ALL</div><br><div># send mail to this address</div><div>#SBATCH ==mail-user=linux-ken@comcast.net</div><br><div># run the application</div><div>/home/ken/c++_source/slurm-test2</div><br><div>You may have to customize the script for your physical system. The last line points to the executable file.</div><br><div>If you need copies of my slurm.conf and slurmdbd.conf, just let me know.</div><br><div>I hope all of this helps. It took me a lot of hours to get things working. I still need to solve the big problem of slurm only running once and then</div><div>requiring a reinstall.</div><br><div>Have fun.</div><br><div>Ken Russell</div><div>Retired Chemical Engineer</div><br><br><br><br><br></div><div>On May 5 2018, at 4:45 pm, Kenneth Russell <linux-ken@comcast.net> wrote:</div><blockquote><br><br><br><br><div><div><div>Sent from <a href="https://getmailspring.com/" title="https://getmailspring.com/">Mailspring</a>, the best free email app for work</div></div></div><div>On May 5 2018, at 3:25 pm, Geert Geurts <Geert.Geurts@dalco.ch> wrote:</div><blockquote><br><div><div>Hi Kenneth,</div><div>The pidfile is just a record that says what is the pid of slurmctld or slurmdbd or whatever daemon. It is used by systemd and gets created automatically. The only thing you could worry about is the parent directory of the pidfile, but not having a pidfile doesn't block the daemon from running.</div><br><div>Furtermore, I advice you to start with the most basic you can. Just install slurmctld and slurmd, and forget about slurmdbd for now.</div><div>Just take the minimal example configurations from the slurm website, and try to get a slurctld + a slurmd up and running.</div><div>I advice you to just start slurmctld and slurmd by executing the full path from a comandline. You might need a -d or -D or something to not let the deamon fork into the background. Slurmctld -h should give you the right option.</div><br><div>Succes!ill start. To speed things up, I have created a bash script to reinstall slurm, starting with the tarball extraction step. This is a very inefficient work-around.</div><div>​</div><div>Can anyone help me solve the problem of why slurm runs only once and then fails on subsequent starts?</div><div>​</div><div>I can send copies of conf and log files if requested.</div><div>​</div><div>Thanks, in advance.</div><div>​tart. To speed things up, I have created a bash script to reinstall slurm, starting with the tarball extraction step. This is a very inefficient work-around.</div><div>​</div><div>Can anyone help me solve the problem of why slurm runs only once and then fails on subsequent starts?</div><div>​</div><div>I can send copies of conf and log files if requested.</div><div>​</div><div>Thanks, in advance.</div><div>​</div><div>Ken Russell</div><div>Ken Russellill s</div><br><div>Geert</div><br><br><div>________________________________</div></div></blockquote></blockquote></div></div>