Compile MPI and OpenMP programs with VS Code in Windows

Поділитися
Вставка
  • Опубліковано 18 вер 2024

КОМЕНТАРІ • 75

  • @bogdanmelciu1724
    @bogdanmelciu1724 Рік тому +2

    Extremely helpful, that you show the right version of the MinGW. Thanks a lot!

  • @danhelimunizsanchez897
    @danhelimunizsanchez897 Рік тому +1

    HELPFUL VIDEO! YOU SAVE MY LIFE!!!! GREATINGS FROM MEXICO!!!!!

  • @lalitasharma6687
    @lalitasharma6687 4 місяці тому +2

    I have quantum eapresso it shows error code
    mpi_abort was invoked on rank 0 in communicator mpi_comm_world with errorcode 1
    What this means I'm new in programming stuff
    How to fix it

    • @harshith_takkala
      @harshith_takkala  4 місяці тому

      I am sorry, not sure about that tool/software/OS, this video is for windows systems only, as i am downloading MSI packages from microsoft.

  • @Artemadminful
    @Artemadminful Рік тому +1

    Thank you very much! Everything was clear and interesting :-)

  • @SaifuddinNajmuddin-vi3kd
    @SaifuddinNajmuddin-vi3kd 4 місяці тому

    Helpful, Thank you so much. It worked.

  • @daiannysantanadeoliveira2155
    @daiannysantanadeoliveira2155 11 місяців тому

    Thank you very much! I was struggling to make this work but your video helped a lot!

  • @kanchanpathak9752
    @kanchanpathak9752 Рік тому +1

    one mistake I did was to install/extract pckg in one location(mostly default) and then moving the folders here and there. This might cause an error. Plus delete your older version of Mingw (usually it comes with codeblocks etc). So delete that first before installing this version.

  • @saisarwesh104
    @saisarwesh104 2 роки тому +1

    Very much helpful, thanks bro

  • @bleakmess
    @bleakmess 10 місяців тому

    Thanks for the video man.

  • @Sir_Breezy_
    @Sir_Breezy_ 6 місяців тому +1

    I encountered this error when I put
    ${workspaceFolder}/**
    ${MSMPI_INC}
    on the include path in C/C++ configuration in my project:
    Cannot find: {project_path}/${MSMPI_INC}
    Can you help me please? I've followed every step before.

    • @harshith_takkala
      @harshith_takkala  5 місяців тому

      I am not sure why {project_path} variable to the include path. If that still doesnt work, try hard coding the include path (put the value of MSMPI_INC directly in the configurations UI.
      Hope that helps, and sry for delay

  • @VenuVGR007
    @VenuVGR007 Рік тому +1

    Hi, thanks for your help. Wanted to know how to install a compiler like mpic++. I have g++ from mingw64 but understandably it gives an error mpi.h not defined when compiling.

    • @harshith_takkala
      @harshith_takkala  Рік тому +1

      We install MPI from the Microsoft website (.exe and .msi) as shown in video.

  • @VitorHugo-vq1uf
    @VitorHugo-vq1uf 11 місяців тому +1

    Thanks man

  • @trololollolololololl
    @trololollolololololl 28 днів тому

    great

  • @AimedX3
    @AimedX3 11 місяців тому +1

    I get the error mpi.h: no such file or directory
    Do you have any solution? and do i have to install OpenMP? i only want to use MPI

    • @harshith_takkala
      @harshith_takkala  11 місяців тому

      May he restart the whole process again. Or you might have missed any step in between. You can use only MPI. No need of openmp. You can go with that MSI tools shown in the video along with configurations

  • @nelsuh
    @nelsuh Рік тому +1

    spawn cmd.exe ENOENTBuild finished with error(s). i have this problem how to fix it

  • @ucvinh198
    @ucvinh198 11 місяців тому +1

    i did like video until 9:05, when i open my vs code i don't have mpi.c and openmp.c in order to continue. how can i fix it

    • @harshith_takkala
      @harshith_takkala  11 місяців тому

      Those both are files for explaination of video. You can find the github repo link in description.

  • @alexmercer7446
    @alexmercer7446 5 місяців тому

    Thank you man

  • @aqsafatima6782
    @aqsafatima6782 Рік тому +1

    I am still getting an error
    fatal error: mpi.h: No such file or directory
    #include
    please help me how to resolve it

    • @harshith_takkala
      @harshith_takkala  Рік тому

      1. Restart VS code
      2. Restart the whole procedure
      3. Update the extensions
      4. Check if any env are clashing
      5. Put the current using compiler in the highest priority by moving to the top of the list
      6. May be a "//" work instead of "/"
      I am not sure but try these

    • @TrollFace877
      @TrollFace877 Рік тому

      Some boat as you, I am missing

  • @ShilamRahulPrasad
    @ShilamRahulPrasad Рік тому +1

    I find it really helpful. Thank you, brother. Also, can you please upload the source code used in this video?

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Yes yes sure.
      I will definitely upload within a week from today.

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Pushed. You can visit the link in description.

  • @GoBliNGamingxD
    @GoBliNGamingxD 7 місяців тому

    It did not setup the msmpi environment variables for me automatically. What should i be doing?

    • @harshith_takkala
      @harshith_takkala  7 місяців тому

      They won't set automatically. You have to set them in system env variables and then have to use them in VS code C++ settings GUI.

  • @andykim4599
    @andykim4599 2 роки тому +1

    Your video is very helpfull. But, I got error messege “cannot find -lmsmpi”. How can I fix this?

    • @harshith_takkala
      @harshith_takkala  2 роки тому

      I think you have made capital "i" instead of small "L". Please check it
      If not, then may include path in VS code is not properly set

  • @shreyapatil156
    @shreyapatil156 8 місяців тому +1

    Cannot find: d:/MPI/${MSMPI_INC}
    This is the error I am getting, it'll be really helpful if you resolved it

    • @harshith_takkala
      @harshith_takkala  8 місяців тому

      (MSMPI_INC) variable must be an absolute path to MPI include directory and you have to use the variable directly in VS Code settings rather than like this. Remove D:/MPI/ from the path

  • @vijaykumarb9226
    @vijaykumarb9226 11 місяців тому +1

    I am getting an error of no file like MPI.h

    • @harshith_takkala
      @harshith_takkala  11 місяців тому

      There might be some glitches in the process you followed, may be please restart the whole process. Ensure that MPI path is set in both env variables.

  • @rajatkokane5750
    @rajatkokane5750 Рік тому +1

    I'm getting an error called environment variable msmpi not defined in cmd when I typed set msmpi. I did everything that you said. Even the path is correct. How can I make it work. I'm on Windows 11 Home.

    • @harshith_takkala
      @harshith_takkala  Рік тому +1

      Sorry, am not sure.

    • @harshith_takkala
      @harshith_takkala  Рік тому

      May be check in both user and system env variables

    • @rajatkokane5750
      @rajatkokane5750 Рік тому +1

      What eco mode does is it disables the dedicated gpu. I'm guessing that's what caused the issue. I switched back to GPU on mode and it started working.
      And yes, it was showing up in both user and system env variables.

    • @harshith_takkala
      @harshith_takkala  Рік тому +1

      @@rajatkokane5750 oh, but in my case there's no requirement of GPU for this setup. Anyways, good to hear.

  • @hasirhamza4070
    @hasirhamza4070 Рік тому +3

    i do the same way as you said but i got an error while include mpi.h file . even the suggestion are shown inside the main function . but while click on Run Build Task it show me this error "cpp:1:10: fatal error: 'mpi.h' file not found"

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Have you modified the compilation command, which is as "GCC " with all other flags and arguments in the json file ?

    • @but_t3rsforever471
      @but_t3rsforever471 Рік тому +2

      I have the same problem, did you fix that?

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Or may be env is not set properly

    • @harshith_takkala
      @harshith_takkala  Рік тому

      If still the same case, please restart the whole procedure leaving the installation, if poasible

    • @hasirhamza4070
      @hasirhamza4070 Рік тому +1

      @@harshith_takkala i guesssed so . thanks this video really helpful.

  • @salwasaad752
    @salwasaad752 Рік тому +1

    PLEASE :
    How to run openMP and MPI in C++ code in cmd promit?

    • @harshith_takkala
      @harshith_takkala  Рік тому +1

      You can actually make use of the reference link I referred to run in cmd with flags for both MPI and openMP

  • @govardhandevil322
    @govardhandevil322 Рік тому +1

    How to run openMP code in cmd promit

  • @bindu6826
    @bindu6826 Рік тому +1

    gcc.exe: error: workshare.c: No such file or directory
    gcc.exe: fatal error: no input files I AM GETTING THIS ERROR IN TERMINAL

    • @harshith_takkala
      @harshith_takkala  Рік тому

      May be the working directory is not the same as activated directory in terminal.

    • @bindu6826
      @bindu6826 Рік тому +1

      @@harshith_takkala yup resolved. Thanks!

  • @andresestevez2701
    @andresestevez2701 Рік тому +2

    maaaaaaaaaaaaaaaaaaaestro.... por q no hay mas españoles que indiquen estas cositas pues...........

  • @govardhandevil322
    @govardhandevil322 Рік тому +1

    Single core run multiple threads and single core single thread send any Codeing

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Open MP for multi thread programming. A normal program in C is a program in single thread. You can also use pragma omp headers to created single threaded programs

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Most of the programs attached in github are both single and multi threaded. I just made them for showing the time taken by both of them

  • @yudhi.paramartha
    @yudhi.paramartha Рік тому +1

    Nice tutorial. Can I have the sample code used in this video?

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Yes definitely! Sorry for being late. I will update description within a week.

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Pushed. You can visit the link in description.

    • @govardhandevil322
      @govardhandevil322 Рік тому

      Iwant openMP nodes

    • @harshith_takkala
      @harshith_takkala  Рік тому

      @@govardhandevil322 as of my knowledge, we have nodes in MPI. These are controlled by MPI commands like MPI_scatter and gather, etc..

  • @shreyamatade409
    @shreyamatade409 Рік тому +1

    It still says mpi.h not found

    • @harshith_takkala
      @harshith_takkala  Рік тому

      Just restart the process if possible, there may be some glitches. Check for path (user and system)

    • @RoseNoir-i7r
      @RoseNoir-i7r 2 місяці тому

      did you find the solution @shreyamatade409? please tell

    • @shreyamatade409
      @shreyamatade409 2 місяці тому

      @@RoseNoir-i7r no

    • @RoseNoir-i7r
      @RoseNoir-i7r 2 місяці тому

      @@shreyamatade409 tnx mate :(