Skip to content

omega-h: Use seacas for exodus (instead of trilinos) - #4672

Merged
bernhardkaindl merged 6 commits into
spack:developfrom
Fuad-HH:seacas_dep
Aug 6, 2026
Merged

omega-h: Use seacas for exodus (instead of trilinos)#4672
bernhardkaindl merged 6 commits into
spack:developfrom
Fuad-HH:seacas_dep

Conversation

@Fuad-HH

@Fuad-HH Fuad-HH commented May 5, 2026

Copy link
Copy Markdown
Contributor

Trilinos was needed for exodus mesh files which only needs seacas. Now secas is directly used by Omega_h instead of through trilinos.

@spackbot-triage spackbot-triage Bot added dependencies Modifications with a `depends_on()` directive update-package Modifications to packages in the repository new-variant Modifications to packages' `variant()` directives labels May 5, 2026
@spackbot-triage
spackbot-triage Bot requested a review from cwsmith May 5, 2026 00:59
Comment thread repos/spack_repo/builtin/packages/omega_h/package.py Outdated
Comment thread repos/spack_repo/builtin/packages/omega_h/package.py Outdated
Comment thread repos/spack_repo/builtin/packages/omega_h/package.py Outdated
Fuad-HH added 2 commits May 5, 2026 13:31
kokkos 4.3 is needed for Omega_h_FORCE_KOKKOS_SORT: see SCOREC/omega_h#146
This pull request is marked as v10.10.0
Trilinos is only used for SEACASExodus which can be bypassed by using seacas directly. For +exodus variant, seacas is used instead of trilinos.
@cwsmith

cwsmith commented May 6, 2026

Copy link
Copy Markdown
Contributor

notes from offline discussion:

  • add conflict for +trilinos +kokkos and +trilinos +seacas
  • restrict +seacas dep for latest omegah tag scorec-v11.1.0

added conflicts with trilinos against kokkos or exodus(seacas)
seacas is only used in the latest v11.1.0
@spackbot-triage spackbot-triage Bot added new-version Modifications to packages' `depends_on()` directives conflicts Modifications with a `conflicts()` directive labels May 6, 2026
Comment thread repos/spack_repo/builtin/packages/omega_h/package.py
Comment thread repos/spack_repo/builtin/packages/omega_h/package.py
@spackbot-triage
spackbot-triage Bot requested a review from cwsmith May 27, 2026 15:42
@bernhardkaindl bernhardkaindl changed the title Depend on seacas for exodus instead of trilinos omega-h: Use seacas for exodus (instead of trilinos) Jul 30, 2026
@bernhardkaindl

bernhardkaindl commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hi @cwsmith, @Fuad-HH and @Sichao25:

Is that fine with you?

If there are no objections, I'd approve and merge this PR tomorrow and add a note for @Sichao25 to rebase to #5792 on top of these changes (they just change context, so it should be relatively straight-forward form him to do it) after the merge.

The other option exists of course too, but someone, (@Sichao25) would have to do the rebase with conflict resoltion and add it to their PR or open a new PR.

This PR can't be easily rebased, at least GitHub says:

Rebase conflict between head and base.

When I try to use the Rebase option of the Update button of this PR. Update with merge was successful.

Later or tomorrow, we should see how this PR did in CI.

@spackbot-triage
spackbot-triage Bot requested a review from cwsmith August 5, 2026 11:15
@cwsmith

cwsmith commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@bernhardkaindl Thanks for checking on this. Yes, lets merge this first then rebase #5792.

@bernhardkaindl
bernhardkaindl enabled auto-merge (squash) August 5, 2026 14:35
@Sichao25

Sichao25 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I'm fine with merging this first. Thanks for letting me know.

@bernhardkaindl bernhardkaindl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cwsmith, approving with your approval to make progress for the next PR!

@Fuad-HH:

When enabling +exodus, there where builds which failed with:

/usr/bin/ld: libomega_h.so: undefined reference to `nc_set_log_level'

However, other builds were successful.

I wasn't able to pinpoint the case yet, it must be a missing -lnetcdf-c or so when linking libomega_h.so.

Of course, it didn't show with ~shared, and the trigger seems to be:
spack install omega-h +exodus +mpi +shared

I didn't work this out completely, but with +mpi, I see parallel-netcdf-c is used and so far, I saw nc_set_log_level seems to be inly in the non-parallel netcdf:

grep -r nc_set_log_level ../spack/opt/spack/*/*netcdf*
../spack/opt/spack/linux-skylake/netcdf-c-4.10.0-oacmggfhgct2hgkvsf2el7os63aj7mok/include/netcdf.h:nc_set_log_level(int new_level);
grep: ../spack/opt/spack/linux-skylake/netcdf-c-4.10.0-oacmggfhgct2hgkvsf2el7os63aj7mok/bin/ncgen: binary file matches

@Fuad-HH, @cwsmith, as approved to base #5792 on top of this PR, so I'd say this the undefined undefined reference to `nc_set_log_level' can be solved that PR or another follow-up PR.

Cc: @Sichao25

@bernhardkaindl
bernhardkaindl merged commit dcf3641 into spack:develop Aug 6, 2026
17 checks passed
@cwsmith

cwsmith commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thank you @bernhardkaindl . We appreciate the help.

It seems this built against an older version of omegah as SCOREC/omega_h@4dd682e removed the call to nc_set_log_level.

Comment on lines 130 to 131
def patch(self):
if "@:9.34.8" in self.spec:

@bernhardkaindl bernhardkaindl Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@cwsmith, this filter_file() removes (tested to build both affected versions) remaining debug call for the +exodus versions that still have the debug call:

Suggested change
def patch(self):
if "@:9.34.8" in self.spec:
def patch(self):
# https://github.com/SCOREC/omega_h/commit/4dd682ef16ebf2502239ad06883e9f10c611f1c4
if self.spec.satisfies("@10.8.6-scorec:11.0.0-scorec"):
filter_file(r"nc_set_log_level\(5\);", "", "src/Omega_h_exodus.cpp")
if self.spec.satisfies("@:9.34.8"):

I guess a would be worth a suggestion to #5792 or alternatively a new PR.

Suggestion submitted: #5792 (comment)

BTW, off-topic: Is deprecating some of the older versions of omega-h a consideration for spack?

@Fuad-HH
Fuad-HH deleted the seacas_dep branch August 7, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts Modifications with a `conflicts()` directive dependencies Modifications with a `depends_on()` directive new-variant Modifications to packages' `variant()` directives new-version Modifications to packages' `depends_on()` directives update-package Modifications to packages in the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants