NOAA-EMC / NCEPLIBS-gfsio

Other
1 stars 4 forks source link

Port to Intel LLVM based compiler #24

Closed dkokron closed 10 months ago

dkokron commented 1 year ago

Need to include IntelLLVM as a valid target in src/CMakeLists so that gfsio will build with ifx

gfsio-v1.4.1 > git diff src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7051443..1c00cb3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@

-if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$") set(CMAKE_Fortran_FLAGS "-g -traceback -free -convert big_endian -assume byterecl ${CMAKE_Fortran_FLAGS}") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")

edwardhartnett commented 1 year ago

Thanks for this fix!

Can you submit a PR instead of a diff?

Also, is this fix needed for an operational reason at NOAA or somewhere? That is, do we need to do an immediate release, or are you willing to wait until some future release for this feature to become available?

dkokron commented 1 year ago

Ed, My GIT fu is not strong. I think a PR would require me to clone the repository on github, update that file then issue a PR. Since I'm working my way through the entire hpc-stack (58 packages), I prefer to send minor changes via diff.

No need for an immediate release. I doubt very much that NCEP will switch to the LLVM based compilers within the next year. There are just too many issues with them. I'm working my way through hpc-stack in anticipation of the Intel Classic compilers going away next year. Note the remark below.

icc -V Intel(R) C Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.8.0 Build 20221119_000000 Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.

On Thu, Dec 22, 2022 at 12:19 PM Edward Hartnett @.***> wrote:

Thanks for this fix!

Can you submit a PR instead of a diff?

Also, is this fix needed for an operational reason at NOAA or somewhere? That is, do we need to do an immediate release, or are you willing to wait until some future release for this feature to become available?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-gfsio/issues/24#issuecomment-1363205343, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODV2BVQAPOJLE7RYNIEKTWOSLSNANCNFSM6AAAAAATG7MD6I . You are receiving this because you authored the thread.Message ID: @.***>

edwardhartnett commented 1 year ago

OK, thanks.

But if you are going to do this for all the hpc-stack packages, including all the NCEPLIBS, you really need to figure out pull requests. They are easy.

Create a fork of the repo. Clone that fork, Create a branch. Commit changes.

Now when you look on github at the NCEPLIBS-gfsio repo you will see a helpful message at the top of the screen, saying that there are changes on your branch, and do you want to open a PR?

So it's very easy. Try it and see.

dkokron commented 1 year ago

Ed, That's the procedure I was hoping to avoid doing ~58 times. But if that is what is required, then I'll do it. Dan

On Thu, Dec 22, 2022 at 1:04 PM Edward Hartnett @.***> wrote:

OK, thanks.

But if you are going to do this for all the hpc-stack packages, including all the NCEPLIBS, you really need to figure out pull requests. They are easy.

Create a fork of the repo. Clone that fork, Create a branch. Commit changes.

Now when you look on github at the NCEPLIBS-gfsio repo you will see a helpful message at the top of the screen, saying that there are changes on your branch, and do you want to open a PR?

So it's very easy. Try it and see.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-gfsio/issues/24#issuecomment-1363247823, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODV2BG6HI5IHCUPUWU4QDWOSQ4HANCNFSM6AAAAAATG7MD6I . You are receiving this because you authored the thread.Message ID: @.***>

edwardhartnett commented 1 year ago

Well if you don't do it, someone else must.

Which is extra work, because you must already develop the fix, so you might as well do so on a branch of a fork, and then the PR is no extra work.

If you give me a diff I have to open a branch, apply the diff, and then open a PR. Which is just extra work.

edwardhartnett commented 1 year ago

Also, can we modify our CI to download and install this compiler?

That is, is the compiler publicly available?

dkokron commented 1 year ago

Understood. I'll go the PR route.

On Thu, Dec 22, 2022 at 3:36 PM Edward Hartnett @.***> wrote:

Well if you don't do it, someone else must.

Which is extra work, because you must already develop the fix, so you might as well do so on a branch of a fork, and then the PR is no extra work.

If you give me a diff I have to open a branch, apply the diff, and then open a PR. Which is just extra work.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-gfsio/issues/24#issuecomment-1363372492, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODV2ACENHQTMRXA3TER33WOTCWLANCNFSM6AAAAAATG7MD6I . You are receiving this because you authored the thread.Message ID: @.***>

dkokron commented 1 year ago

Yes, the Intel compiles are publicly available at https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#gs.l6ta2g You'll need the Base and HPC toolkits. Dan

On Thu, Dec 22, 2022 at 3:37 PM Edward Hartnett @.***> wrote:

Also, can we modify our CI to download and install this compiler?

That is, is the compiler publicly available?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-gfsio/issues/24#issuecomment-1363373573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODV2HG364D6DD2BD67LJ3WOTC2ZANCNFSM6AAAAAATG7MD6I . You are receiving this because you authored the thread.Message ID: @.***>