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

Build issues when I try to build Trilinos with a tag rather than a branch #987

Closed
xylar opened this issue Sep 29, 2023 · 11 comments
Closed

Comments

@xylar
Copy link

xylar commented Sep 29, 2023

When I try to build Albany after building Trilinos from the compass-trilinos-2023-08-03 tag from https://github.com/E3SM-Project/Trilinos/tags, I see:

  >> 251    /lcrc/group/e3sm/ac.xylar/spack_tmp/ac.xasay-davis/spack-stage/spac
            k-stage-albany-compass-2023-08-03-7ahetqaqoscdrw3sl7zanob7dcrkutjg/
            spack-src/src/Albany_Utils.cpp:49:46: error: 'ALBANY_TRILINOS_GIT_C
            OMMIT_ID' was not declared in this scope; did you mean 'ALBANY_GIT_
            COMMIT_ID'?
     252       49 |   os << R"(** Trilinos git commit id - )" << ALBANY_TRILINO
            S_GIT_COMMIT_ID << std::endl;
     253          |                                              ^~~~~~~~~~~~~~
            ~~~~~~~~~~~~~~~
     254          |                                              ALBANY_GIT_COM
            MIT_ID
  >> 255    make[2]: *** [src/CMakeFiles/albanyLib.dir/build.make:121: src/CMak
            eFiles/albanyLib.dir/Albany_Utils.cpp.o] Error 1

It looks like Albany is (or was on August 3rd) hard-coded with the expectation that Trilinos comes from a git branch.

@bartgol suspected that it might be something architecture specific but I don't think so because I was able to build trilinos on the same machine (Chrysalis) on August 3rd from the develop branches of both Albany and Trilinos. I simply suspect that there is no git commit info when trilinos doesn't come from a git repo but rather from the tarball from a git tag.

@bartgol
Copy link
Collaborator

bartgol commented Sep 30, 2023

That might be possible. I guess we can cook up a strategy where we just put something like "NOT AVAILABLE" whenever the commit id of trilinos cannot be retrieved.

@ikalash
Copy link
Collaborator

ikalash commented Sep 30, 2023

I am on board with what @bartgol proposes.

@xylar
Copy link
Author

xylar commented Oct 1, 2023

@bartgol, that's basically the solution I was thinking of, too.

@bartgol
Copy link
Collaborator

bartgol commented Oct 2, 2023

I can fix this on master, but I can't fix it on the tag we previously created. I can create a branch (rather than the tag), and cherry-pick the commit on that branch as well. But I'm getting lost between issues here and in the spack repo, and I'm not following what is the strategy we're going to use. Are we still planning to create branches/tags in albany (and e3sm-project/trilinos)? In E3SM-Project/spack#21 I saw some discussion about different branches in Trilinos, so I want to be sure I understand.

@xylar
Copy link
Author

xylar commented Oct 2, 2023

I can fix this on master, but I can't fix it on the tag we previously created.

That's fine. Understood.

@xylar
Copy link
Author

xylar commented Oct 2, 2023

I can create a branch (rather than the tag), and cherry-pick the commit on that branch as well.

You can make a tag off of such a branch. But I don't recommend doing that in this case.

@xylar
Copy link
Author

xylar commented Oct 2, 2023

But I'm getting lost between issues here and in the spack repo, and I'm not following what is the strategy we're going to use. Are we still planning to create branches/tags in albany (and e3sm-project/trilinos)? In E3SM-Project/spack#21 I saw some discussion about different branches in Trilinos, so I want to be sure I understand.

Yes, we are expecting to have different tags (but not branches, as far as I understand it) like the ones you made, at least that's my understanding. There would be a tag of Albany one on E3SM-Project/Trilinos with the compass prefix and the same date.

@bartgol
Copy link
Collaborator

bartgol commented Oct 2, 2023

So I should create a branch off of the aug3 tag, add the fix for the commit ID, and then "move" the tag. This, as far as I understand, should get the aug3 tags working.

Edit: actually, we agreed those tags were too verbose, so I'll just make new ones without the repo name.

@bartgol
Copy link
Collaborator

bartgol commented Oct 2, 2023

@xylar I pushed new tags (without repo name), and for the albany one, I added a commit that should avoid the compilation issue due to the lack of git history of Trilinos. Let me know if this works. If not, we can discuss what to try next.

@xylar
Copy link
Author

xylar commented Oct 2, 2023

Sounds promising! I will try again tomorrow if I can (it's a holiday in Germany) or Wednesday at the latest. Thanks very much!

@xylar
Copy link
Author

xylar commented Oct 3, 2023

@bartgol, this worked great! It took me a little Spack debugging to get it installed right but once I did, the installation went smoothly. I have a pull request to get these tags added to our Spack here:
E3SM-Project/spack#22

@xylar xylar closed this as completed Oct 3, 2023
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

No branches or pull requests

3 participants