Do you have any guides for compiling the Navy’s COAMPS mesoscale met model using PGI on a single processor Linux box?


Unfortunately we don’t have the source. Can you point us to the source? Is it open source?



The code is available to the public after registering at the following site:


I got it to build. I don’t know about running it, though, that seems pretty complicated. Here is what I did:

The code comes with pretty good instructions for building it with PGI compilers. They do seem a little bit out of date, though. And they are building for 32 bit architectures, using the -tp p6 flag. So, that is the first thing to look out for. I would suggest you set your path to the PGI compilers external to this build procedure.

The other thing to look out for is hardcoded paths to mpi libraries and
include files. In our 7.1 Workstation product, we ship a version of MPICH1 which I am using here. But your paths will have to change according to your setup.

I edited config.user to look like this:

to run single precision, uncomment below



Debug settings

PGI_FFLAGSM = -g -tp p6 $(PGI_PRECISION) -byteswapio -DPGF -DLINUX

PGI_FFLAGSA = -g -tp p6 $(PGI_PRECISION) -byteswapio -DPGF -DLINUX


PGI_MPI_HOME =/opt/pgi/linux86-64/7.1/mpi/mpich
PGI_COMP_HOME =/opt/pgi

Note: MPI_INCLUDE_DIR is the directory where the mpif.h and mpiof.h files

reside. For MPICH this will be PGI_MPI_HOME, and for LAM this will be the

coamps3 include directory.

To switch from LAM to MPICH you need to do three things, uncomment the

appropriate lines for PGI_MPI_INCLUDE_DIR and EXTRALIBS. Also fill in the

correct values for PGI_MPI_HOME and PGI_COMP_HOME for your installation.

With MPICH, uncomment this


With LAM, uncomment and edit this:

#PGI_MPI_INCLUDE_DIR =/home/lowder/coamps3/include

${MAKE} target
"FC=pgf90 "
"CC=pgcc "
"LD=pgf90 "
"LDFLAGS= -Bstatic "
“AR=ar rv”
“EXTRALIBS= -L$(PGI_MPI_HOME)/lib -lmpichf90 -lmpich -lacml”

Note that I have simplified the compiler names, removed some libraries that are unnecessary when using pgf90 to link, and changed the blas libraries to use acml instead.

Using these changes, it seemed to build correctly for me by typing
“make linux_pgi”