Parallel NetCDF

Building Parallel NetCDF with Arm Compiler


Overview Before you begin Procedure Related information

Procedure

  1. Create build and install locations, and set them using the environment variables build_dir and install_dir, for example:

    mkdir pnetcdf_build
    mkdir pnetcdf_install
    export build_dir=/path/to/pnetcdf_build 
    export install_dir=/path/to/pnetcdf_install

    replacing /path/to/ with the path to the new directories.

  2. Specify the location of the HDF5 installation by setting hdf_dir, respectively, such as:

    export hdf_dir=/path/to/hdf5_install

    replacing /path/to/hdf_install with the path to your HDF5 installation, respectively.

  3. Download and unpack Parallel NetCDF:

    cd $build_dir
    wget http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.9.0.tar.gz
    tar -zxvf parallel-netcdf-1.9.0.tar.gz
    cd parallel-netcdf-1.9.0
  4. To build for Arm AArch64, you require up-to-date versions of config.guess and config.sub.

    To obtain up-to-date versions, use:

    wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O scripts/config.guess
    wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O scripts/config.sub
  5. Set the compiler environment variables:

    export CC=armclang
    export CXX=armclang++
    export F77=armflang
    export F90=armflang
    export FC=armflang
    export MPICC=mpicc
    export MPIF77=mpifort
    export MPIF90=mpifort
    export MPICXX=mpicxx
  6. Configure the build by passing the location of the HDF5 include and lib directories using a series of environment variables:

    export CFLAGS="-I${hdf_dir}/include -O3 -fPIC -DPIC" 
    export CXXFLAGS="-I${hdf_dir}/include -O3 -fPIC -DPIC"
    export FFLAGS="-I${hdf_dir}/include -O3 -fPIC"
    export FCFLAGS="-I${hdf_dir}/include -O3 -fPIC"
    export LDFLAGS="-L${hdf_dir}/lib -L${hdf_dir}/lib" 
    
     ./configure  --prefix=$install_dir
  7. Build, test, and install Parallel NetCDF, using:

    make
    make check
    make ptest
    make install
    
Previous Next