I want to install siesta (a computational code) to run parallel in Ubuntu 12.04. There is an arch.make file which a part of it's content is as follows:

  .SUFFIXES: .f .F .o .a .f90 .F90





  FFLAGS=-g -O2




  BLAS_LIBS=/usr/lib/libf77blas.a /usr/lib/atlas/libblas.a
  BLACS_LIBS= -L$(LIBPATH) -lblacsF77 -lblacsC -lblacs




  #SIESTA needs an F90 interface to MPI
  #This will give you SIESTA's own implementation
  #If your compiler vendor offers an alternative, you may change
  #to it here.

So, according to this. I have some questions, please:

1- what do the following lines mean? (what happens in them?)(for the second line, I don't know what does it mean to write BLAS_LIBS and equal to an address.)

.SUFFIXES: .f .F .o .a .f90 .F90
BLAS_LIBS=/usr/lib/libf77blas.a /usr/lib/atlas/libblas.a

2-what should be written after the equal sign in the following lines?


3-should the expressions in the right side of equal sign in the following line be replaced by something? if yes, what should be written?!


I know some basics of bash scripting and familiar with command line in linux. I have watched several training courses about bash scripting but I'm still perplexed!!

Thanks for any help.

  • 1
    IMHO this is outside the scope of AskUbuntu. For general information about Makefiles, such as the meaning of .SUFFIXES, see Managing Projects with GNU Make, Third Edition By Robert Mecklenburg. For your other questions, did you read the 'COMPILATION' section of the Siesta manual? There is a section about the arch.make file specifically, and a suggestion for how to generate an appropriate one automatically using the provided ../Src/configure script. G/L. – steeldriver Sep 29 '16 at 19:25
  • Thanks so much I used the arch.make for MPI and got the following errors: f95 -c -g -O2 -I mpi__include.f90 f95: fatal error: no input files compilation terminated. make: *** [mpi__include.o] Error 4 – P.A.M Sep 29 '16 at 20:04

A .SUFFIXES rule in a Makefile determines which implicit rules are used during compilation. A detailed explanation would be off-topic here, but you can read all you want to know in Chapter 2 Rules in O'Reilly's Managing Projects with GNU Make, Third Edition By Robert Mecklenburg.

Regarding the assignments of variables such as FPP, FPP_OUTPUT, NETCDF_LIBS you will need to refer to the software's own documentation to determine suitable values for these - we might guess based on context that FPP stands for a Fortran pre-processor (by analogy with CPP) but that's by no means guaranteed.

Your underlying question seems to be "How do I build the siesta computational chemistry software on Ubuntu 12.04?". Here's what worked for me (YMMV - depending what pre-existing software is installed on your system):

  1. Install the pre-requisites - for me these were a Fortran compiler, plus regular and MPI versions of the BLAS and LAPACK libraries, which I did as

    sudo apt-get install gfortran libatlas-dev liblapack-dev libscalapack-mpi-dev
  2. Unpack the software and change to the Obj directory

    tar xf siesta-4.1-b1.tar.gz
    cd siesta-4.1-b1/Obj
  3. As indicated in the Obj/README file, run the provided script to populate the directory,

  4. As suggested by the script, run the provided configure script to create a suitable arch.make file


    If you're still interested in the answers to your questions (2) and (3) at this point, you can look into the created arch.make file to see the automatically configured values

  5. Build the software

    At this point, you should be ready to make, however it appears that the configure step doesn't quite take care of everything since it fails with the message

    SIESTA: dc_lapack.a has been deprecated in favor of:
      COMP_LIBS += libsiestaLAPACK.a
    Please update your arch.make file accordingly...

    Although you could edit the arch.make file, IMHO it's simpler for such a small change to pass the variable definition on the make command line

    make "COMP_LIBS += libsiestaLAPACK.a"
  6. If the build completes successfully, you can run the provided tests by changing to the Obj/Tests directory and running make there

    cd Tests/

The tests may take considerably more time than the build.

  • Thanks for your help. but i think this would not install "parallel" siesta...!!! – P.A.M Oct 1 '16 at 17:23
  • is this installation enough to run the program on a 2 core with 8 cpus?! – P.A.M Oct 1 '16 at 17:38

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.