I noticed an issue with the us-west2 AMI (ami-04bedf34) where the mpirun/mpiexec is linking to openMPI while mpicc and mpif90 are linking to MPICH2. Should be an easy fix for the next AMI update!
This will be fixed in the upcoming 14.04 AMIs. For now you can fix this by running the following commands as root and rebundle the AMI:
$ update-alternatives --config mpi
$ update-alternatives --config mpirun
Select either all openmpi or all mpich paths at the interactive prompts.
Bump, status of 14.04 AMIs? Lots of apt-get installs are 404ing with 13...
I wanted to mention, in case anyone searches for it, that this also causes issues with the AMI-provided mpi4py. If you try to run mpi4py code with mpirun, all of the processes think they are rank 0 due to the mpich2/openmpi mismatch between mpi4py's compiled libraries and mpirun. The fix is to either switch the mpirun alternative to mpich2, or switch mpi to openmpi and reinstall mpi4py.