Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleCompiling OpenIFS / FCM related questions
Expand
titleClick to expand for questions and answers...

Q. The command 'fcm make' gives the error: mpif90: command not found?

A. This is because the FCM configuration files assume the use of a 'compiler wrapper' which is typically provided by MPI (e.g. OpenMPI or MPICH) installations. Make sure you have OpenMPI a flavour of MPI installed and you have the OpenMPI 'bin' directory included on your PATH environment variable. For example, on linux use 'apt-get install libopenmpi-dev' to get OpenMPI. HPC machines may require you to use a 'module' command e.g 'module load openmpi'. Check : check your local help information.

Q. I get this error, what does it mean? "[FAIL] cpg1c.intfb.h: missing dependency (type=include)"

A. FCM has found an include statement: "#include cpg1c.intfb.h" in the source code but can't find the source file cpg1c.F90. Make sure the file exists or FCM is configured to look at all the sources.

Q. How do I change where FCM builds the library archive (.a) file before the link stage?

A. FCM queries the TMPDIR environment variable. If set it uses that location, otherwise it defaults to /tmp. On HPC systems, /tmp may not be the best choice if it is in memory.

Q. What does the $HERE variable in FCM configuration files mean?

A. The $HERE variable is a special variable that FCM interprets as the directory in which the configuration file resides.

Q. How do I change the compiler used by my MPI compiler wrappers?

A. This varies depending on your MPI implementation and your local environment. As an example, for OpenMPI, set the environment variables:
export OMPI_FC=pgf90
export OMPI_CC=pgcc
to use the Portland compilers instead of the default GNU (gfortran) compilers. Check the 'man page' of the mpif90 command to see what other options are possible. Some implementations allow you to use an option -fc to set the underlying compilers. Lastly, some HPC centres provide the 'module' command for loading and unloading particular compiler suites. Consult your local documentation for more details.

Q. I get an error about missing shared object file: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory.

A. This can arise with the Intel compiler. The MKL library is Intel's version of the LAPACK and BLAS libraries which should be supplied with the compiler. The .so file extension means this is a shared library found at runtime. In order to find this library, the environment variable LD_LIBRARY_PATH must be set correctly. You will need to find the location of this library and add the directory to the LD_LIBRARY_PATH. Normally this is done for you by a small script supplied with the Intel compiler script. Please check your support information.

Q. I get undefined references to 'dgemm_', 'dgemv_', 'sgecon_' etc.

A. These routines come from the LAPACK and BLAS libraries. You may have one or other of these libraries missing from your .cfg config (or OIFS_LAPACK_LIB environment variable). Alternately you have specific both libraries but the compiler can't find them; check the pathnames to the libraries specified on the compile link carefully.

Q. Should I use the same compiler to for OpenIFS, LAPACK, OpenMPI etc?

A. It's recommended that the same compiler suite is used to compile OpenIFS, your MPI installation and LAPACK. This may not always be practical but it's strongly recommended as some compilers use a different default size of LOGICAL variables which can cause crashes due to memory alignment problems in subroutine calls.

Panel
titleMac OS X specific questions
Expand
titleClick to expand for questions and answers

Q. When compiling GRIB_API on Mac OS X I get an error: ld: duplicate symbol _grib_file_not_found in .libs/action_class_alias.o and .libs/action.o

A. This is a known issue with compiling on Mac OS X. See this page on the GRIB_API Installation FAQ for the workaround.

Q. I'm using the Intel compiler and the MKL library but get this error: dyld: Library not loaded: libmkl_intel_lp64.dylib when I run OpenIFS.

A. On Mac OS X, the MKL library is a dynamic (shared) library which is loaded at runtime and not when the model is compiled. To ensure the library is found you need to add the directory containing the library to your dynamic library path environment variable (DYLD_LIBRARY_PATH). The Intel compiler supplies a script that correctly sets the compile environment for you which should be run. This is normally found in the Intel compiler install directory: /opt/intel/Compiler/11.0/054/Frameworks/mkl/tools/environment/mklvars.sh.

...