Skip to content
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

Fix regression introduced by PR #1422 #1443

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

wanbinchen-hnc
Copy link
Contributor

@wanbinchen-hnc wanbinchen-hnc commented Apr 18, 2024

This regression referred in issue #1442 occurs when we pass a struct component for an assumed-shape formal argument, e.g. geom%freq in

alpha = alpha_dyn_qho(alpha_0, omega, geom%freq, dalpha, grad_request_t())

where the third formal argument is declared as

type(quad_pt_t), intent(in) :: freq(0:)

The root cause is that we have lost the parent geom in the expression for the descriptor of geom%freq when using the function get_extent.

We fix this by manually constructing the subscript expression for the extent of geom%freq.

Copy link
Collaborator

@bryanpkc bryanpkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This solves the problem in #1442 but the libmbd build still fails, this time with a different error; I'll create a new issue. I'll give @shivaramaarao a chance to review before merging this.

Copy link
Collaborator

@shivaramaarao shivaramaarao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@bryanpkc bryanpkc merged commit c7dc57c into flang-compiler:master Apr 19, 2024
10 checks passed
@pawosm-arm
Copy link
Collaborator

Hi @bryanpkc this commit fixes the building issue for me, yet bear in mind that I'm building libmbd from the 0.10.3 tag, not the top of the trunk. Also, I'm doing plain regular build, an attempted MPI build has failed like this:

[ 10%] Building Fortran object src/CMakeFiles/mbd.dir/mbd_mpi.F90.o
cd src && mpifort -DWITH_MPI -DWITH_SCALAPACK -Dmbd_EXPORTS -Isrc  -DWITH_MPI -g -fPIC   -c src/mbd_mpi.F90 -o CMakeFiles/mbd.dir/mbd_mpi.F90.o
F90-S-0000-Internal compiler error. incomplete interface file, missing AST    1038  (src/mbd_mpi.F90: 6)
F90-F-0004-incomplete IPA file, missing AST   (src/mbd_mpi.F90: 6)
F90/aarch64 Linux FlangArm F90  - 1.5 2017-05-01: compilation aborted

I don't know how often MPI build of this library is needed, for me the plain build is sufficient.

@bryanpkc
Copy link
Collaborator

Also, I'm doing plain regular build, an attempted MPI build has failed like this

Thanks for the heads-up. Let me try to look at this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants