Project

General

Profile

Building NetCDF with intel's openMPI » History » Revision 3

Revision 2 (Alexis Jeandet, 06/11/2013 08:39 PM) → Revision 3/4 (Alexis Jeandet, 06/11/2013 08:41 PM)

h1. Building NetCDF with intel's openMPI 

 To build netCDF with openMPI based on intel compiler, first you have to folow this steps [[Building OpenMPI with intel compiler]], [[BuildingOMPI]], then: 

 <pre><code class="bash"> 
 export CC=mpicc 
 export F77=mpif77 
 export F90=mpif90 
 export FC=mpif90 
 #export LIBS="-lirc" 
 export CFLAGS="-fPIC -DgFortran"  
 export CXXFLAGS="-fPIC -fno-second-underscore -DgFortran"  
 export FFLAGS="-fPIC -fno-second-underscore -DgFortran"  
 export F90FLAGS="-fPIC -fno-second-underscore -DgFortran" 
 export LDFLAGS="-fPIC" 
 ./configure --prefix=/opt/netcdf --disable-shared --disable-dap --enable-f90  
 make -j 64    # or the number of cores you have 

 </code></pre> 

 Then to install it, you must do it as super user: 

 <pre><code class="bash"> 
 sudo make install 
 </code></pre> 

 Once installed you need to tell the linker the library path, to do so: 

 <pre><code class="bash"> 
 su root    #sudo -s on ubuntu 
 echo "/opt/netcdf/lib" > /etc/ld.so.conf.d/impinetcdf.conf 
 ldconfig    #Tell the linker to update cache 
 exit    #leave root session 
 </code></pre>