[petsc-users] installation on cloud platform

Marco Zocca zocca.marco at gmail.com
Mon Jan 4 16:48:57 CST 2016

Hi Satish,

 thank you for the input;

I was really looking for something that lets one abstract out "where"
the code lives, so as to possibly work both in a single-node and
cluster setting.

This is why a "container" approach sounds meaningful. Configure once, run many.
For message-passing codes such as our case, there's this
`docker-compose` [ https://docs.docker.com/compose ] which aggregates
the compilation and network setup steps.
I have found this approach [
http://qnib.org/2015/04/14/qnibterminal-mpi-hello-world/ ] that runs
an MPI benchmark using `docker-compose`. The "Consul" library takes
care of the DNS resolution as far as I can tell, and SLURM is the
queue manager.

The downsides: it's yet another third party tool (albeit a widespread
one), with yet another scripting syntax (very much similar but
incompatible with shell script).
Latencies will be much larger, I expect, and also one should pay a
much higher attention to security (building on top of someone else's
images, freely available from the Docker Hub, is tantamount to running
arbitrary code at compile time).

There are however trusted Docker images, containing various
combinations of Linux distributions and software.

I'm very much looking forward to continuing this discussion;

Kind regards,


> Are you interested in using 1 node [with multiple cores] - or multiple
> nodes - aka cluster on amazon?
> For a single node - I don't think any additional config should be
> necesary [/etc/hosts - or ssh keys]. It should be same as any laptop
> config.
> Its possible that 'hostname' is not setup properly on amazon nodes - and
> MPICH misbehaves.  In this case - you might need any entry to
> /etc/hosts. Perhaps something like:
> echo `hostname` >> /etc/hosts
> If cluster - then there might be a tutorial to setup a proper cluster with AWS. Googles gives
> http://cs.smith.edu/dftwiki/index.php/Tutorial:_Create_an_MPI_Cluster_on_the_Amazon_Elastic_Cloud_%28EC2%29
> BTW: --download-mpich is a convient way to install MPI. [we default to
> device=ch3:sock]. But you might want to figureout if there is a better
> performing MPI for the amazon config.  [perhaps mpich with nemesis
> works well. Or perhaps openmpi. Both are available prebuit on
> ubunutu...]
> Satish
>> >>
>> >>       has anyone here tried/managed to install PETSc on e.g. Amazon AWS or
>> >>     the Google Compute Engine?
>> >>
>> >>     I believe some extra components are needed for coordination, e.g.
>> >>     Kubernetes or Mesos (in turn requiring that the library be compiled
>> >>     within some sort of container, e.g. Docker), but I'm a bit lost amid
>> >>     all the options.

More information about the petsc-users mailing list