-
Notifications
You must be signed in to change notification settings - Fork 187
Memory mapped features #765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you @PierUgit for this suggestion. |
It's definitely OS-dependent, and even worse maybe compiler-dependent. I assume that on Posix systems all compilers will provide the Generally speaking, how are managed the OS dependent features in stdlib? Are there any in the existing code base? Are there available macros? |
Me neither...
Currently only stdlib_system is compiled depending on the OS (with a CPP macro |
I will try porting the demo code to Windows and see... I have to set up a dev environment on my multimedia mini-PC first (the one that sits below the TV, as this is the only Windows machine around :D) |
I do develop on Windows and in a distant and hardly remembered past I dealt
with memory-mapped files on Windows. I can dust off the code I had, if that
helps or I can try and help out more directly :). I do remember that there
were unexpected differences in behaviour between the two platforms.
Op do 8 feb 2024 om 22:35 schreef PierUgit ***@***.***>:
… I will try porting the demo code to Windows and see... I have to set up a
dev environment on my multimedia mini-PC first (the one that sits below the
TV, as this is the only Windows machine around :D)
—
Reply to this email directly, view it on GitHub
<#765 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR4XOZUGCTDZFIF3VI3YSVAJHAVCNFSM6AAAAABCR53IP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUHE3DSNZRG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
An example code (even with some dust :)) could definitely help. And you're also welcome if you want to help. |
I had a quick look at the stuff - it has been many years since I last did.
There is no particular documentation, I am afraid, so some code diving is
the only way. The code also precedes Fortran 2003, so it is a bit messy
when it comes to the Fortran-C interaction. Please find the zip file in the
attachment (hoping that it is accepted) -- oops, that is not the case,
well, I had to rename the two batch files, then it worked.
Op vr 9 feb 2024 om 19:49 schreef PierUgit ***@***.***>:
… An example code (even with some dust :)) could definitely help. And you're
also welcome if you want to help.
—
Reply to this email directly, view it on GitHub
<#765 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR5CVVO3CH5J354MX3LYSZVR7AVCNFSM6AAAAABCR53IP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWGQZTOMRUGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I could install the MSYS2 environment on my office laptop, and start porting the code to Windows. I have a rough version of the anonymous mapping and it looks OK, so at the end everything should (hopefully) work.
Actually there's no attachment in the GitHub interface, where I'm reading the posts. I am sending you a separate and personal email : could you send again the files in the answer? |
The code now runs on Windows :) |
Motivation
Provide some memory mapped file features to Fortran. These features are indeed accessible througt the C interoperability, but the idea here is to encapsulate them to get an easy to use interface, with additional runtime checks. Two meain usages:
Prior Art
Searching "memory mapped files Fortran" in Google returns results that all use the C interoperability of C/posix features, or Windows specific routines with the Intel compiler. A stdlib implementation should have the OS dependent code under a unique interface.
Additional Information
This was originally discussed on the Fortran Discourse, where the inclusion in stdlib has been suggested.
I have prepared a small demonstration code to show what it could look like (C/posix stuff only): https://github.com/PierUgit/fmmap/tree/main
The text was updated successfully, but these errors were encountered: