Skip to content

ENH: Use f90 compiler specified in f2py command line args for pgi compiler - #16730

Merged
charris merged 1 commit into
numpy:masterfrom
danbeibei:fcompiler
Jul 30, 2020
Merged

charris merged 1 commit into
numpy:masterfrom
danbeibei:fcompiler

Conversation

@danbeibei

Copy link
Copy Markdown
Contributor

Closes #16481

@danbeibei danbeibei changed the title Use f90 compiler specified in command line args for pgi compiler… ENH: Use f90 compiler specified in command line args for pgi compiler… Jul 2, 2020
@danbeibei danbeibei changed the title ENH: Use f90 compiler specified in command line args for pgi compiler… ENH: Use f90 compiler specified in command line args for pgi compiler Jul 2, 2020
@danbeibei danbeibei changed the title ENH: Use f90 compiler specified in command line args for pgi compiler ENH: Use f90 compiler specified in f2py command line args for pgi compiler Jul 2, 2020
@eric-wieser

Copy link
Copy Markdown
Member

Won't this do the wrong thing when an f77 compiler is requested?

@danbeibei

danbeibei commented Jul 7, 2020 •

Copy link
Copy Markdown
Contributor Author

It would call the pgf90 executable rather than the pgfortran executable.
Those are actually the same compiler according to the PGI Fortran Reference Guide (https://www.pgroup.com/resources/docs/20.4/openpower/fortran-ref-guide/index.htm):

pgf90, pgf95, and pgfortran are the same compiler that has evolved from Fortran 90 to Fortran 2003 standards. The older names are supported so that makefiles that were written using pgf90/pgf95, will still work. All three names refer to the same one compiler that supports the Fortran 2003 language standard.

@eric-wieser

Copy link
Copy Markdown
Member

What about old compiler versions which do not have an f90 compiler at all? Maybe we already do not support those.

@danbeibei

danbeibei commented Jul 7, 2020 •

Copy link
Copy Markdown
Contributor Author

It won't neither have the pgfortran executable as this one is newer than the pgf90 executable.
IMO the question should be raised the other way around: what about newer code, fortran 95 code or fortran 2003 code for instance? It would be compiled with the pgf90 executable instead of the pgfortran executable. It would work because those are the same, but it's confusing.

Nevertheless, the command line utility lets the user dial in his compiler command of choice, I feel like the system should use the specified command for linking as well. This is where I may be mistaking.

@charris

charris commented Jul 8, 2020

Copy link
Copy Markdown
Member

@eric-wieser Are you OK with this?

@charris

charris commented Jul 18, 2020

Copy link
Copy Markdown
Member

@eric-wieser Ping.

@charris

charris commented Jul 18, 2020

Copy link
Copy Markdown
Member

I'd like to put this. If there are problems we can address them when they arise. @danbeibei Could you make a release note in doc/release/upcoming_changes, look at the other entries and the README to see how it is done. Also, what happens if the --f90exec is not part of the command?

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 18, 2020
@danbeibei

danbeibei commented Jul 28, 2020 •

Copy link
Copy Markdown
Contributor Author

OK, I added a release note.

If the --f90exec option is not provided the pgf90 executable is used instead of the pgfortran one.
This brings us back to the previous considerations.

@eric-wieser

Copy link
Copy Markdown
Member

@charris: I don't know nearly enough about building fortran to have an opinion here, my question above was to prompt opinions from people who might.

@charris

charris commented Jul 28, 2020 •

Copy link
Copy Markdown
Member

@eric-wieser Neither do I :) In these cases we need to depend on people who actually use the relevant compiler for fixes that make things work for them.

@charris
charris merged commit e7c1d01 into numpy:master Jul 30, 2020
@charris

charris commented Jul 30, 2020

Copy link
Copy Markdown
Member

Thanks @danbeibei .

@danbeibei
danbeibei deleted the fcompiler branch August 3, 2020 08:41
@charris charris mentioned this pull request Oct 10, 2020
20 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

f2py undefined symbol with PGI fortran compiler and MPI calls

3 participants