Troubleshooting GridPACK Builds

From GridPACK
Revision as of 21:58, 4 January 2019 by Bjpalmer (talk | contribs)

Jump to: navigation, search

This page is under construction

This page is a collection of trouble shooting tips that have proven useful in the past. If you run into problems building GridPACK or its associated libraries, you may find some useful suggestions here. If you continue to have problems, feel free to contact us.

Boost

Mismatch between compiler and Boost versions: Boost employs the latest features in C++ and a Boost version that was released much later than the compiler version may not compile. You can fix this by using an earlier version of Boost. Alternatively, you can move to a more recent compiler, but this is usually more difficult to do.

Boost cannot find MPI: Boost is actually looking for the mpic++ wrapper to the C++ compiler. You can tell if this is in your environment by typing

   which mpic++

If it isn't in your environment, then you need to modify the first line in the configuration

   echo "using mpi ;" > ~/user-config.jam

to

   echo "using mpi : mpicxx ;" > ~/user-config.jam

This assumes that you have the more common mpicxx name in your environment. If mpicxx is not in your environment, then find the MPI wrapper name and use that. If the build still fails, include the entire path

   echo "using mpi : /absolute/path/to/mpi/C++/compiler/wrapper ;" > ~/user-config.jam

Note that the spaces around : and before ; are important and must be included in the above lines.

PETSc

Configuration error messages: The error messages that PETSc provides during configuration are frequently informative and can provide important information on why configuration failed, as well as pointing to potential solutions. Check these first.

configure.log: The configure.log file in the PETSc build directory can provide additional information on diagnosing build problems. You can identify which test failed and possibly get information on compiler errors from this file.

You do not have write permissions to the --prefix directory: This error message appears if $PREFIX has not been set in your environment (assuming you are using this variable).

Link symbols missing: If configure.log indicates that a link symbol is missing, you may need to make sure that these are included in the PETSc build environment. Most often these are symbols that can be included by adding -pthread to the linker. PETSc does not pay attention to environment variables so have to add them explicitly in the PETSc configure line as

   CFLAGS=-pthread CXXFLAG=-pthread FFLAG=-pthread

Noexec flag on /tmp: This error (which is currently rare) occurs if /tmp has been mounted on your system with the noexec flag set. This flag will prevent you from executing anything in /tmp, even if the executable bit has been set on the file. PETSc uses this directory to create temporary files as part of its configuration process. For PETSc versions later than 3.6, you should be able to get around this problem by setting the TMPDIR environment to some directory where you have both write and execute permissions. This problem is difficult to diagnose and your best bet may be to just try setting TMPDIR and see if your configuration problems go away. On some systems, you may be able to see if the noexec flag is set by typing

   findmnt --target /tmp

The PETSc development team is aware of this problem and may provide a fix in a later release (post 3.9.2), or at least better diagnostics.

Problem building on Mac OS: We have encountered problems configuring and compiling on some Macs running High Sierra (Version 10.13.6). The problem may be associated with recent versions of Xcode.

Configure may fail with an error

   TESTING: checkFortranLibraries from config.compilers(config/BuildSystem/config/compilers.py:868)
   *******************************************************************************
           CONFIGURATION CRASH  (Please send configure.log to petsc-maint@mcs.anl.gov)
   *******************************************************************************

This is a bug in the compilers.py script (this has been fixed in the PETSc 3.10 release). Fix it by editing the config/BuildSystem/config/compilers.py file. Search for endwith and replace it with endswith. PETSc should configure after this.

The second problem occurs when you try and compile PETSc after configuring it. The build will halt with the error