Git Product home page Git Product logo

Comments (7)

mpip avatar mpip commented on August 12, 2024

from pfft.

ashwinvis avatar ashwinvis commented on August 12, 2024

the log tells that linking with the MPI libs did not work. Configure tried the linker flag -lmpi and -lmpich (not relevant for openmpi). For more details have a look into config.log and search for the failed linker job.

config.log has tried both.

What flags do you use on your machine to compile and link a simple test MPI program?

I hope this helps:

sandbox/mpi-test » mpicc --showme
gcc -pthread -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -L/usr/lib/openmpi -lmpi
sandbox/mpi-test » mpif90 --showme
/usr/bin/gfortran -I/usr/include -pthread -I/usr/lib/openmpi -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -L/usr/lib/openmpi -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
sandbox/mpi-test » mpicc --showme:link
-pthread -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -L/usr/lib/openmpi -lmpi
sandbox/mpi-test » mpif90 --showme:link
-pthread -I/usr/lib/openmpi -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -L/usr/lib/openmpi -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

from pfft.

ashwinvis avatar ashwinvis commented on August 12, 2024

Configure seems to work when I do either of the following.

./configure  .... LDFLAGS="-L/usr/lib/openmpi"
./configure ... LDFLAGS="$(mpicc -showme:link)"

Is it possible to automate this?

from pfft.

mpip avatar mpip commented on August 12, 2024

from pfft.

mpip avatar mpip commented on August 12, 2024

from pfft.

ashwinvis avatar ashwinvis commented on August 12, 2024

The config.log when it fails: config.log

About compiling I normally just use mpicc or mpif90. If you want something more explicit:

sandbox/mpi-test » gcc -pthread -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,--enable-new-dtags -L/usr/lib/openmpi -lmpi hello_mpi.c 
sandbox/mpi-test » mpirun -np 2 ./a.out 

HELLO_MPI - Master process:
  C/MPI version
  An MPI example program.

  The number of processes is 2.

  Process 0 says 'Hello, world!'
  Elapsed wall clock time = 0.000032 seconds.
  Process 1 says 'Hello, world!'

HELLO_MPI - Master process:
  Normal end of execution: 'Goodbye, world!'

15 March 2018 12:11:36 PM

from pfft.

ashwinvis avatar ashwinvis commented on August 12, 2024

On most machines the MPI lib path is part of the global search paths. If not you have to add it to LD_FLAGS like you did.

Got it. However a more portable solution would have been interesting. Thank you for your time. Closing this issue.

from pfft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.