[Pw_forum] use doual core

Huiqun Zhou hqzhou at nju.edu.cn
Mon Dec 11 03:47:54 CET 2006


Amin,

In addition to Axel's suggustions, you may need to add -D__MPI option too.

Huiqun 

----- Original Message ----- 
  From: Amin Babazadeh 
  To: pw_forum at pwscf.org 
  Sent: Sunday, December 10, 2006 10:04 PM
  Subject: Re: [Pw_forum] use doual core


  Dear friends
  I am so sorry for this but i couldn't solve my problem.
  i installed lam 7.1.2 in my computer and i didn't change the installation PATH.
  after that i configure the espresso.this file has been made.
  # make.sys.  Generated from make.sys.in by configure.

  # compilation rules

  .SUFFIXES :
  .SUFFIXES : .o .c .f .f90

  # most fortran compilers can directly preprocess c-like directives: use
  #  $(MPIF90) $(F90FLAGS) -c $<
  # if explicit preprocessing by the C preprocessor is needed, use:
  #  $(CPP) $(CPPFLAGS) $< -o $*.F90 
  # $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o
  # remember the tabulator in the first column !!!

  .f90.o:
   $(MPIF90) $(F90FLAGS) -c $<

  # .f.o and .c.o: do not modify

  .f.o:
   $(F77) $(FFLAGS) -c $<

  .c.o:
   $(CC) $(CFLAGS)  -c $<


  # DFLAGS  = precompilation options (possible arguments to -D and -U)
  #           used by the C compiler and preprocessor
  # FDFLAGS = as DFLAGS, for the f90 compiler
  # See include/defs.h.README for a list of options and their meaning 
  # With the exception of IBM xlf, FDFLAGS = $(DFLAGS)
  # For IBM xlf, FDFLAGS is the same as DFLAGS with separating commas 

  DFLAGS         =  -D__INTEL -D__FFTW -D__USE_INTERNAL_FFTW
  FDFLAGS        = $(DFLAGS)

  # IFLAGS = how to locate directories where files to be included are
  # In most cases, IFLAGS = -I../include
  # If loading an external FFTW library, add the location of FFTW include files

  IFLAGS         = -I../include 

  # MODFLAGS = flag used by f90 compiler to locate modules
  # You need to search for modules in ./, in ../iotk/src, in ../Modules
  # Some applications also neeed modules in ../PW, ../PH, ../CPV

  MODFLAGS       = -I./  -I../Modules  -I../iotk/src \
                   -I../PW  -I../PH  -I../CPV

  # Compilers: fortran-90, fortran-77, C
  # If a parallel compilation is desired, MPIF90 should be a fortran-90 
  # compiler that produces executables for parallel execution using MPI
  # (such as for instance mpif90, mpf90, mpxlf90,...); 
  # otherwise, an ordinary fortran-90 compiler (f90, g95, xlf90, ifort,...)
  # If you have a parallel machine but no suitable candidate for MPIF90,
  # try to specify the directory containing "mpif.h" in IFLAGS 
  # and to specify the location of MPI libraries in MPI_LIBS

  MPIF90         = ifort
  #F90           = ifort
  CC             = cc
  F77            = ifort

  # C preprocessor and preprocessing flags - for explicit preprocessing, 
  # if needed (see the compilation rules above)
  # preprocessing flags must include DFLAGS and IFLAGS

  CPP            = cpp
  CPPFLAGS       = -P -traditional $(DFLAGS) $(IFLAGS)

  # compiler flags: C, F90, F77
  # C flags must include DFLAGS and IFLAGS
  # F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax

  CFLAGS         = -O3 $(DFLAGS) $(IFLAGS)
  F90FLAGS       = $(FFLAGS) -nomodule -fpp $(FDFLAGS) $(IFLAGS) $(MODFLAGS)
  FFLAGS         = -O2 -tpp6 -assume byterecl

  # compiler flags without optimization for fortran-77
  # the latter is NEEDED to properly compile dlamch.f, used by lapack

  FFLAGS_NOOPT   = -O0 -assume byterecl

  # Linker and linker-specific flags (if any)
  # Typically LD coincides with F90 or MPIF90 - not actually used

  # LD             = ifort
  LDFLAGS        = 

  # External Libraries (if any) : blas, lapack, fft, MPI

  # If you have nothing better, use the local copy : ../flib/blas.a

  BLAS_LIBS      = ../flib/blas.a

  # The following lapack libraries will be available in flib/ :
  # ../flib/lapack.a : contains all needed routines
  # ../flib/lapack_atlas.a: only routines not present in the Atlas library
  # For IBM machines with essl: load essl BEFORE lapack ! 
  # remember that LAPACK_LIBS precedes BLAS_LIBS in loading order

  LAPACK_LIBS    = ../flib/lapack.a

  # nothing needed here if the the internal copy of FFTW is compiled
  # (needs -D__FFTW -D__USE_INTERNAL_FFTW in DFLAGS)

  FFT_LIBS       = 

  # For parallel execution, the correct path to MPI libraries must
  # be specified in MPI_LIBS (except for IBM if you use mpxlf)

  MPI_LIBS       = 

  # IBM-specific: MASS libraries, if available and if -D__MASS is defined in FDFLAGS

  MASS_LIBS      = 

  # pgplot libraries (used by some post-processing tools)

  PGPLOT_LIBS    = 

  # ar command and flags - for most architectures: AR = ar, ARFLAGS = ruv
  # ARFLAGS_DYNAMICS is used in iotk to produce a dynamical library,
  # for Mac OS-X with PowerPC and xlf compiler. In all other cases
  # ARFLAGS_DYNAMICS = $(ARFLAGS) 

  AR             = ar
  ARFLAGS        = ruv
  ARFLAGS_DYNAMIC= ruv

  # ranlib command. If ranlib is not needed (it isn't in most cases) use
  # RANLIB = echo

  RANLIB         = ranlib

  # all internal and external libraries - do not modify

  LIBOBJS        = ../flib/ptools.a ../flib/flib.a ../clib/clib.a ../iotk/src/libiotk.a
  LIBS           = $(LAPACK_LIBS) $(BLAS_LIBS) $(FFT_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(PGPLOT_LIBS)

  i saw that for mpif90 and F77, ifort compiler want to use so i change all of them to mpif77. and i compiled it.by doing that i could use both of my computer's cpu but this error was hapen at the end of my runs. 

  It seems that [at least] one of the processes that was started with
  mpirun did not invoke MPI_INIT before quitting (it is possible that
  more than one process did not invoke MPI_INIT -- mpirun was only
  notified of the first one, which was on node n0). 

  mpirun can *only* be used with MPI programs (i.e., programs that
  invoke MPI_INIT and MPI_FINALIZE).  You can use the "lamexec" program
  to run non-MPI programs over the lambooted nodes.
  ----------------------------------------------------------------------------- 
  forrtl: error (78): process killed (SIGTERM)
  mpirun failed with exit status 252



  my computer run both of cpus but he didn't share kpoint he only do the same job with both cpus.
  please help me i really confused why it happended.
  sincerely yours


   
  On 12/2/06, Amin Babazadeh <babazade at gmail.com> wrote: 
    Dear Dr.Zhou and kohlmeyer 
    Thanks a lot for your helps. i will try to do your recommendation.
    Sincerely yours 
    amin 



    On 12/2/06, Huiqun Zhou < hqzhou at nju.edu.cn> wrote: 
      Amin,

      Sorry, I was out of the town and had no access to my e-mail.

      1. You can use anyone of MPI implemetations. But I recommend Intel MPI-2 because it's an
        installable binary, it saves you as a beginner a lot of time. If you cannot get a copy of that, 
        use OpenMPI, a successor of LAM/MPI.
      2. Basically, when you recompile MPI, you can add --prefix=/your/favourite/place to configure
      3. You need C compiler to compile MPI. You need gcc too. I compiled MPI with icc + ifort.

      Good luck!

      Huiqun 
        
        ----- Original Message ----- 
        From: Amin Babazadeh 
        To: pw_forum at pwscf.org 
        Sent: Thursday, November 30, 2006 3:17 PM
        Subject: Re: [Pw_forum] use doual core

         
        Thanks a lot for your answers.but until yet i couldn't solve my problem.I confused about mpi. there are three kind of mpi in the Internet (lam/mpi,openmpi,mpich) i don't know which one of them i should install.
        about making the environment i should say that i am beginner in using Linux so i use the ./configure commend and i didn't change any path because i don't know how i should do it.
        i will appreciate if answer my question?
        1-which mpi do i need for my job?
        2-how could i change the path?
        3-is ifort compiler enough for installing mpi package?
        Thanks a lot
         
        On 11/27/06, Huiqun Zhou <hqzhou at nju.edu.cn> wrote: 
          Have you set up you environment for using one the mpi libraries you installed in .bashrc?
          For example, for openmpi you need to set following in your .bashrc if you are using bash
          as your shell:
          ...
          export PATH=/opt/openmpi/bin:$PATH
          export LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH
          ...

          Note: you need to replace /opt/openmpi with the path of your installation.

          Huiqun Zhou

            ----- Original Message ----- 
            From: Amin Babazadeh 
            To: pw_forum at pwscf.org 
            Sent: Sunday, November 26, 2006 6:11 PM
            Subject: Re: [Pw_forum] use doual core

             
            Dear Dr.Kohlmeyer
            Thanks a lot for your help.I did what you said.i installed 
            fftw-3.1.2.tar
            lam-7.1.2.tar
            mpich2-1.0.4p1.tar
            openmpi-1.1.2.tar
             on fedora core 5 and after that i configure the espresso but this error was written

            WARNING: the following problems were detected:
             unsupported C/Fortran compilers combination:
             CC=mpicc, F77=mpif77, F90=mpif90

            you may not be able to compile this program.
            i don't know what this problem means.would you please help me.
            Thanks a lot


             
            On 11/22/06, Axel Kohlmeyer <akohlmey at cmm.chem.upenn.edu > wrote: 
              On 11/22/06, Amin Babazadeh < babazade at gmail.com> wrote:
              > dear users 
              > I use a computer with a dual core CPU.but my problem is that when i run a
              > program only one of the CPU work but i like to share the work (solving k
              > points) between cpus. 
              > I think that i should install the parallel pwscf but when i run the 
              > ./configure only single pwscf installed.

              you have to install an MPI package (e.g. LAM/MPI, OpenMPI, MPICH) 
              first and then configure/compile quantum espresso with parallel support 
              as explained in the provided installation instructions. 

              please make sure that your MPI package is compatible with or compiled
              for the fortran compiler you want to use to compiled quantum espresso with. 
              precompiled packages may be compiled for a different compiler and thus 
              need special flags or environment variables set to use the compiler of
              your choice.

              axel.

              > would you please tell me or give me a document that solve my problem. 
              >
              >
              > --
              > AMIN 


              --
              =======================================================================
              Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
              Center for Molecular Modeling   --   University of Pennsylvania 
              Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
              tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425 
              ======================================================================= 
              If you make something idiot-proof, the universe creates a better idiot.
              _______________________________________________
              Pw_forum mailing list 
              Pw_forum at pwscf.org
              http://www.democritos.it/mailman/listinfo/pw_forum




            -- 
            AMIN 



        -- 
        AMIN 




    -- 
    AMIN 



  -- 
  AMIN 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20061211/fbcc9873/attachment.html>


More information about the users mailing list