Skip to content

EC2 configuration

Robert Sare edited this page Sep 30, 2017 · 5 revisions

EC2 Configuration

Building ATLAS with architecture-specific optimization

Build ATLAS from source

sudo apt-get source atlas
sudo apt-get build-dep atlas
sudo apt-get install devscripts
cd <latest-atlas-dir>
sudo fakeroot debian/rules custom

Delete any existing libraries

sudo apt-get purge libopenblas-{base, dev}

Specify links to new implementation from ATLAS

sudo update-alternatives libblas.so.3
sudo update-alternatives liblapack.so.3

Install FFT packages

sudo apt-get install libfftw libfftw3

Install Python packages


cd /path/to/libs
sudo apt-get source python-numpy
cd python-numpy-xxx
mv site.cfg.example site.cfg
echo "[atlas]\nlibrary_dirs=/usr/lib/atlas-base/lib\ninclude_dirs=/usr/lib/atlas-base/include\natlas_libs= lapack, f77blas, cblas, atlas" >> site.cfg
sudo pip install -U pip
sudo pip install .

Check that linked libraries are correct

python -c "import numpy; numpy.show_config()"

Storage

Configuring a shared EFS volume

Create the volume and add it to a security group (sg-efs-xxxx). Make sure accessing instances are in the same region/subregion.

Add inbound SSH access rule to to the EC2 security group (sg-ec2-xxxx):

Type: SSH, Port: 22, Source: 0.0.0.0/0 or the EFS IP.

Add outbound NFS access rule to EFS security group:

Type: NFS (2049), Port: 2049, Source: sg-ec2-xxxx

Make a mountpoint directory on your instance

sudo mkdir /efs

Mount the volume:

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 <filesystem ID>.efs.us-west-2.amazonaws.com:/ /efs

NB: Use Max I/O setting for EFS

Benchmarking