-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fortran support #1098
Fortran support #1098
Conversation
Related to #485 |
I looked through the Internet and the PGI documentation and couldn't find any official way to detect the PGI installation path. The only information I could find in the PGI documentation is that the default installation paths are |
The installer doesn't allow to change the path. So you can just check |
It would be incredible to get a solid, working fortran compiler 🌈! Let me post some thoughts in a mostly-unsorted order:
[1] http://www.pgroup.com/support/community-faq.htm#diff |
This is true. Ideally we should have a 100% free fortran compiler. The only ones that come to my mind are gfortran and maybe sometime in the future flang. I have a second branch [1] that enables fortran support in vcpkg via gfortran and mingw based on the work of @traversaro [2]. The problem that remains here is that MinGW does not yet support the UCRT. I found a fork of MinGW where someone tried to port MinGW to the UCRT [3] but it is not yet finished and it does not seem to be developed actively anymore.
Intel actually added support for Visual Studio 2017 in its latest releases (Parallel Studio XE 2017 Update 4 and Parallel Studio XE 2018 beta). I think PGI will be a little bit more difficult since they usually release the Community Edition once or twice a year only. I assume VS2017 support to be present in the payed version more early.
The
The NMAKE support may be removed by now. When I started to work on the fortran support there have been some issues with CMake, Ninja and PGI which have been fixed in CMake by now. Nevertheless, it may make sense to keep the support in [1] https://github.com/albertziegenhagel/vcpkg/tree/add-lapack-mingw-fortran |
I've implemented support for Fortran in pure CMake via an additional function called This function reads a variable called The function I will remove the old implementation in the vcpkg C++ code in an other commit. Some remaining questions to be answered:
[1] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html |
It certainly does, but keep in mind that if you want to work with Fortran on Windows there's not that many options: There's Intel, PGI, MinGW, Absoft and NAG. Out of these, all but MinGW are proprietary software and only PGI offers a free edition in the form of the time-bombed PGI CE. If you're looking for VS compatibility you're already down to PGI and Intel. It's unlikely MinGW will support VS in the future, and even if it eventually did, MinGW has never offered reasonably performing binaries - given that Fortran is a language only suitable for computing, that's by no means optimal. If you're looking for "frozen offline reproducible" builds with Fortran on Windows, the answer is mostly that there's no free option for doing that. As of such, PGI CE is the best "free" offer there realistically is going to be in the predictable future. Not to mention that when working with scientific or computational software, you will eventually require Fortran binaries, and will probably have either switched off Windows in order to use GFortran, or use Cygwin or MSYS for doing so - or have purchased a license for Intel or PGI. At the moment, if you want to "bother" with Windows here, you have to compile all dependencies yourself, and given the poor state of some CMake scripts shipped by popular Fortran projects (have a look at ScaLAPACK if you like a demonstration), compiling dependencies is a pain. Any improvement you can make to that situation by adding Fortran support in vcpkg is going to make this less painful. Even if just those with commercial licenses for Intel could install Fortran packages the way it's possible to install other packages with vcpkg is going to make this less of an ordeal for a significant group of users who are using Fortran on Windows right now.
You can't really expect third party commercial compilers to offer support for a new Visual Studio release on day one. Intel usually takes 1-2 months after a VS release to update their toolset, both C/C++ and Fortran, to support the version - this time around it took them about 1.5 months. Faster than that just isn't going to be possible if they need to adapt to changes - not only concerning their VS plugins, but also the C++ STL and more - and verify it works. As for PGI, I can't say how long it takes them, but the delay is going to be longer in the CE. However, it would only need VS2015 to be present upon installation and can be mixed with VS2017-built code. It mostly boils down to PGI using link.exe from VS, and I think it's always going to look for the 2015 one here.
For commercial versions of Intel and PGI that won't work because both require a license file, which is going to be generated upon installation time. For Intel, you can automatize the installation, see this piece of documentation, but getting around an installation won't be possible. Not to mention that Intel registers with the various Visual Studio versions found on the system (it supports VS2012-2017) and an extracted install will not work. Even on Linux that's not supported, but by extracting the files to /opt you can make it mostly work, assuming you have already generated a .lic file. Lastly, for PGI CE that might sound reasonable, but for the commercial versions the question remains why you would want to not install a product system-wide that you've purchased for a serious amount of money implicitly by vcpkg? I'm really not seeing the usage scenario here, and I would suggest leaving this part to the user, just like installing Visual Studio is the user's responsibility. PGI CE itself is an InstallShield wizard wrapped around an MSI package that contains a pre-generated license.dat. This might be possible to extract but I'm not sure how that would work or whether PGI CE could even function afterwards. |
8765c3a
to
36e7583
Compare
I've cleaned everything up, removed all unnecessary changes in the C++ code, rebased on master and updated the CMake version to 3.9-rc1, which includes all the modifications required for PGI support. The only remaining part in my opinion is documentation, which is blocked by #1185, where I don't think that I am the right person to write it. Another thing is that this PR adds a fortran lapack port, which will mean we will have two lapack implementations: |
I've added a documentation page for triplet options in 20af69a, which I think is the part of #1185 that was blocking you. I think it is fine to add the I think all the major blockers are therefore gone, so I'll start reviewing this for merging. not relevant to this immediate PR, just some thoughts for the future We could also possibly lift |
50faec7
to
314aa4c
Compare
I've added some documentation for the
This sounds reasonable. Besides the problems that may arise while setting-up the environment in the current implementation (handling of If one is interested in implementing some of those changes, my old C++ implementation can be found at https://github.com/albertziegenhagel/vcpkg/tree/fortran-support-backup |
надо как то поднять тему, особенно про PETSc
https://www.gridpack.org/wiki/index.php/Building_on_Windows |
@ras0219-msft I've resolved the merge conflicts and added some additional fixes. Is there any chance this could be merged, or do you prefer to have the changes implemented that you mentioned in your last comment? |
…combining Intel 2017 and VS2017
# Conflicts: # scripts/cmake/vcpkg_configure_cmake.cmake
# Conflicts: # scripts/cmake/vcpkg_common_functions.cmake
:x64-windows-static путь к Intel
прописывал пути в файле compilervars.bat
дошел до PETSc и не смог осилить ошибки, как я понял нужен python2 и только с состава cygwin собранные сырцы, вдруг кому пригодится ссылка
|
@albertziegenhagel 1.8.2 Ninja to support Fortran PGI Community Edition Version 18.4 (released April 26, 2018) |
@albertziegenhagel |
Please move any work to be done for Fortran support to #6939. |
Our vcpkg does no longer contains the effectively abandoned fortran support pull request microsoft/vcpkg#1098 , so openblas is no longer built with lapack support. There's a new PR for fortran support here: microsoft/vcpkg#6939 We will wait until it gets upstreamed this time.
## 1.6.0 (2022-05-05) ### Features Added - Add `Azure::Core::Http::Request` constructor overload to support payload and non-buffered response. ### Bugs Fixed - [[microsoft#3537]](Azure/azure-sdk-for-cpp#3537) Updated field type `CurlTransportOptions.Proxy` from `std::string` to `Azure::Nullable<std::string>`. This allows libcurl to ignore the proxy settings from the environment when the string is empty. - [[microsoft#3548]](Azure/azure-sdk-for-cpp#3548), [[microsoft#1098]](Azure/azure-sdk-for-cpp#1098) Improve performance of the Http transport on Windows by reusing the same session handle across all requests. ### Other Changes - [[microsoft#3581]](Azure/azure-sdk-for-cpp#3581) Update log level in retry policy from warning to informational.
## 1.6.0 (2022-05-05) ### Features Added - Add `Azure::Core::Http::Request` constructor overload to support payload and non-buffered response. ### Bugs Fixed - [[#3537]](Azure/azure-sdk-for-cpp#3537) Updated field type `CurlTransportOptions.Proxy` from `std::string` to `Azure::Nullable<std::string>`. This allows libcurl to ignore the proxy settings from the environment when the string is empty. - [[#3548]](Azure/azure-sdk-for-cpp#3548), [[#1098]](Azure/azure-sdk-for-cpp#1098) Improve performance of the Http transport on Windows by reusing the same session handle across all requests. ### Other Changes - [[#3581]](Azure/azure-sdk-for-cpp#3581) Update log level in retry policy from warning to informational.
Just recently PGI released the free community edition of their compiler suite for windows [1], which makes a free fortran compiler available on windows that is compatible with VC++.
In this merge request I implemented support to use new triplets which enable additional toolchains for the PGI and the Intel compiler suites if available.
As a demo port file, I added netlib's reference
lapack
(including referenceblas
,cblas
andlapacke
).One could now use
or
to compile lapack with one of those toolchains.
This merge request should be considered as work in progress. The following questions/issues/comments are still to be resolved:
I would be glad to here your comments on this. And please keep in mind that this is a first prove of concept implementation. If there are any ideas on how to improve this, I would be very willing to incorporate those changes.
[1] http://www.pgroup.com/products/community.htm
[2] https://gitlab.kitware.com/cmake/cmake/merge_requests/802
[3] https://gitlab.kitware.com/cmake/cmake/merge_requests/794