Skip to content

Bugfix: Slepc stand alone test#28593

Closed
RikkiButler20 wants to merge 11 commits intospack:developfrom
RikkiButler20:bugfix/slepc-stand-alone
Closed

Bugfix: Slepc stand alone test#28593
RikkiButler20 wants to merge 11 commits intospack:developfrom
RikkiButler20:bugfix/slepc-stand-alone

Conversation

@RikkiButler20
Copy link
Copy Markdown
Contributor

Fixes 27983

The test fails due to an undefined reference in the example file.

@RikkiButler20 RikkiButler20 added update-package e4s bugfix Something wasn't working, here's a fix stand-alone-tests Stand-alone (or smoke) tests for installed packages labels Jan 25, 2022
@RikkiButler20 RikkiButler20 self-assigned this Jan 25, 2022
@spackbot-app spackbot-app bot requested review from balay and joseeroman January 25, 2022 19:22
@RikkiButler20 RikkiButler20 force-pushed the bugfix/slepc-stand-alone branch from bf5768f to 95ae6d0 Compare January 25, 2022 19:23
@RikkiButler20 RikkiButler20 marked this pull request as draft January 25, 2022 19:23
@RikkiButler20
Copy link
Copy Markdown
Contributor Author

@vsoch Can you try running the slepc test with these changes?

@vsoch
Copy link
Copy Markdown
Member

vsoch commented Jan 25, 2022

Yeah it will be a bit - need to install again.

@RikkiButler20 RikkiButler20 requested a review from vsoch January 26, 2022 23:31
Copy link
Copy Markdown
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! Here are the updated results:

$ bin/spack test results -l -- slepc
==> Results for test suite '4gcvbws2pgx7po4fyiifp4anj6x242do', spec matching 'slepc':
==>   slepc-3.16.1-grefsgc PASSED
==> Testing package slepc-3.16.1-grefsgc
==> [2022-01-26-17:29:46.086647] test: compile hello example
==> [2022-01-26-17:29:46.086841] '/tmp/spack/lib/spack/env/gcc/gcc' '-I/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/slepc-3.16.1-grefsgch7dxpgm6qpq67b57j7bstmu6e/include' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/slepc-3.16.1-grefsgch7dxpgm6qpq67b57j7bstmu6e/lib' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/petsc-3.16.3-nrvqhfypucpihegzafnzrry7yp2zrcs7/lib' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/openmpi-4.1.2-pltxvyjtqoqayz22kln2ndul42hyi5c3/lib' '/home/vanessa/.spack/test/4gcvbws2pgx7po4fyiifp4anj6x242do/slepc-3.16.1-grefsgc/data/slepc/hello.c' '-o' 'hello' '-lslepc' '-lpetsc' '-lmpi'
PASSED
==> [2022-01-26-17:29:46.266905] test: run hello example
==> [2022-01-26-17:29:46.267276] './hello'
Hello world
PASSED

@RikkiButler20 RikkiButler20 marked this pull request as ready for review January 27, 2022 22:02
@RikkiButler20
Copy link
Copy Markdown
Contributor Author

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Feb 4, 2022

I've started that pipeline for you!

@RikkiButler20 RikkiButler20 requested a review from vsoch February 7, 2022 17:19
Copy link
Copy Markdown
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

I saw results before, and I'm not anymore I think.

==>   slepc-3.16.1-grefsgc PASSED
==> Testing package slepc-3.16.1-grefsgc
==> [2022-02-07-10:20:57.860398] Warning: Skipping slepc test: failed to find test1.c

@RikkiButler20
Copy link
Copy Markdown
Contributor Author

@vsoch Did you re-install slepc?

@vsoch
Copy link
Copy Markdown
Member

vsoch commented Feb 7, 2022

No - I didn't know I needed to do that. Will try again after that.

Copy link
Copy Markdown
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

$ bin/spack test results -l -- slepc
==> Results for test suite '25bdyqjyjmxjfl6cex33eftlnnp5uba7', spec matching 'slepc':
==>   slepc-3.16.2-d2cvd32 PASSED
==> Testing package slepc-3.16.2-d2cvd32
==> [2022-02-07-15:42:26.991939] Installing /tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/slepc-3.16.2-d2cvd32q46ai5azr3fp7m5avxl32srdx/.spack/test to /home/vanessa/.spack/test/25bdyqjyjmxjfl6cex33eftlnnp5uba7/slepc-3.16.2-d2cvd32/cache/slepc
==> [2022-02-07-15:42:27.015149] test: compile test1 example
==> [2022-02-07-15:42:27.015358] '/tmp/spack/lib/spack/env/gcc/gcc' '-I/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/slepc-3.16.2-d2cvd32q46ai5azr3fp7m5avxl32srdx/include' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/slepc-3.16.2-d2cvd32q46ai5azr3fp7m5avxl32srdx/lib' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/petsc-3.16.4-tuhalwfgo4mi3d6acbukidnytrhbk3vk/lib' '-L/tmp/spack/opt/spack/linux-ubuntu20.04-skylake/gcc-9.3.0/openmpi-4.1.2-pltxvyjtqoqayz22kln2ndul42hyi5c3/lib' '/home/vanessa/.spack/test/25bdyqjyjmxjfl6cex33eftlnnp5uba7/slepc-3.16.2-d2cvd32/cache/slepc/src/eps/tests/test1.c' '-o' 'test1' '-lslepc' '-lpetsc' '-lmpi' '-lm'
PASSED
==> [2022-02-07-15:42:27.237853] test: run test1 example
==> [2022-02-07-15:42:27.238229] './test1'

Generalized Symmetric Eigenproblem, N=2025 (45x45 grid)

 All requested eigenvalues computed up to the required tolerance:
     29.73524

PASSED

Remove unneeded file
Comment on lines 180 to 188
self.run_test(exe=cc_exe,
options=['-I{0}'.format(self.prefix.include),
'-L', self.prefix.lib, '-l', 'slepc',
'-L', self.spec['petsc'].prefix.lib, '-l', 'petsc',
'-L', self.spec['mpi'].prefix.lib, '-l', 'mpi',
'-o', exe, join_path(test_dir, 'hello.c')],
'-L{0}'.format(self.prefix.lib),
'-L{0}'.format(self.spec['petsc'].prefix.lib),
'-L{0}'.format(self.spec['mpi'].prefix.lib),
join_path(test_dir, 'test1.c'), '-o', exe,
'-lslepc', '-lpetsc', '-lmpi', '-lm'],
purpose='test: compile {0} example'.format(exe),
work_dir=test_dir)
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.

Is this needed anymore? I would think the make you introduced at line 175 already takes care of this.

Copy link
Copy Markdown
Contributor Author

@RikkiButler20 RikkiButler20 Feb 12, 2022

Choose a reason for hiding this comment

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

Without it, I get this error: ./test1: error while loading shared libraries: libparpack.so.2: cannot open shared object file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@balay I am unable to build the example using the makefile. I get the error that I posted above.

@joseeroman
Copy link
Copy Markdown
Contributor

I have been having a look at this. I think the problem is due to how SLEPc's configure is invoked from spack. In particular, the line

                    '--with-arpack-lib=%s' % spec['arpack-ng'].libs.joined()

There are two issues:

  • First, the option --with-arpack-libshould be a comma-separated list. It seems that spack is not adding the commas.
  • Second, rather than a list of libraries, it should be a list of flags such as -Wl,-rpath,/path/to/arpack,-lparpack,-larpack. But then commas are used for two different purposes.

SLEPc's configure checks that a program is correctly linked, but does not run it, that is why it fails later when trying to run an example.

This problem does not appear when using --with-arpack-dir, so I guess the change #28654 is worse than before.

Any comments? @balay Should I change SLEPc's configure to accept a list separated with spaces instead of commas?

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 20, 2023

What is the status of this PR?

@joseeroman
Copy link
Copy Markdown
Contributor

What is the status of this PR?

I changed upstream SLEPc. Since version 3.18 the configure script accepts a quoted string for --with-arpack-lib instead of comma-separated list. I don't know if that change has fixed the issue with the standalone test.

@tldahlgren
Copy link
Copy Markdown
Contributor

Closing this PR since the stand-alone test API used here was deprecated and the package is now successfully using the new API (for this test).

@tldahlgren tldahlgren closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something wasn't working, here's a fix e4s stand-alone-tests Stand-alone (or smoke) tests for installed packages update-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spack test run slepc (missing symbols)

6 participants