Skip to content

enhance custom easyblock for LAMMPS: add sanity_check_test_inputs custom easyconfig parameter, add mapping for zen4, also support building of non-stable LAMMPS versions#3336

Merged
boegel merged 5 commits intoeasybuilders:developfrom
laraPPr:LAMMPS_checks
Aug 14, 2024
Merged

enhance custom easyblock for LAMMPS: add sanity_check_test_inputs custom easyconfig parameter, add mapping for zen4, also support building of non-stable LAMMPS versions#3336
boegel merged 5 commits intoeasybuilders:developfrom
laraPPr:LAMMPS_checks

Conversation

@laraPPr
Copy link
Copy Markdown
Contributor

@laraPPr laraPPr commented May 23, 2024

Add the option to change the examples that will be run during the sanity-check in the EasyConfig

@laraPPr laraPPr changed the title update LAMMPS check_files update LAMMPS check_files and update python command for 2Aug2023 and older versions Jul 30, 2024
Comment thread easybuild/easyblocks/l/lammps.py Outdated
'kokkos': [True, "Enable kokkos build.", CUSTOM],
'kokkos_arch': [None, "Set kokkos processor arch manually, if auto-detection doesn't work.", CUSTOM],
'user_packages': [None, "List user packages (without prefix PKG_ or USER-PKG_).", CUSTOM],
'check_files': [None, "List of tests for sanity-check.", CUSTOM],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not just rely on sanity_check_files if you need to override the default sanity check performed by this easyblock?

Copy link
Copy Markdown
Contributor Author

@laraPPr laraPPr Jul 31, 2024

Choose a reason for hiding this comment

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

That did not work and than on slack they suggested I do this. sanity_check_files is just ignored if added to the easyconfig.

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.

This is the output of sanity check if I add this to the easyconfig

sanity_check_files = [
     'balance', 'crack', 'friction', 'indent',
     'melt', 'min', 'nemd', 'obstacle',
]

output of sanity-check you can see that it runs all the tests set in check_files in the easyblock

 >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/atm/in.atm"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/atm/in.atm"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/balance/in.balance"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/balance/in.balance"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/colloid/in.colloid"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/colloid/in.colloid"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/crack/in.crack"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/crack/in.crack"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/dipole/in.dipole"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/dipole/in.dipole"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/friction/in.friction"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/friction/in.friction"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/hugoniostat/in.hugoniostat"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/hugoniostat/in.hugoniostat"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/indent/in.indent"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/indent/in.indent"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/melt/in.melt"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/melt/in.melt"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/min/in.min"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/min/in.min"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/msst/in.msst"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/msst/in.msst"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/nemd/in.nemd"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/nemd/in.nemd"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/obstacle/in.obstacle"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/obstacle/in.obstacle"); l.finalize()'': OK

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/pour/in.pour"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/pour/in.pour"); l.finalize()'': FAILED

  >> running command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps import 

lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/voronoi/in.voronoi"); l.finalize()'' ...

  >> result for command 'cd /tmp/eb-nod3jf99/tmpx040qyst && LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH mpirun -n 1 python -c 'from lammps 

import lammps; l=lammps(); 

l.file("/data/gent/vo/000/gvo00002/vsc46128/easybuild/RHEL8/cascadelake-ampere-ib/software/LAMMPS/2Aug2023_update2-foss-2023a-kokkos-dev_OBMD/exam

ples/voronoi/in.voronoi"); l.finalize()'': FAILED

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, my bad check_files is used to determine which sanity check commands to run, and is orthogonal to the standard sanity_check_paths we have in EasyBuild which is used for checking whether specific files/directories exist or not.

To avoid confusion, maybe it's better to rename this custom check_files easyconfig parameter to something else to avoid confusion, for example sanity_check_test_inputs?

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.

sounds good. Done.

mkdir(site_packages, parents=True)

self.lammpsdir = os.path.join(self.builddir, '%s-stable_%s' % (self.name.lower(), self.version))
self.lammpsdir = os.path.join(self.builddir, '%s-*_%s' % (self.name.lower(), self.version))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems to be the only real necessary change, the PR title should reflect that?

Comment thread easybuild/easyblocks/l/lammps.py Outdated
'kokkos': [True, "Enable kokkos build.", CUSTOM],
'kokkos_arch': [None, "Set kokkos processor arch manually, if auto-detection doesn't work.", CUSTOM],
'user_packages': [None, "List user packages (without prefix PKG_ or USER-PKG_).", CUSTOM],
'check_files': [None, "List of tests for sanity-check.", CUSTOM],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, my bad check_files is used to determine which sanity check commands to run, and is orthogonal to the standard sanity_check_paths we have in EasyBuild which is used for checking whether specific files/directories exist or not.

To avoid confusion, maybe it's better to rename this custom check_files easyconfig parameter to something else to avoid confusion, for example sanity_check_test_inputs?

@laraPPr laraPPr changed the title update LAMMPS check_files and update python command for 2Aug2023 and older versions Add sanity_check_test_inputs, add mapping for zen4 and update python command for 2Aug2023 and older versions Aug 7, 2024
@boegel boegel added this to the release after 4.9.2 milestone Aug 14, 2024
@boegel boegel changed the title Add sanity_check_test_inputs, add mapping for zen4 and update python command for 2Aug2023 and older versions Add sanity_check_test_inputs, add mapping for zen4 and update python command for LAMMPS 2Aug2023 and older versions Aug 14, 2024
@boegel boegel changed the title Add sanity_check_test_inputs, add mapping for zen4 and update python command for LAMMPS 2Aug2023 and older versions Add sanity_check_test_inputs, add mapping for zen4, and update python command for LAMMPS 2Aug2023 and older versions Aug 14, 2024
@boegel boegel changed the title Add sanity_check_test_inputs, add mapping for zen4, and update python command for LAMMPS 2Aug2023 and older versions enhance custom easyblock for LAMMPS: add sanity_check_test_inputs custom easyconfig parameter, add mapping for zen4, also support building of non-stable LAMMPS versions Aug 14, 2024
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 14, 2024

@boegelbot please test @ jsc-zen3
EB_ARGS="LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb"

@boegelbot
Copy link
Copy Markdown

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=3336 EB_ARGS="LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb" EB_REPO=easybuild-easyblocks EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_3336 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 4687

Test results coming soon (I hope)...

Details

- notification for comment with ID 2289826172 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
jsczen3c1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.4, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.18
See https://gist.github.com/boegelbot/041341e9f6c9aed6b95f589792615d52 for a full test report.

@boegel boegel merged commit 99f7254 into easybuilders:develop Aug 14, 2024
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