Building Git Baselibs: Difference between revisions

Initial commit
 
Line 15: Line 15:
== Build Baselibs ==
== Build Baselibs ==


The next task is to build Baselibs. In order to correctly build it, two arguments are needed: <tt>ESMF_COMM</tt> and <tt>CONFIG_SETUP</tt>. <tt>ESMF_COMM</tt> is the MPI stack used by ESMF (usually <tt>intelmpi</tt>, <tt>mpi</tt> (for SGI MPT or other vendor MPI), <tt>openmpi</tt>, or <tt>mpich3</tt>). <tt>CONFIG_SETUP</tt> is actually an "identifier" that will allow you to build multiple versions of Baselibs for multiple compiler/MPI combination in the same checkout. The style recommended is for, say, Intel 18.0.5.274 and Intel MPI 18.0.5.274 is: <tt>CONFIG_SETUP=ifort_18.0.5.274-intelmpi_18.0.5.274</tt> where you identify the compiler (by its name on the command line), its version, the MPI stack, and its version.
The next task is to build Baselibs.  
 
Note that if you do not add a <tt>CONFIG_SETUP</tt>, it will instead build into a directory named after <tt>$(FC)</tt>, so <tt>ifort</tt> or <tt>gfortran</tt>. This is fine as long as you only build for that compiler once. Build again (say for a different MPI stack) and you will overwrite that first build!


=== Load modules ===
=== Load modules ===
Line 41: Line 39:
Some modules set these and most of the Baselibs assume the C-preprocessor will be gcc, not, say, pgcpp (which is '''not''' a C++ compiler!).
Some modules set these and most of the Baselibs assume the C-preprocessor will be gcc, not, say, pgcpp (which is '''not''' a C++ compiler!).


=== (OPTIONAL) Set MPICC_CC and MPICXX_CXX variables if using MPT ===
=== Build Environment Settings ===
 
In order to correctly build Baselibs, two arguments are needed: <tt>ESMF_COMM</tt> and <tt>CONFIG_SETUP</tt>.
 
==== ESMF_COMM ====
 
<tt>ESMF_COMM</tt> is the MPI stack used by ESMF (usually <tt>intelmpi</tt>, <tt>mpi</tt> (for SGI MPT or other vendor MPI), <tt>openmpi</tt>, or <tt>mpich3</tt>).
 
==== CONFIG_SETUP ====
 
<tt>CONFIG_SETUP</tt> is actually an "identifier" that will allow you to build multiple versions of Baselibs for multiple compiler/MPI combination in the same checkout. The style recommended is for, say, Intel 18.0.5.274 and Intel MPI 18.0.5.274 is: <tt>CONFIG_SETUP=ifort_18.0.5.274-intelmpi_18.0.5.274</tt> where you identify the compiler (by its name on the command line), its version, the MPI stack, and its version.
 
Note that if you do not add a <tt>CONFIG_SETUP</tt>, it will instead build into a directory named after <tt>$(FC)</tt>, so <tt>ifort</tt> or <tt>gfortran</tt>. This is fine as long as you only build for that compiler once. Build again (say for a different MPI stack) and you will overwrite that first build!
 
==== (OPTIONAL) ESMF_BOPT ====
 
If you want to build ESMF with debugging on also add <tt>ESMF_BOPT=g</tt>
 
==== (OPTIONAL) Set MPICC_CC and MPICXX_CXX variables if using MPT ====


If you are using SGI MPT, and you wish to use, say, the PGI C and C++ compilers instead of GNU, you must set the MPICC_CC and MPICXX_CXX variables to be the "correct" compilers. This can be done either in the environment full (beware!) or during the install by adding at the end:
If you are using SGI MPT, and you wish to use, say, the PGI C and C++ compilers instead of GNU, you must set the MPICC_CC and MPICXX_CXX variables to be the "correct" compilers. This can be done either in the environment full (beware!) or during the install by adding at the end: