Comments (10)
@jithinjosepkl You wanted to check with the compiler team. What was the result of that? In the meantime, I found the following work-around which simply stubs out the unavailable CFG check function:
cfg_stub.c:
void __guard_check_icall_fptr(unsigned long ptr) { }
Modified compile commands (see first post):
gcc -c cfg_stub.c
gfortran -o example1 example.F90 cfg_stub.o -fno-range-check -lmsmpifec -lmsmpi -L"$MSMPI_LIB64" -I$MINGW_PREFIX/include
from microsoft-mpi.
Let me connect you with the compiler team and take this offline. I believe it is the MSVCRT itself.
Please do report your findings in this thread. @letmaik is not the only one affected by this issue.
from microsoft-mpi.
@letmaik - Yep, this is coming from the control flow guard. We added this as part of a security requirement from one of the partner s/w. Unfortunately we cannot disable it in official releases.
Is there a similar option for gfortran? I couldn't find one with a quick search, but you might know better on that. Other option will be to build MSMPI from this repo and use it.
from microsoft-mpi.
Just to clarify, if control flow guard (CFG) was enabled during compilation of a static library (here MSMPI), does that mean that dependent libraries or executables have to be compiled with CFG as well? Is that why you are asking whether gfortran has a similar option?
I'm also slightly surprised that I could use gcc without issues, which either means that gcc supports CFG and has it enabled by default, or that no CFG checks were inserted into the C msmpi static library, but rather only into the Fortran ones.
from microsoft-mpi.
I just checked with dumpbin, indeed msmpi.lib does not have the __guard_check_icall_fptr
symbol. Is this expected?
Regarding CFG in gcc/gfortran, there's no support for it as far as I see, but maybe it is enough to just link to additional system libraries (which?) from Windows to provide the unresolved symbol? That would mean the msmpi part is CFG-protected and the rest of the app is not, which would be fine in my case.
from microsoft-mpi.
Yeah, I also couldn't see the symbol using dumpbin. The symbol is not there in the final exe as well, but CFG shows up in the headers.
C160 DLL characteristics
High Entropy Virtual Addresses
Dynamic base
NX compatible
Control Flow Guard
Let me check with the compiler team to see what their recommendation is for gfortran.
from microsoft-mpi.
@letmaik - Compiler team confirmed that this procedure is inside the VC runtime, and that explains the linker errors with non vc runtime.
from microsoft-mpi.
Which runtime exactly? Do you have a DLL filename? MinGW links against MSVCRT.
from microsoft-mpi.
Let me connect you with the compiler team and take this offline. I believe it is the MSVCRT itself.
from microsoft-mpi.
I am also struggling this as I try to move from MS-MPI 8 to version 10. Is the cfg_stub.c
work around the only path forward?
from microsoft-mpi.
Related Issues (20)
- MS-MPI uninstaller doesn't delete msmpi.dll HOT 1
- [VERSION] Microsoft-MPI HOT 2
- WDK build dependency
- Conda Recipe? HOT 2
- How to generate MpiTraceEvents.h header? HOT 1
- Link warnings
- MS-MPI download links for 10.1.1/10.1.2 in Microsoft Download Center are dead HOT 3
- Tag 10.1.2 here HOT 3
- Request: Fortran mpi_f08 support HOT 1
- mpiexec missing in pacman msmpi HOT 1
- MS-MPI in multiple windows machines in a LAN network
- MS-MPI hangs in MPI_Finalize() inside DLL.
- Unable to open MPIHelloWorld project
- Don't call DebugBreak when generating error codes
- MPI_Isend() may send wrong data if its request has been freed
- MPI collective functions tuning parameters?
- Add ARM64 binaries
- This repo is missing important files HOT 13
- In the latest version of Microsoft MPI v10.1.2 there's no msmpi.dll HOT 1
- while install ms mpi.exe,i found i don't have include or lib file,what should i do HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-mpi.