Tips in case of errors during compilation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


#. *In case of strange errors during compilation (*e.g.* "catastrophic error: could 
   not find ..."), try one of these solutions*

   * check your home space is not full ;-)
   * check your paths to compilers and libraries (especially Netcdf library)
   * check that you have the good permissions, and check that your executable files 
     (configure, make...) do are executable
   * check that your shell scripts headers are correct or add them if necessary 
     (*e.g.* for bash: ``#!/bin/bash``)
   * try to exit/log out the machine, log in back, clean and restart compilation



#. *Errors and tips related to netcdf library*

   * with netcdf 4.3.3.1: need to add the following compilation flag for all models:  ``-mt_mpi``
    
     The error associated to a missing ``-mt_mpi`` flag is of this type: 
     " /opt/intel//impi/4.1.1.036/intel64/lib/libmpi_mt.so.4: could not read symbols: Bad value "
    
   * with netcdf 4.1.3: do NOT add ``-mt_mpi`` flag
   * with netcdf4, need to place hdf5 library path in your environment:
    
   ::
    
     export LD_LIBRARY_PATH=YOUR_HDF5_DIR/lib:$LD_LIBRARY_PATH
    
   * with netcdf 4, if you use the library splitted in 2: C part and Fortran part, 
     you need to place links to C library before links to Fortran library and need to 
     put both path in this same order in your LD_LIBRARY_PATH


  
#. *In case of 'segmentation fault' error*

   * try  to allocate more memory with "unlimited -s unlimited"
   * try to launch the compilation as a job (batch) with more allocated memory



#. *relocation truncated to fit: R_X86_64_32S against symbol* at compilation in sequential mode

   * add option mcmodel=large in compile options (FLAGS) in jobcomp


#. *m2c* error at the beginning of the compilation 

   * the path to OCEAN directory in the jobcomp file may be wrong



