Recipe for installing with writeable OpenFOAM installation
Closed this issue · 6 comments
First of all, thanks a lot for your work here that enables compiling OF on Mac!
In our organization we do a lot of development of custom OF solvers and libraries for thermo, reactions, mesh modifications etc. We have a workflow where different projects are organized as internal forks of the OpenFOAM.com repo, so we need a writeable OF installation. Mostly we run on Linux, but more and more of our colleagues use Mac for their laptops.
I was able to set up my system the way I need it based on your configure.sh script and some of the other things in this repo. With a writeable case-sensitive volume I could also put my WM_PROJECT_USER_DIR there and it seems that things work nicely.
I am going to write down a recipe for this so other colleagues can follow. This could of course also be interesting for advanced OF users outside our organisation. Would you be interested in including this recipe as something like a "InstallationForAdvancedUsers.md" document on this repo?
I think this would be really useful for the community
@asmunder @matteoicardi FWIW you can clone this repo and run make build
to get a user-writeable disk image of OpenFOAM, configured exactly as the read-only one bundled with the app.
@asmunder @matteoicardi To add to my previous comment, would that (i.e. running make build
and using the resulting image) fit your use cases?
@gerlero Sorry about the slow response.
If my testing is correct, your suggestion almost does what I want.
The difference is that make build
creates a case-sensitive APFS disk image for each OF installation.
I would prefer that I as a user would create a case-sensitive APFS volume that will hold all OF installations, and I could then do export OF_VOLUME=/Volumes/OpenFOAM && make build
, where make would then create "$OF_VOLUME/OpenFOAM-v2312" as the root directory for that particular OF installation.
There are a couple of benefits to this. One is that I can put my WM_PROJECT_USER_DIR also under $OF_VOLUME and enjoy the benefits of a case-sensitive file system also for my own solvers. Another benefit is that when creating a volume in Disk Utility, I don't need to specify a file size for this volume, it will just transparently share the whole disk with the regular Mac "Data" volume. I can keep $OF_VOLUME permanently mounted, and I can make a symlink from $OF_VOLUME to $HOME/OpenFOAM.
I'm happy that the Makefile can get you close enough, but that looks to me like a very specific use case (multiple writeable OpenFOAM versions in the same volume), which the project is not designed to support (nor am I convinced that I want to support). In my mind, this project's goal is to make OpenFOAM usable on macOS to most users.
You might be able to make your own recipe by modifying the Makefile or making your own build script that calls the configuration scripts in this repo, as you have mentioned. Though as far as I'm concerned, such form of installation is beyond the scope of this project.
Closing; feel free to reopen if needed.