Coder Social home page Coder Social logo

cannot find lgrid2grid about cosma HOT 11 CLOSED

eth-cscs avatar eth-cscs commented on May 22, 2024
cannot find lgrid2grid

from cosma.

Comments (11)

kabicm avatar kabicm commented on May 22, 2024

Dear Yi, thanks for spotting this! You are totally right, grid2grid was changed to COSTA and this will be corrected in the README soon, we are preparing a new release for both COSTA and COSMA.

In your case, you should link to libcosta_scalapack.a, because of this line:

costa_scalapack

Let me know if it works for you!

from cosma.

kabicm avatar kabicm commented on May 22, 2024

In general, if you use pure cosma library (without pxgemm wrappers) then you link to costa. If you use cosma_pxgemm then you link to costa_scalapack. Pay attention that costa_scalapack overwrites scalapack's pxtran (transpose) and pxgemr2d (layout transformation) functions. So, by using cosma_pxgemm you are implicitly also using our implementations of pxtran and pxgemr2d provided by COSTA. We do this on purpose, as COSTA offers great speedups.

from cosma.

yaoyi92 avatar yaoyi92 commented on May 22, 2024

Dear Marko,

Thank you so much.

So, I end up using these commands to compile a Fortran test file. It seems the -qopenmp and -lstdc++ are necessary here. Is this the correct way to do the linking?

mpiifort -O3 -g -traceback -ip -fp-model precise -xCORE-AVX2 -qopenmp -c Scalapack.f90
mpiifort -qopenmp -lstdc++ Scalapack.o -L/nas/longleaf/home/yiy/softwares-dogwood/cosma/COSMA/install_2/lib64 -lcosma_pxgemm -lcosma -lcosta_scalapack -lcosta -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_sequential -lmkl_core

The test file is

Scalapack.f90

program test
  call pdgemm
end program

from cosma.

yaoyi92 avatar yaoyi92 commented on May 22, 2024

Dear Marko,

However, if I tried this test file

Scalapack.f90

program test
  call pdgemr2d
end program

It gave me

/nas/longleaf/home/yiy/softwares-dogwood/cosma/COSMA/install_2/lib64/libcosta_scalapack.a(pxgemr2d.cpp.o): In function `pigemr2d':
pxgemr2d.cpp:(.text+0x4d): undefined reference to `void costa::pxgemr2d<int>(int, int, int const*, int, int, int const*, int*, int, int, int const*, int)'
/nas/longleaf/home/yiy/softwares-dogwood/cosma/COSMA/install_2/lib64/libcosta_scalapack.a(pxgemr2d.cpp.o): In function `pigemr2d_':
pxgemr2d.cpp:(.text+0x3ad): undefined reference to `void costa::pxgemr2d<int>(int, int, int const*, int, int, int const*, int*, int, int, int const*, int)'
/nas/longleaf/home/yiy/softwares-dogwood/cosma/COSMA/install_2/lib64/libcosta_scalapack.a(pxgemr2d.cpp.o): In function `pigemr2d__':
pxgemr2d.cpp:(.text+0x58d): undefined reference to `void costa::pxgemr2d<int>(int, int, int const*, int, int, int const*, int*, int, int, int const*, int)'
/nas/longleaf/home/yiy/softwares-dogwood/cosma/COSMA/install_2/lib64/libcosta_scalapack.a(pxgemr2d.cpp.o): In function `PIGEMR2D':
pxgemr2d.cpp:(.text+0x76d): undefined reference to `void costa::pxgemr2d<int>(int, int, int const*, int, int, int const*, int*, int, int, int const*, int)'

Am I missing anything?

from cosma.

kabicm avatar kabicm commented on May 22, 2024

Dear Yi, thanks for checking. The latter caused by COSMA using an outdated version of COSTA. I have just updated the COSTA submodule in COSMA. Can you git clone recursively again the whole COSMA repo and try again? The latter should now be fixed.

from cosma.

kabicm avatar kabicm commented on May 22, 2024

Sorry, I would need some more time, I have to adapt few more things in COSMA to the latest COSTA version before it can work.

from cosma.

yaoyi92 avatar yaoyi92 commented on May 22, 2024

I see. No worry. Thank you for letting me know.

from cosma.

kabicm avatar kabicm commented on May 22, 2024

The latest commit should fix the issues with the latest version of COSTA. Since the COSTA library was also modified, it would be best to get a fresh new git clone of COSMA.

To answer your question regarding the OpenMP: you are right, we require it. However, most user codes already have OpenMP as a dependency (especially if they use a multithreaded versions of scalapack/lapack/blas). Your way of linking seems correct to me.

Let me know if this works for you and if you have any other issues!

from cosma.

kabicm avatar kabicm commented on May 22, 2024

Hi Yi (@yaoyi92), i just wanted to follow up on my previous comment: does it work for you now?

from cosma.

yaoyi92 avatar yaoyi92 commented on May 22, 2024

Yes, it works! Thank you so much!

from cosma.

kabicm avatar kabicm commented on May 22, 2024

Great, thanks for the feedback, I am glad it works now! The README will be improved soon, so I will now close this issue.

from cosma.

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.