Skip to content

octopus: split netcdf-c and netcdf-fortran dependency#40685

Merged
michaelkuhn merged 1 commit intospack:developfrom
iamashwin99:octopus-fix-netcdf-deps
Oct 27, 2023
Merged

octopus: split netcdf-c and netcdf-fortran dependency#40685
michaelkuhn merged 1 commit intospack:developfrom
iamashwin99:octopus-fix-netcdf-deps

Conversation

@iamashwin99
Copy link
Copy Markdown
Contributor

@iamashwin99 iamashwin99 commented Oct 24, 2023

Spack cant spec octopus with the latest develop:

$ spack --debug spec octopus +mpi+parmetis+arpack+cgal+pfft+pnfft+python+likwid+libyaml+elpa+nlopt+etsf-io+sparskit+berkeleygw+nfft~debug~cuda~metis~scalapack+netcdf
==> [2023-10-13-16:58:23.941671] Error: Spack concretizer internal error. Please submit a bug report and include the command, environment if applicable and the following error message.                                            octopus+arpack+berkeleygw+cgal~cuda~debug+elpa+etsf-io+libyaml+likwid~metis+mpi+netcdf+nfft+nlopt+parmetis+pfft+pnfft+python~scalapack+sparskit is unsatisfiable, errors are:                                               Traceback (most recent call last):                        File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/cmd/__init__.py", line 218, in parse_specs            spec.concretize(tests=tests)  # implies normalize     File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/spec.py", line 2967, in concretize
    self._new_concretize(tests)                           File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/spec.py", line 2940, in _new_concretize               result.raise_if_unsat()
  File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/solver/asp.py", line 506, in raise_if_unsat
    raise InternalConcretizerError(constraints, conflict
s=conflicts)                                            spack.solver.asp.InternalConcretizerError: Spack concretizer internal error. Please submit a bug report and incl
ude the command, environment if applicable and the following error message.                                         octopus+arpack+berkeleygw+cgal~cuda~debug+elpa+etsf-io+libyaml+likwid~metis+mpi+netcdf+nfft+nlopt+parmetis+pfft+pnfft+python~scalapack+sparskit is unsatisfiable, errors are:                                                                                                       The above exception was the direct cause of the following exception:                                                                                                    Traceback (most recent call last):
  File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/main.py", line 1022, in main
    return _main(argv)                                    File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/main.py", line 977, in _main                          return finish_parse_and_run(parser, cmd_name, env_format_error)                                               File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/main.py", line 1005, in finish_parse_and_run          return _invoke_command(command, parser, args, unknown)                                                        File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/main.py", line 646, in _invoke_command                return_val = command(parser, args)
  File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/cmd/spec.py", line 101, in spec                       concretized_specs = spack.cmd.parse_specs(args.specs, concretize=True)
  File "/scratch/karnada/spackbox/spacklatest/lib/spack/spack/cmd/__init__.py", line 232, in parse_specs
    raise spack.error.SpackError(msg) from e
spack.error.SpackError: Spack concretizer internal error. Please submit a bug report and include the command, environment if applicable and the following error message.
    octopus+arpack+berkeleygw+cgal~cuda~debug+elpa+etsf-io+libyaml+likwid~metis+mpi+netcdf+nfft+nlopt+parmetis+pfft+pnfft+python~scalapack+sparskit is unsatisfiable, errors are:

This does work on the latest stable release.
@fangohr at fangohr/octopus-in-spack#96 found out by trial and error that it is due to the netcdf-c and netcdf-fortran dependency definition.
and the following works:

$ spack spec octopus +mpi+parmetis+arpack+cgal+pfft+pnfft+python+likwid+libyaml+elpa+nlopt+etsf-io+sparskit+berkeleygw+nfft~debug~cuda~metis~scalapack^netcdf-fortran^netcdf-c+mpi 

This MR splits the two dependencies and makes the spec command work.

I am not sure why this broke to begin with and if this is really the best solution. Perhaps someone from the spack team can help here?

@fangohr
Copy link
Copy Markdown
Member

fangohr commented Oct 24, 2023

I would guess the dependency currently on main, written as

    depends_on("netcdf-fortran ^netcdf-c+mpi", when="+netcdf")

is not 'legal' or not compatible with some change in Spack's dependency solver.

Splitting this into two separate lines (as done in this PR) such as:

    depends_on("netcdf-c+mpi", when="+netcdf")
    depends_on("netcdf-fortran", when="+netcdf")

should be equivalent, and works.

Copy link
Copy Markdown
Member

@fangohr fangohr left a comment

Choose a reason for hiding this comment

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

This is a bugfix: the version of the Octopus package currently in Spack does not build with the devel branch of Spack.

It would be good to merge this soon (certainly before the next spack release).

Copy link
Copy Markdown
Member

@michaelkuhn michaelkuhn left a comment

Choose a reason for hiding this comment

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

I was able to reproduce the problem and confirm the PR fixes the problem.

@michaelkuhn michaelkuhn merged commit 3fff8be into spack:develop Oct 27, 2023
victoria-cherkas pushed a commit to victoria-cherkas/spack that referenced this pull request Oct 30, 2023
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Nov 2, 2023
gabrielctn pushed a commit to gabrielctn/spack that referenced this pull request Nov 24, 2023
mtaillefumier pushed a commit to mtaillefumier/spack that referenced this pull request Dec 14, 2023
iamashwin99 added a commit to fangohr/octopus-in-spack that referenced this pull request Mar 17, 2024
Includes changes from :
- spack/spack#41747
- spack/spack#41003
- spack/spack#41919
- spack/spack#40685
- Add hash for octopus 14 and Update BerkeleyGW dependency version in Octopus package #101 ( done at octopus: Support new version octopus@14  spack/spack#43160)
push changes in Disable gdlib #90 (done at octopus: disable gdlib by default spack/spack#43161)
- include new maintainer spack/spack#43163
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.

3 participants