Project

General

Profile

Building NetCDF with intel's openMPI » History » Version 4

Alexis Jeandet, 06/11/2013 08:42 PM

1 2 Alexis Jeandet
h1. Building NetCDF with intel's openMPI
2 1 Alexis Jeandet
3 4 Alexis Jeandet
To build netCDF with openMPI based on intel compiler, first you have to folow this [[Building OpenMPI with intel compiler|steps]], then:
4 1 Alexis Jeandet
5
<pre><code class="bash">
6
export CC=mpicc
7
export F77=mpif77
8
export F90=mpif90
9
export FC=mpif90
10
#export LIBS="-lirc"
11
export CFLAGS="-fPIC -DgFortran" 
12
export CXXFLAGS="-fPIC -fno-second-underscore -DgFortran" 
13
export FFLAGS="-fPIC -fno-second-underscore -DgFortran" 
14
export F90FLAGS="-fPIC -fno-second-underscore -DgFortran"
15
export LDFLAGS="-fPIC"
16
./configure --prefix=/opt/netcdf --disable-shared --disable-dap --enable-f90 
17
make -j 64  # or the number of cores you have
18
19
</code></pre>
20
21
Then to install it, you must do it as super user:
22
23
<pre><code class="bash">
24
sudo make install
25
</code></pre>
26
27
Once installed you need to tell the linker the library path, to do so:
28
29
<pre><code class="bash">
30
su root  #sudo -s on ubuntu
31
echo "/opt/netcdf/lib" > /etc/ld.so.conf.d/impinetcdf.conf
32
ldconfig  #Tell the linker to update cache
33
exit  #leave root session
34
</code></pre>