top of page
ngereqgheneasfacju

Configure error cblas lapack library files not found at usual locations: Understanding the role of B



To run a program linked with the shared version of the library theoperating system must be able to locate the corresponding .sofile at runtime. If the library cannot be found, the following errorwill occur:


Abinit developers are trying to move away from Fortran binary files as thisformat is not portable and difficult to read from high-level languages such as python.For this reason, in Abinit v9, HDF5 and netcdf4 have become hard-requirements.This means that the configure script will abort if these libraries are not found.In this section, we explain how to build HDF5 and netcdf4 from source including support for parallel IO.




configure error cblas lapack library files not found at usual locations



Configuration-time errors are usually due to misconfiguration of the environment, missing (hard) dependenciesor critical problems in the software stack that will make configure abort.Unfortunately, the error message reported by configure is not always self-explanatory.To pinpoint the source of the problem you will need to search for clues in config.log,especially the error messages associated to the feature/library that is triggering the error.


Obviously, one can encounter cases in which modules are properly configured yet the configure script abortsbecause it does not know how to deal with your software stack.In both cases, config.log is key to pinpoint the problem and sometimes you will find thatthe problem is rather simple to solve.For instance, you are using a Fortran module files produced by gfortran while trying to compile with theintel compiler or perhaps you are trying to use modules produced by a different version of the same compiler.Perhaps you forgot to add the include directory required by an external library and the compilercannot find the include file or maybe there is a typo in the configuration options.The take-home message is that several mistakes can be detected by just inspecting the log messagesreported in configure.log if you know how to search for them.


  • Problem: Possibly some of the following: You are creating new PETSc objects but never freeing them.

  • There is a memory leak in PETSc or your code.

  • Something much more subtle: (if you are using Fortran). When you declare a large array in Fortran, the operating system does not allocate all the memory pages for that array until you start using the different locations in the array. Thus, in a code, if at each step you start using later values in the array your virtual memory usage will "continue" to increase as measured by ps or top.

  • You are running with the -log, -log_mpe, or -log_all option. He a great deal of logging information is stored in memory until the conclusion of the run.

  • You are linking with the MPI profiling libraries; these cause logging of all MPI activities. Another Symptom is at the conclusion of the run it may print some message about writing log files.

  • Cures: Run with the -trmalloc_log option or -trdump. Use the commands PetscTrDump() and PetscTrLogDump() sprinkled in your code to track memory that is allocated and not later freed. Use the commands PetscTrSpace() and PetscGetResdidentSetSize() to monitor memory allocated and total memory used as the code progresses.

  • This is just the way Unix works and is harmless.

  • Do not use the -log, -log_mpe, or -log_all option, or use PLogEventDeactivate() or PLogEventDeactivateClass(), PLogEventMPEDeactivate() to turn off logging of specific events.

  • Make sure you do not link with the MPI profiling libraries. Edit the file bmake/$PETSC_ARCH/packages and remove all references to libraries with lmpi and pmpi in their names.

Symptom: Under Windows NT When Installing using g++ libfast in: /users/petsc/petsc_prj/petsc/src/sys/src str.c: In function `void PetscStrncpy(char *, char *, int)': str.c:36: warning: implicit declaration of function `int strncpy(...)' ... ... Problem: This is due to the case insensitivity of NT file systems. Instead of using string.h , the compiler is picking up String.h - a C++ include-file, causing these errors.


To compile Ipopt with a precompiled MUMPS library, you need to specify the -I flag to have the compiler find the directory containing the MUMPS header files with the --with-mumps-cflags flag of Ipopt's configure, e.g.,


If a library is not found during configuration, you can try to use options to modify the search path. For example if your gsl libraries is in /opt/local (this is where MacPorts put it) and configure is not able to find it you can try


PLUMED needs BLAS and LAPACK. These are treated slightly different from other libraries. The search is done in the usual way (i.e., first look for them without any link flag, then add "-lblas" and "-llapack", respectively). As such if you want to use a specific version of BLAS or LAPACK you can make them available to configure by using


PLUMED source code already includes a few selected VMD molfile plugins so as to read a small number of additional trajectory formats (e.g., dcd, gromacs files, pdb, and amber files). If you configure PLUMED with the full set of VMD plugins you will be able to read many more trajectory formats, basically all of those supported by VMD. To this aim, you need to download the SOURCE of VMD, which contains a plugins directory. Adapt build.sh and compile it. At the end, you should get the molfile plugins compiled as a static library libmolfile_plugin.a. Locate said file and libmolfile_plugin.h, they should be in a directory called /pathtovmdplugins/ARCH/molfile (e.g. /pathtovmdplugins/MACOSXX86_64/molfile). Also locate file molfile_plugin.h, which should be in /pathtovmdplugins/include. Then customize the configure command with something along the lines of:


Using modules, it is not necessary to make the PLUMED module explicitly dependent on the used library. Imagine a scenario where you first installed a module libgsl, then load it while you compile PLUMED. If you provide the following option to configure --enable-rpath, the PLUMED executable and library will remember where libgsl is, without the need to load libgsl module at runtime. Notice that this trick often does not work for fundamental libraries such as C++ and MPI library. As a consequence, usually the PLUMED module should load the compiler and MPI modules.


Loading a library module will set environment variables CPATH and LIBRARY_PATH pointing to the location of the library itself and its header files. These environment variables are supported by most compilers (for example Intel and GCC), which will automatically try the directories listed in those environment variables during compilation and linking phases. This feature allows you you to easily link against the library without specifying its location explicitly by passing the -I and -L options to the compiler. If your make- or config- file calls for an explicit location of the library to pass to the compiler via -I and -L, you can usually omit the location of the library and leave these lines blank in the make- or config- file.


If you install pre-compiled binaries in your home directory (for example Miniconda) they may fail using errors such as /lib64/libc.so.6: version `GLIBC_2.18' not found. Often such binaries can be patched using our setrpaths.sh script, using the syntax setrpaths.sh --path path [--add_origin] where path refers to the directory where you installed that software. This script will make sure that the binaries use the correct interpreter, and search for the libraries they are dynamically linked to in the correct folder. The option --add_origin will also add $ORIGIN to the RUNPATH. This is sometimes helpful if the library cannot find other libraries in the same folder as itself.


Unfortunately, googletest and lapack are not as easy to install. Many distros do not provide a googletest package with pre-compiled libraries, and the lapack packages do not have the necessary cmake config files for cmake to configure linking the cblas library. rocBLAS provide a cmake script that builds the above dependencies from source. This is an optional step; users can provide their own builds of these dependencies and help cmake find them by setting the CMAKE_PREFIX_PATH definition. The following is a sequence of steps to build dependencies and install them to the cmake default /usr/local.


The users could easily switch the libraries by adjusting the LD_LIBRARY_PATH environment variables as a temporary solution. For system level library switching, two custom eselect modules (eselect-blas, eselect-lapack) are provided. They manipulates configuration files under the /etc/ld.so.conf.d/ directory, hinting ld.so on the places to find the BLAS/LAPACK libraries.


To remove the MKL candidate, or any other customized library, just remove the corresponding files under /etc/env.d/blas/ and /etc/env.d/lapack/ directories, then select some other candidates. Note, the sci-libs/mkl-rt package can do all the above steps for you.


In addition, this library contains a great number of safety checks on most arguments of all functions you could possibly call. These assertions have proven to be an invaluable means to finding programming bugs since they will almost always abort your program if something goes wrong. In our experience, more than ninety per cent of all errors are invalid parameters (such as vectors having the wrong size, etc.) and they are usually found almost instantaneously, displaying the file name and line number of where the problem occurred.


Unity build: deal.II may be compiled with a unity build; that is, one may configure the build process so that the library is compiled as a few large files instead of many small ones. The unity build feature may be enabled by passing the -DDEAL_II_UNITY_BUILD=ON argument to cmake. This feature is disabled by default.


When configuring interfacing to external libraries, the cmake script by default tries to find all of these libraries in a number of standard locations on your file system. For optional interfaces, it gives up if the library is not found and deal.II will be built without support for them. However, there is one interface that we need to have: BOOST 1.59 or newer. If it is not found externally cmake will resort to the bundled boost version that is part of the deal.II tar file. 2ff7e9595c


2 views0 comments

Recent Posts

See All

Samurai jack

Ice Scream: uma sobremesa deliciosa e versátil Grito de gelo é uma sobremesa congelada feita de creme, leite, açúcar e vários aromas. É...

Comments


bottom of page