-
Notifications
You must be signed in to change notification settings - Fork 1
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
Proposed installation management #7
Comments
This is essentially a complete rip off of Homebrew’s structure with an added level of linking to deal with Fortran’s lack of ABI and module compatibility. |
This looks excellent. However, I'm not quite clear on what the json-fortran directory is for. Is that where the compiling is done? Would there really be any need to keep that, once the binaries/.mods/documentation are copied into |
Also, I've been putting some thought into how to deal with compilers. As you say, we'd need a configuration file. I was thinking this would be some JSON containing the following pieces of information:
As you say, there should be information on how to make the compiler available in case it is stored in a module. FLATPack would read this in and create a Compiler object. Between runs, this information could be cached in a pickled file and would only be updated in the event that the JSON is newer than the pickle. As a slightly longer term goal, it might be nice to provide a script which can prompt for compiler information and generate the JSON. In the long run we might even be able to provide a utility which can probe for compilers and figure out their versions. |
I think that |
@cmacmackin I like the idea of json configuration files. Yes, @szaghi is correct. Deploy a package:
# for each compiler supported by json-fortran and for which json-fortran has been built take the
# following actions: in each compilers ‘deployed’ directory first remove any links pointing to any
# version of json-fortran, then create symlinks pointing to the default version
$ FLATPack link json-fortran
# for each compiler supported by json-fortran and for which json-fortran has been built take the
# following actions: in each compilers ‘deployed’ directory first remove any links pointing to any
# version of json-fortran, then create symlinks pointing to the user specified version
$ FLATPack link json-fortran HEAD
Ultimately package authors are responsible for which compilers their package supports. Because of this, we may have conflicting packages installed for one compiler but not another. An optional command line switch could restrict the deployment operation to a list of compilers. Activate a compiler:
# activate the default Intel compiler
# first look in system folders (/usr/local/{bin,lib,include,share}) and unlink anything pointing to
# /usr/local/FLATPack/packages/…
# then create links in /usr/local/{bin,lib,share,include} pointing to the corresponding links in
# /usr/local/FLATPack/packages/Intel/16.0.0/deployed/{bin,lib,share,include}.
# This will create a link like: /usr/local/lib/libjsonfortran.a —> /usr/local/FLATPack/packages/Intel/16.0.0/deployed/lib/libjsonfortran.a
# where /usr/local/FLATPack/packages/Intel/16.0.0/deployed/lib/libjsonfortran.a —> ../../json-fortran/4.1.1/lib/libjsonfortran.a
FLATPack activate Intel |
Hi all, I just want to elaborate more on how I suggest managing multiple compilers and installed packages. As you all know there is no standard Fortran ABI, and on many systems it is critical to support multiple Fortran compilers.
.mod
files can even be incompatible between different releases from the same compiler vendor. Often users then want to build their own programs against libraries that are installed. FLATPack should make it easy for users to link against anduse
Fortran packages managed by FLATPack.I think FLATPack needs to know about compilers installed on the system via some configuration file, and optionally how to activate them. For example some DoD HPCs use GNU Modules to activate different compilers. Also, there may be MPI compiler wrapper scripts etc. A configuration file will be needed to tell FLATPack which compilers are available and how to use/activate them.
A method like
can be used to make available all packages installed on the system on standard compiler search paths. That way users only need to add a line like
-ljsonfortran
and the compiler can findlibjsonfortran.a
andjson_module.mod
since the proper versions of the files have been symlinked into compiler search paths by the activate method, and any previously activated packages from other compilers are unlinked.the activate method will first unlink all entries in
/usr/local/{bin,lib,include,share}
pointing to matching entries in the currently activated compiler’sdeployed
directory. It will then link each item in the requested compiler’sdeployed
directory into/usr/local/…
When building a new package the build can be performed with each compiler available on the system which the package has instructions for in its formula. This way the user can manage which compiler is currently active, and which packages and which versions of the packages are currently active.
The text was updated successfully, but these errors were encountered: