Those who are facing the issue "sal.h dependency not found" or something like that, uninstall the MinGW compiler and follow this video - ua-cam.com/video/_-O94qsnOLk/v-deo.html Program used in video - github.com/sandy2802/MPI_C/blob/main/first.c
I followed another guide and was having trouble figuring out the error at the end. Thank you for explaining that thing with directory names. After a few hours I am finally up and running!
On powershell on VS Code, the following command worked for me with default installation paths (the ones with spaces): *gcc file.c -I $env:MSMPI_INC.TrimEnd('\') -L $env:MSMPI_LIB64.TrimEnd('\') -lmsmpi* Or alternatively *gcc file.c -I $env:MSMPI_INC\ -L $env:MSMPI_LIB64\ -lmsmpi* The trick has to do with how the paths in the environment variables end with an escape character (the '\'), that's what actually breaks the command, not the spaces in the path (on VS Code's powershell terminal). You can either trim it like in the first command, or manually add another escape character at the end of the environment variable. Thank you for the video though!
And on cmd this is another way (instead of trimming the '\' I just add another '\' to escape it before the quotes, quotes which are necessary to get around spaces in the path...): *gcc file.c -I "%MSMPI_INC%\" -L "%MSMPI_LIB64%\" -lmsmpi*
thanks for the note, changing the tasks.json arguments like that fixed it for me. ``` "args": [ "-fdiagnostics-color=always", "-g", "${file}", "-I", "C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Include", "-L", "C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Lib\\x64", "-lmsmpi", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], ```
@SKMTutorialsHub thank you a lot! This is very useful, and I also like the background music. Btw I have a question. I see that we are able to use mpiexec to execute the programs because mpiexec.exe is in bin. But I dont want to execute, but only compile the programs with mpicc, however I do not see any mpicc.exe. So how do we just compile the files using mpicc? Looking forward to your answer.
I'm following the same steps but after clicking edit "icludePath" setting , it tells me to open a folder first to configure so do i need to create a folder and create the c file inside it then continue the steps or am i missing something else? also if i create a folder with the file and continue following the steps it doesn't work so I'm really confused
I have error, the library mpi is working when call all function mpi but I face this error when runing. Test.c:3:10: fatal error: mpi.h: No such file or directory 3 | #include | ^~~~~~~ compilation terminated.
Hi, I followed all the instructions but when I tried to run the code it gave me this error "first.c:2:10: fatal error: mpi.h: No such file or directory 2 | #include "mpi.h" " how can I fix this??
Only from the error I am not sure what the problem is. You can cross check the folders where MPI is installed to check if the path and all are correct.
Yes actually one of my friends also faced the same problem. The Mingw installation process has been changed. Now you have to install it through the software called Msys2.
I remove the mpi files and install those again, but I get the error that ms mpi installation failed with error code 50. a version of mpi that is the same or newer is already installed. So how do I solve this problem, as I install the mpi in the default location at first, so I need to install again.@@SKMTutorialsHub
I remove the mpi files and install those again, but I get the error that ms mpi installation failed with error code 50. a version of mpi that is the same or newer is already installed. So how do I solve this problem, as I install the mpi in the default location at first, so I need to install again.
@@SKMTutorialsHub even if i'm not printing anything, it shows me Rank: then random num of the number i typed. For example: $ mpiexec -n 3 hello Rank: 0/3 Rank: 1/3 Rank: 2/3 $ mpiexec -n 4 hello Rank: 0/4 Rank: 3/4 Rank: 1/4 Rank: 2/4
This is untrue. I have done installing everything from zero thanks to his instructions. There were many times I had to reinstall/uninstall other apps like mingw again, but it did work. I also had all types of error that are mentioned in this chat, but @SKMTutotialsHub did offer related videos to solve the problems.
Those who are facing the issue "sal.h dependency not found" or something like that, uninstall the MinGW compiler and follow this video - ua-cam.com/video/_-O94qsnOLk/v-deo.html
Program used in video - github.com/sandy2802/MPI_C/blob/main/first.c
I'm still getting the same sal.h error after installing msys2
I recently installed it on my other laptop and I had no errors. Maybe you try uninstalling and do a fresh install.
I followed another guide and was having trouble figuring out the error at the end. Thank you for explaining that thing with directory names. After a few hours I am finally up and running!
You're most welcome ✌️
On powershell on VS Code, the following command worked for me with default installation paths (the ones with spaces):
*gcc file.c -I $env:MSMPI_INC.TrimEnd('\') -L $env:MSMPI_LIB64.TrimEnd('\') -lmsmpi*
Or alternatively
*gcc file.c -I $env:MSMPI_INC\ -L $env:MSMPI_LIB64\ -lmsmpi*
The trick has to do with how the paths in the environment variables end with an escape character (the '\'), that's what actually breaks the command, not the spaces in the path (on VS Code's powershell terminal). You can either trim it like in the first command, or manually add another escape character at the end of the environment variable. Thank you for the video though!
And on cmd this is another way (instead of trimming the '\' I just add another '\' to escape it before the quotes, quotes which are necessary to get around spaces in the path...):
*gcc file.c -I "%MSMPI_INC%\" -L "%MSMPI_LIB64%\" -lmsmpi*
Thanks for the information 👍
thanks for the note, changing the tasks.json arguments like that fixed it for me.
```
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-I",
"C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Include",
"-L",
"C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Lib\\x64",
"-lmsmpi",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
```
Hello, I just wanted to thank you for this tutorial, it worked perfectly for me!
You're most welcome 👍
this is very helpful , thank you so much. It would be even better if it was without the background music though. Thank you
If when you execute set msmpi the variables don't appear, you can restart your computer. It worked for me. In case it's useful for someone.
Thanks for the information 👍
@SKMTutorialsHub thank you a lot! This is very useful, and I also like the background music. Btw I have a question. I see that we are able to use mpiexec to execute the programs because mpiexec.exe is in bin. But I dont want to execute, but only compile the programs with mpicc, however I do not see any mpicc.exe. So how do we just compile the files using mpicc? Looking forward to your answer.
Oh i think i got it. Is mpiexec for execute mpi c.files for non-root users and mpicc for root users?
mpiexec is for execution and compilation is done when we are clicking run build task.
Why using sad music :) ur doing great job right here!
merci pour la video ellem'a bien aider
je vous en prie
thanks very much!!
You're most welcome...
I'm following the same steps but after clicking edit "icludePath" setting , it tells me to open a folder first to configure so do i need to create a folder and create the c file inside it then continue the steps or am i missing something else?
also if i create a folder with the file and continue following the steps it doesn't work so I'm really confused
Create a folder for MPI programs first then open vs code just like in the video "open with vs code"
@@SKMTutorialsHub thank you very much
Most welcome 😄
not worked, also deleted and can not install because of "again error code 50. a version of mpi that is the same or newer is already installed."
You can use an uninstaller software like revo uninstaller to uninstall or remove the leftover files of mpi
I have error, the library mpi is working when call all function mpi but I face this error when runing.
Test.c:3:10: fatal error: mpi.h: No such file or directory
3 | #include
| ^~~~~~~
compilation terminated.
Cmd doesn’t print “MSMPI_INC-D”. Other lines print. Can u help, please?
Make sure you downloaded all the setup files and installed them
hi
how can solve this error :cannot open source file "sal.h" (dependency of "mpi.h")
Yeah sure. That's very easy to fix. Just read the pinned comment first. Try that. Your problem will be solved.
Hi, I followed all the instructions but when I tried to run the code it gave me this error "first.c:2:10: fatal error: mpi.h: No such file or directory 2 | #include "mpi.h" " how can I fix this??
Only from the error I am not sure what the problem is. You can cross check the folders where MPI is installed to check if the path and all are correct.
Thank you for responding
"set msmpi" command gives blank output.
Did you follow the previous steps of installation correctly?
I'm facing a issuse as sal.h depency not found in mpi.h
do u have a solution for this?
Yes actually one of my friends also faced the same problem. The Mingw installation process has been changed. Now you have to install it through the software called Msys2.
First reinstall Mingw through msys2 then the remaining process is same.
If you face any problem you can ask in my Instagram
@@SKMTutorialsHub thank u , it worked
You're most welcome
How do I change from the default path if its already installed
Default path of mpi you are asking?
You have to uninstall and reinstall the two setups.
I remove the mpi files and install those again, but I get the error that ms mpi installation failed with error code 50. a version of mpi that is the same or newer is already installed. So how do I solve this problem, as I install the mpi in the default location at first, so I need to install again.@@SKMTutorialsHub
Cannot Find : /${MSMPI_INC} in C Configuration
Is it giving any error for this?
I remove the mpi files and install those again, but I get the error that ms mpi installation failed with error code 50. a version of mpi that is the same or newer is already installed. So how do I solve this problem, as I install the mpi in the default location at first, so I need to install again.
Use revo uninstaller to remove all the files of ms mpi
It shows error ------ system cannot find file specified
When the error is showing?
I followed all instructions, still
#include not found
Recheck the folders where mpi is installed
I only have c drive.
I installed MPI in a desktop folder called Microsoft MPI
@@SKMTutorialsHub
When you run the set msmpi command did it give the required output
Yes. All five lines are outputting correctly.@@SKMTutorialsHub
When I run the program like that: mpiexec -n 4 hello, it shows
Rank: 0/4
Rank: 1/4
Rank: 2/4
Rank: 3/4
And in any variation of code. What is wrong?
Check the line of printing
It may be because of the printing line? But it's your code. You used it in the video
Okay so you have used the code of the video. Still go through the printing lines
@@SKMTutorialsHub even if i'm not printing anything, it shows me Rank: then random num of the number i typed. For example:
$ mpiexec -n 3 hello
Rank: 0/3
Rank: 1/3
Rank: 2/3
$ mpiexec -n 4 hello
Rank: 0/4
Rank: 3/4
Rank: 1/4
Rank: 2/4
Try a different program and see if the problem exists.
music is soooo noisy but thanxx
Não funcionou
What's the error?
It's not working. Totally waste of time
What's the error?
@@SKMTutorialsHub cannot open source file "sal.h" (dependency of "mpi.h") after reinstalling mingw it's even the same problem
See the comments of this video, you will find the solution in one of the comments. Try that and let me know if it works.
Check sal.h header file is present in you base MINGW installation /include folder@@RahulSharma-yr4gu
This is untrue. I have done installing everything from zero thanks to his instructions. There were many times I had to reinstall/uninstall other apps like mingw again, but it did work. I also had all types of error that are mentioned in this chat, but @SKMTutotialsHub did offer related videos to solve the problems.
cannot open source file "sal.h" (dependency of "mpi.h")
Can you help?
See the other comments. You will find the solution. If it doesn't work then tell me again.
@@SKMTutorialsHub
What PATH should I specify in Environment variable?
D:\MSYS2\mingw64\bin, the bin folder empty.
Check the folder msys2/ucrt64/bin