From OctopusWiki
Revision as of 17:47, 2 January 2007 by Marques (talk | contribs) (→‎How do I cite octopus?: added reference to the new PSSB)
Jump to navigation Jump to search

This is a collection of frequently asked questions about octopus. Up to now, we cannot really make a list of commonly found problems. So if something else went wrong, please subscribe to octopus-users mailing list, and ask.


Could not find library...

This is probably the most common error you can get. octopus uses several different libraries, the most important of which are gsl, fftw, and blas/lapack. We assume that you have already installed these libraries but, for some reason, you were not able to compile the code. So, what went wrong?

  • Did you pass the correct --with-XXXX (where XXXX is gsl, fftw or lapack in lowercase) to the configure script? If your libraries are installed in a non-standard directory (like /opt/lapack), you will have to pass the script the location of the library (in this example, you could try ./configure --with-lapack='-L/opt/lapack -llapack'.
  • If you are working on an alpha station, do not forget that the CXML library includes BLAS and LAPACK, so it can be used by octopus. If needed, just set the correct path with --with-lapack.
  • If the configuration script can not find FFTW, it is probable that you did not compile FFTW with the same Fortran compiler or with the same compiler options. The basic problem is that Fortran sometimes converts the function names to uppercase, at other times to lowercase, and it can add an "_" to them, or even two. Obviously all libraries and the program have to use the same convention, so the best is to compile everything with the same Fortran compiler/options. If you are a power user, you can check the convention used by your compiler using the command nm <library>.
  • Unfortunately, the libraries compiled with one Fortran compiler are very often not compatible with file compiled with another Fortran compiler. In order to avoid problems, please make sure that all libraries are compiles using the same Fortran compiler.

To compile the parallel version of of the code, you will also need MPI (mpich or LAM work just fine).

Error while loading shared libraries

Sometimes, when you run octopus you stumble in the following error:

octopus: error while loading shared libraries: libXXX.so: cannot open
shared object file: No such file or directory

This is a classical problem of the dynamical linker. Octopus was compiled dynamically, but the dynamical libraries (the .so files) are in a place that is not recognized by the dynamical loader. So, the solution is to tell the dynamical linker where the library is.

The first thing you should do is to find where the library is situated in your own system. Try doing a "locate libXXX.so", for example. Let us imagine that the libarry is in the directory /opt/intel/compiler70/ia32/lib/ (this is where the ifc7 libraries are by default). Now, if you do not have root access to the machine, just type (using the bash shell)

> export LD_LIBRARY_PATH=/opt/intel/compiler70/ia32/lib/:$LD_LIBRARY_PATH
> octopus


> LD_LIBRARY_PATH=/opt/intel/fc/9.0/lib/:$LD_LIBRARY_PATH octopus

If you have root control over the machine, you can use a more permanent alternative. Just add a line containing "/opt/intel/compiler70/ia32/lib/" to the file /etc/ld.so.conf. This file tells the dynamic linker where to find the .so libraries. Then you have to update the cache of the linker by typing

> ldconfig

A third solution is to compile octopus statically. This is quite simple in some systems (just adding -static to LDFLAFS, or something like that), but in some others not (with my home ifc7 setup it's a real mess!)

What is METIS?

When running parallel in "domains", octopus divides the simulation region (the box) in separate regions (domains) and assigns each of of these to a different processor. This allows not only to speed up the calculation, but also to divide the memory among the different processors. The first step of this process, the splitting of the box, is in general a very complicated process. Note that we are talking about a simulation box of an almost arbitrary shape, and of an arbitrary number of processors. Furthermore, as the communication between processors grows proportionally to the surface of the domains, one should use an algorith that divides the box such that each domain has the same number of points, and at the same time minimizes the total area of the domains. The METIS library does just that. If you want to run octopus parallel in domains you are required use it (or to write anothe rmesh partitioning routine by yourself).


See Units


How do I cite octopus?

octopus is a free program, so you have the right to use, change, distribute, and to publish papers with it without citing anyone (for as long as you follow the GPL license). However, the developers of octopus are also scientists that need citations to bump their CVs. Therefore, we would be very happy if you could cite one or more papers concerning octopus in your work. The main references are

  • A. Castro, H. Appel, Micael Oliveira, C.A. Rozzi, X. Andrade, F. Lorenzen, M.A.L. Marques, E.K.U. Gross, and A. Rubio, octopus: a tool for the application of time-dependent density functional theory, Phys. Stat. Sol. B 243 2465-2488 (2006)
  • M.A.L. Marques, Alberto Castro, George F. Bertsch, and Angel Rubio, octopus: a first-principles tool for excited electron-ion dynamics, Comput. Phys. Commun. 151 60-78 (2003)

There is also a paper describing the propagation methods used in octopus:

  • A. Castro, M.A.L. Marques, and A. Rubio, Propagators for the time-dependent Kohn-Sham equations, J. Chem. Phys 121 3425-3433 (2004)

Finally, two general references on TDDFT, written by some of us:

  • M.A.L. Marques and E.K.U. Gross, Time-dependent density functional theory, Annu. Rev. Phys. Chem. 55 427-455 (2004)
  • Alberto Castro, M.A.L. Marques, Julio A. Alonso, and Angel Rubio, Optical properties of nanostructures from time-dependent density functional theory, J. Comp. Theoret. Nanoscience 1 231-255 (2004)

You can find a more extensive list of publications here.

How do I run parallel in domains?

First of all, you must have a version of octopus compiled with support to the METIS library. This is a very useful library that takes care of the division of the space into domains. Then you just have to run octopus in parallel (this step depends on your actual system, you may have to use mpirun or mpiexec to accomplish it).

In some run modes (e.g., td), you can use the multi-level parallelization, i.e., to run in parallel in more than one way at the same time. In the td case, you can run parallel in states and in domains at the same time. In order to fine tune this behavior, please take a look at the variables ParallelizationStrategy and ParallelizationGroupRanks. In order to check if everything is OK, take a look at the output of octopus in section "Paralellization". This is an example:

************************** Paralellization ***************************
Octopus will run in *parallel*
Info: Number of nodes in par_states  group:     8 (      62)
Info: Octopus will waste at least  9.68% of computer time

In this case, octopus runs in parallel only in states, using 8 processors (for 62 states). Furthermore, octopus some of the processors will be idle for 9.68% of the time (this is not so great, so maybe a different number of processors would be better in this case).

How to center the molecules?

See Manual:External utilities:oct-center-geom.