Sent from Mailspring 
(https://link.getmailspring.com/link/1525569570.local-0ef17352-66af-v1.2.1-7e744...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=c2x1cm0tdXNlcnNAbGlzdHMuc2NoZWRtZC5jb20%3D),
 the best free email app for work

---------- Forwarded message ---------
From: Kenneth Russell <linux-...@comcast.net>
Subject: [slurm-users] Fwd: After Each slurm Run, I Need to Reinstall slurm
Date: May 5 2018, at 6:15 pm
To: slurm-users@lists.schedmd.com

Sent from Mailspring 
(https://link.getmailspring.com/link/1525569168.local-b056fee5-454d-v1.2.1-7e744...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=c2x1cm0tdXNlcnNAbGlzdHMuc2NoZWRtZC5jb20%3D),
 the best free email app for work

---------- Forwarded message ---------
From: Kenneth Russell <linux-...@comcast.net>
Subject: Re: [slurm-users] After Each slurm Run, I Need to Reinstall slurm
Date: May 5 2018, at 6:02 pm
To: Slurm User Community List <slurm-users@lists.schedmd.com>

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.
To install slurm I used the instructions in the web site:
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
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 
(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
Here's the reinstall script:
#
# Script to install slurm from a previously downloaded slurm-17.11.5.tar.bz2 
file
# Commands taken fro slurm install instructions from:
# 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.
​
Can anyone help me solve the problem of why slurm runs only once and then fails 
on subsequent starts?
​
I can send copies of conf and log files if requested.
​
Thanks, in advance.
​
Ken Russell

​
​#
#!/bin/sh
#
cd /
cd /storage
echo extract slurm tarball
sudo tar xvjf slurm-17.11.5.tar.bz2
echo Go to slurm-17.11.5 folder
cd slurm-17.11.5
echo configure slurm
sudo ./configure --prefix=/tmp/slurm-build --sysconfdir=/etc/slurm --enable-pam 
--with-pam_dir=/lib/x86_64-linux-gnu/security/
echo run 'make'
sudo make
echo Run 'make contrib'
sudo make contrib
echo Run 'make install'
sudo make install
cd ..
echo Run fpm
sudo fpm -s dir -t deb -v 1.0 -n slurm-17.11.5 --prefix=/usr -C 
/tmp/slurm-build .
echo Run dpkg -i slurm-17.11.5_1.0_amd64.deb
sudo dpkg -i slurm-17.11.5_1.0_amd64.deb
echo User Slurm already exists
# sudo useradd slurm
# The following directories already exist from prior installs
# sudo mkdir -p /etc/slurm /var/spool/slurm/ctld /var/spool/slurm/d 
/var/log/slurm
# Directory ownership already changed from prior installs
# sudo #!/bin/shThanks, in advance.chown slurm /var/spool/slurm/ctld 
/var/spool/slurm/d /var/log/slurm
sudo cd storage
echo Copy service files
sudo cp ubuntu-slurm/slurmdbd.service /etc/systemd/system/
sudo cp ubuntu-slurm/slurmctld.service /etc/systemd/system/
# The edited conf files have already been copied to /etc/slurm
# sudo cp ubuntu-slurm/slurm.conf /etc/slurm/
# sudo cp ubuntu-slurm/slurmdbd.conf /etc/slurm/

Here's another very simple script to start slurm once it's installed and 
working It follows the steps from the web page above.
#
# Script to start SLURM and associated programs and services
# Commands taken from Slurm installation instructions from
# https://github.com/mknoxnv/ubuntu-slurm/blob/master/README..md
#
#!/bin/sh
echo Starting munge
sudo service munge start
echo Starting mysql Mariadb mysql look-alike
sudo systemctl start mysql
echo Reloading daemons
sudo systemctl daemon-reload
echo Enable the bd manager daemon slurmdbd
sudo systemctl enable slurmdbd
echo Starting slurmdbd
sudo systemctl start slurmdbd
echo Enable the slurm control daemon slurmctls
sudo systemctl enable slurmctld
echo Starting slurmctld
sudo systemctl start slurmctld

If you get errors from slurmdbd or slurmctld, run the reinstall script and then 
the slurm start script above.
Here's a couple more goodies:
I wrote a simple C++ program to test submitting a job to slurm.
Here's the pgm listing: (my fie name is slurm-test2.cpp
#include <iostream>
#include <time.h>
#include <stdio.h>
using namespace std;

int main() {
// Get system time prior to the looping
time_t rawtime;
struct tm * timeinfo;

time ( &rawtime );
cout << "Current local time and date is :" <<ctime (&rawtime)<<endl;

int j ;
long i ;
long total_count ;

i = 0 ;
j = 0 ;

total_count = 1 ;
while (i <=1000000000) {
// while (j <=1000 ) {
total_count = total_count + 1 ;
// j = j + 1 ;
// }

i = i + 1 ;
}
cout << " The value of i is " << i<<endl ;
// cout << " The value of j is " << j<<endl ;
cout << "The value of total_count is " <<total_count<< endl ;

// Get time after looping
// time_t rawtime;
// struct tm * timeinfo;

time ( &rawtime );
cout << "Current local time and date is :" <<ctime (&rawtime)<<endl;

return 0;
}

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.
g++ {filenaame.cpp} -o {executable file name}
Run the executable from the terminal command line to be sure it compiled OK.
To run the sample c++ program in slurm, be sure slurm started ok then
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.

#!/bin/bash
# This script will instruct slurm to run a compiled C++ program called
# slurm-test2 in Ken's c++_source folder. The script was listed on web
# page http://www.arc.ox.ac.uk/content/slurm-job-scheduler#SLURMcommands

# set the number of nodes
#SBATCH --nodes=1

# set max wallclock time (1 hour in this case)
#SBATCH --time=1:00:00

# set name of job
#SBATCH --job-name=test-slurm

# mail alert at start, end and abortion of execution
#SBATCH --mail-type=ALL

# send mail to this address
#SBATCH ==mail-user=linux-...@comcast.net

# run the application
/home/ken/c++_source/slurm-test2

You may have to customize the script for your physical system. The last line 
points to the executable file.
If you need copies of my slurm.conf and slurmdbd.conf, just let me know.
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
requiring a reinstall.

Have fun.
Ken Russell
Retired Chemical Engineer

On May 5 2018, at 4:45 pm, Kenneth Russell <linux-...@comcast.net> wrote:
>
>
>
>
> Sent from Mailspring (https://getmailspring.com/), the best free email app 
> for work
> On May 5 2018, at 3:25 pm, Geert Geurts <geert.geu...@dalco.ch> wrote:
> >
> > Hi Kenneth,
> > 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.
> >
> > Furtermore, I advice you to start with the most basic you can. Just install 
> > slurmctld and slurmd, and forget about slurmdbd for now.
> > Just take the minimal example configurations from the slurm website, and 
> > try to get a slurctld + a slurmd up and running.
> > 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.
> >
> > 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.
> > ​
> > Can anyone help me solve the problem of why slurm runs only once and then 
> > fails on subsequent starts?
> > ​
> > I can send copies of conf and log files if requested.
> > ​
> > Thanks, in advance.
> > ​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.
> > ​
> > Can anyone help me solve the problem of why slurm runs only once and then 
> > fails on subsequent starts?
> > ​
> > I can send copies of conf and log files if requested.
> > ​
> > Thanks, in advance.
> > ​
> > Ken Russell
> > Ken Russellill s
> >
> > Geert
> >
> > ________________________________

Reply via email to