Giter Site home page Giter Site logo

compiling on NAS about pfunit HOT 9 CLOSED

chesswright avatar chesswright commented on June 11, 2024
compiling on NAS

from pfunit.

Comments (9)

tclune avatar tclune commented on June 11, 2024

Hmm. I'm cc'ing @mathomp4 to see if he has any thoughts. We certainly build with 2021.6 on the Goddard systems, but @mathomp4 may have built this at NAS recently as well.

At first glance, this appears to be a latent bug that is being detected with more recent Intel compilers, and should be easily fixed. But at the same time this compiles with NAG, which is quite strict about such things, so maybe I am missing something in my quick dive. If you want to attempt a quick workaround, you could try changing the line at https://github.com/Goddard-Fortran-Ecosystem/gFTL/blob/d8e4edb69c83228975c2463e36b5c02e7d0edefa/include/v1/templates/altSet_decl.inc#L58 to

 class (__set), pointer :: reference => null()

But there is a good chance that this just leads to another conflict.

from pfunit.

mathomp4 avatar mathomp4 commented on June 11, 2024

@chesswright I definitely have built pFUnit as part of GFE in Baselibs with Intel 2022.1 (aka Intel Fortran 2021.6). When I did it I used these modules:

gcc/10.2 
comp-intel/2022.1.0
mpi-hpe/mpt.2.25 
python/GEOSpyD/Min4.11.0_py3.9

Now the python doesn't matter and if this is a gFTL issue, the gcc shouldn't either.

What modules are you using to build with? And I guess where did you build?

from pfunit.

tclune avatar tclune commented on June 11, 2024

Note - I still think there is a Fortran bug that I intend to fix. But in the mean time @mathomp4 is helping me figure out why our CI is not catching this.

from pfunit.

chesswright avatar chesswright commented on June 11, 2024

this is my module list

  1. comp-intel/2022.1.0 2) pkgsrc/2021Q2 3) mpi-hpe/mpt.2.25 4) mpi-hpe/mpt

from pfunit.

tclune avatar tclune commented on June 11, 2024

Hmm. Despite this being a part of the standard that I thought I understood fairly well, we have:

""A nonpolymorphic entity is type compatible only with entities of the same declared type, except that an entity of an enum type is also type compatible with an expression of type integer if the expression has a primary that is an enumerator of that enum type."

This statement (and my tests with various compilers) indicates that the "offending" lines are indeed legal, and the "extensible" part of the target is simply lost is the pointer assignment. Since there never can be any extension in this context it even works as intended. So ... no need for a fix to the source. Instead we need to redouble our efforts to understand the difference in context.

from pfunit.

mathomp4 avatar mathomp4 commented on June 11, 2024

Ahhh. This could be my old friend "NAS doesn't want to provide useful modulefiles". How did you build this? If you do this:

cmake ..

it will fail! Why? Well, NAS in their...infinite wisdom, let's call it, have decided that when you module load comp-intel you do not get FC set in your environment. So because of that when you don't specify a Fortran compiler:

$ cmake ..
-- The Fortran compiler identification is GNU 4.8.5
-- The C compiler identification is GNU 4.8.5
...

CMake first looks for what is in FC in your environment, and you'll have none. And then CMake goes through some sort of algorithm and it finds the system gfortran, version 4.8.5, which is insanely old. And none of Tom's code will ever compile with that old of a Fortran compiler!

Instead, you need to specify the compiler by adding:

-DCMAKE_Fortran_COMPILER=ifort

Now you'll see:

$ cmake .. -DCMAKE_Fortran_COMPILER=ifort
-- The Fortran compiler identification is Intel 2021.6.0.20220226
-- The C compiler identification is GNU 4.8.5
-- Detecting Fortran compiler ABI info

So (at least) the Fortran is recent and this will build.

Note, you might be okay here, but I always load a newer gcc as well because icpc and icc depend on the GCC version in the environment. So if your code has some mildly new C or C++, you might need to do that.

from pfunit.

chesswright avatar chesswright commented on June 11, 2024

from pfunit.

tclune avatar tclune commented on June 11, 2024

@mathomp4 Can this issue be closed?

from pfunit.

mathomp4 avatar mathomp4 commented on June 11, 2024

Yes. I think it was just a NAS Thing

from pfunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.