Skip to content

Commit

Permalink
Add post about HP utilties
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanVaughn committed Jul 21, 2019
1 parent d045611 commit b29cb2e
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 43 deletions.
22 changes: 11 additions & 11 deletions content/posts/boinc-with-sge.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags = ["High-Performance Computing", "Sun Grid Engine", "BOINC"]
description = "Getting BOINC to work on a High-Performance Cluster that uses Sun Grid Engine for job scheduling to donate extra compute time"
+++

# Background
## Background

Recently, I setup a small High-Performance Computing (HPC) cluster for Iowa State's
solar car team. This cluster was primarily used for running
Expand All @@ -15,7 +15,7 @@ was in the build phase and not actively designing the next car, the cluster
sat idle the vast majority of the time. We decided that we should donate the extra
compute time to scientific research.

# Introducing BOINC
## Introducing BOINC

We decided that BOINC would be the best way to donate our extra compute time.
In case you're not aware, [BOINC](https://boinc.berkeley.edu/) stands for
Expand All @@ -25,7 +25,7 @@ donate extra computational capacity to various scientific research projects and
is run by University of California, Berkeley. Being designed for home computers
will prove to be problematic.

# Installing BOINC
## Installing BOINC

The first challenge was simply installing BOINC. To avoid as many configuration changes
as possible, we prefer to install applications to our network file share rather than
Expand All @@ -49,7 +49,7 @@ cd boinc
make -j
```

# Creating Account(s)
## Creating Account(s)

In order to use BOINC, you need to create an account with each project you want
to contribute to and attach your hosts to it. This can be extremely tedious,
Expand All @@ -60,7 +60,7 @@ is highly recommended. Once you select some projects, you can also check the opt
The only issue I've had with BAM, is that my work profile was not being added to new
hosts by default.

# Configuring SGE
## Configuring SGE

The next challenge was that BOINC is designed to only be run on a single computer
and is *not* built around Message Passing Interface (MPI) like most applications that
Expand All @@ -70,18 +70,18 @@ single slot per compute node, so that if a BOINC job got scheduled on a node,
it would be reserved the entire node. Make sure that the user account you will be
using for BOINC has access to this queue and the compute nodes.

## Important Setting
### Important Setting

An important setting needs to be set in SGE so that other jobs have higher priority.
For every other queue that you have, set the BOINC-specific queue to be a subordinate
with a max slot count as 1. That way, if **any** other jobs come into the queue, they
will take priority over the BOINC job.

# Starting BOINC
## Starting BOINC

Next, we need to setup how BOINC will be launched.

## Array Job
### Array Job

Launching a job across multiple hosts is easy with SGE with array jobs. We can write
a small Bash script to parse how many slots are available in the BOINC queue
Expand All @@ -95,7 +95,7 @@ BOINC_SLOTS=`qstat -g c -q boinc.q | tail -1 | sed -e "s/ [ ]*/ /g" | cut --deli
qsub -q boinc.q -t 1-${BOINC_SLOTS} -o boinc_out.txt -j y -cwd -N Boinc /home/boinc/runBoinc.sh
```

## BOINC Client
### BOINC Client

Launching the client is trickier. BOINC doesn't like sharing a directory with other
running instances, so each host needs it's own directory to work out of. Also, we want
Expand Down Expand Up @@ -156,13 +156,13 @@ $CLIENT_BASE/boinc_client --dir $DATA_DIR

```

# Conclusion
## Conclusion

That's it! You should now be able to run your array job submission script which will
start a BOINC process on each available host. If any new jobs come in, the BOINC
jobs will be paused until the entire host is available again.

## References
### References

- https://boinc.berkeley.edu/wiki/Boinccmd_tool#Miscellaneous
- http://wiki.gridengine.info/wiki/index.php/Integrating_BOINC_and_Grid_Engine
Expand Down
10 changes: 5 additions & 5 deletions content/posts/docker-mysql-to-mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ images = ["/img/docker-mysql-to-mariadb/mysql_to_mariadb.jpg"]
cover = "/img/docker-mysql-to-mariadb/mysql_to_mariadb.jpg"
+++

# Background
## Background

Recently, when I setup a number of Docker Compose stacks for myself, I naively
used MySQL 8 databases. I had heard of MariaDB in the past, and knew it was a
Expand All @@ -21,7 +21,7 @@ including myself ***really*** hate Oracle),
I decided I wanted to swap out my MySQL databases.
This ended up being more complicated than I initially hoped.

# Challenge
## Challenge

The challenge was that I had previously used MySQL 8 for my databases.
This presented the problem that I simply couldn't stop the old MySQL container,
Expand All @@ -32,7 +32,7 @@ This meant that I would need to export the data from each database, delete the v
start a new MariaDB database, and reimport the data. While it sounds simple enough,
it quickly became very tedious.

# Process
## Process

The general process was as follows:

Expand Down Expand Up @@ -66,7 +66,7 @@ The general process was as follows:

`sudo docker exec -i container_name mysql -u username -p database < database_db.sql`

# Automating
## Automating

After doing this process by hand twice, I quickly decided to write a script to do it
for me as I use a standard naming convention for all of my Docker Compose stacks and really
Expand Down Expand Up @@ -131,7 +131,7 @@ sudo docker exec -i $CONTAINERNAME mysql -u $USERNAME -p$PASSWORD $DATABASE < $F
#rm $DOCKERDIR/$FILENAME
```

# Conclusion
## Conclusion

With a bit of time and effort, I've now converted all my MySQL databases to MariaDB
as part of my goal of [ridding myself](https://www.cnbc.com/2018/08/01/amazon-plans-to-move-off-oracle-software-by-early-2020.html) of all Oracle software.
Loading

0 comments on commit b29cb2e

Please sign in to comment.