Find the answer to your Linux question:
Results 1 to 2 of 2
Dear Linux experts: I am trying to compile a molecular dynamics solver called lammps wiht mpich2. I have already installed mpich2 from software.opensuse.org. In the Makefile, it has has lines: ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    96

    how to link mpi?

    Dear Linux experts:

    I am trying to compile a molecular dynamics solver called lammps wiht mpich2. I have already installed mpich2 from software.opensuse.org.

    In the Makefile, it has has lines:

    CC = g++
    CCFLAGS = -O -g -I../../src -DMPICH_IGNORE_CXX_SEEK
    ARCHIVE = ar
    ARCHFLAG = -rc
    DEPFLAGS = -M
    LINK = g++
    LINKFLAGS = -O
    USRLIB =
    SYSLIB =
    --------------------------------
    however, when I tried to compile (make -f Makefile.g++), I got the following errors:
    peiying@hillsdale:~/lammps/lammps-23Jan10/lib/atc> make -f Makefile.g++
    g++ -O -g -I../../src -DMPICH_IGNORE_CXX_SEEK -c ATC_HardyKernel.cpp
    In file included from ATC_HardyKernel.h:5,
    from ATC_HardyKernel.cpp:1:
    LammpsInterface.h:6:17: error: mpi.h: No such file or directory
    In file included from LammpsInterface.h:7,
    from ATC_HardyKernel.h:5,
    from ATC_HardyKernel.cpp:1:
    ../../src/lammps.h:41: error: ‘MPI_Comm’ does not name a type
    ../../src/lammps.h:46: error: ‘MPI_Comm’ has not been declared
    In file included from ATC_HardyKernel.h:5,
    from ATC_HardyKernel.cpp:1:
    LammpsInterface.h:63: error: ‘MPI_Comm’ does not name a type
    LammpsInterface.h: In member function ‘void ATC::LammpsInterface::set_lammps(LAMMPS_NS::LAMMPS *)’:
    LammpsInterface.h:58: error: ‘class LAMMPS_NS::LAMMPS’ has no member named ‘world’
    LammpsInterface.h:58: error: ‘MPI_Comm_rank’ was not declared in this scope
    ----------------------------

    what do I need to do so that the compiler knows how to link mpich2?

    Thanks!

    Pei

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Looks like you are missing a header file. mpi.h

    I think this may be it

    http://cobweb.ecn.purdue.edu/~ee563/mpi.h

    But you should really try to get help from the programmers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...