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

Known-issue turn expected test fail into a pass in ReFrame #45

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions configuration/cirrus.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"num_cpus": 36,
"num_cpus_per_socket": 18,
"num_sockets": 2,
}
},
},
{
"name": "highmem",
Expand All @@ -50,7 +50,7 @@
"--partition=highmem",
],
"max_jobs": 16,
"environs": ["gnu", "intel"],
"environs": ["gcc", "intel"],
"resources": [
{
"name": "qos",
Expand All @@ -61,7 +61,7 @@
"num_cpus": 112,
"num_cpus_per_socket": 28,
"num_sockets": 4,
}
},
},
{
"name": "compute-gpu",
Expand All @@ -86,9 +86,7 @@
"num_cpus_per_socket": 20,
"num_sockets": 2,
},
"devices": [
{"type": "gpu", "num_devices": 4}
]
"devices": [{"type": "gpu", "num_devices": 4}],
},
{
"name": "compute-gpu-default",
Expand All @@ -108,9 +106,7 @@
"num_cpus_per_socket": 20,
"num_sockets": 2,
},
"devices": [
{"type": "gpu", "num_devices": 4}
]
"devices": [{"type": "gpu", "num_devices": 4}],
},
],
}
Expand Down Expand Up @@ -144,6 +140,7 @@
{
"name": "Default",
"cc": "gcc",
"ftn": "gfortran",
"target_systems": ["cirrus"],
},
],
Expand All @@ -169,10 +166,7 @@
"type": "file",
"name": "reframe.log",
"level": "debug",
"format": (
"[%(asctime)s] %(levelname)s "
"%(levelno)s: %(check_info)s: %(message)s"
),
"format": ("[%(asctime)s] %(levelname)s " "%(levelno)s: %(check_info)s: %(message)s"),
"append": False,
},
],
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[project]
name = "EPCC-Reframe"
description = "ReFrame configuration and test suite for the EPCC HPC systems"
dependencies = ["reframe-hpc"]
requires-python = ">= 3.6"
readme = "README.md"
license = {file = "LICENSE"}

[tool.black]
line-length = 120

Expand Down
11 changes: 8 additions & 3 deletions tests/known-issues/gcc_mpi_f08/gcc_mpi_f08.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

This issue prevents the mpi_f08 interface being used.
We expect GCC to potentially be affected and other compilers to not be affected.
Errors will be reported if gcc passes the test, or another type of compiler fails the test.
"""

import reframe as rfm
Expand All @@ -22,7 +23,7 @@ class InterfaceBoundsTest(rfm.RegressionTest):
lang = parameter(["f90"])

valid_systems = ["archer2:login", "cirrus:login"]
valid_prog_environs = ["*"]
valid_prog_environs = ["Default", "PrgEnv-cray", "PrgEnv-gnu", "gcc", "intel"]
tags = {"functionality", "short", "issues"}
maintainers = ["[email protected]"]

Expand All @@ -32,6 +33,10 @@ def setup_path(self):
self.sourcepath = f"gcc_mpi_f08.{self.lang}"

@sanity_function
def assert_notfound(self):
"""Checks that issue was not found"""
def assert_result(self):
"""Checks that issue was not found for non-gcc compilers"""
# Expect gcc to fail check
if self.current_environ.name in ["PrgEnv-gnu", "gcc"]:
return sn.assert_found(r"F", self.stdout)
# Expect other compilers to pass check
return sn.assert_not_found(r"F", self.stdout)
71 changes: 35 additions & 36 deletions tests/known-issues/gcc_mpi_f08/src/gcc_mpi_f08.f90
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
MODULE FOO
INTERFACE
SUBROUTINE dummyc(x0) BIND(C, name="sync")
type(*), dimension(..) :: x0
END SUBROUTINE
END INTERFACE
contains
SUBROUTINE dummy(x0)
type(*), dimension(..) :: x0
call dummyc(x0)
END SUBROUTINE
END MODULE

PROGRAM main
USE FOO
IMPLICIT NONE
module foo
interface
subroutine dummyc(x0) bind(c, name="sync")
type(*), dimension(..) :: x0
end subroutine
end interface
contains
subroutine dummy(x0)
type(*), dimension(..) :: x0
call dummyc(x0)
end subroutine
end module

program main
use foo
implicit none
integer :: before(2), after(2)

INTEGER, parameter :: n = 4

DOUBLE PRECISION, ALLOCATABLE :: buf(:)
DOUBLE PRECISION :: buf2(n)
integer, parameter :: n = 4

ALLOCATE(buf(n))
before(1) = LBOUND(buf,1)
before(2) = UBOUND(buf,1)
CALL dummy (buf)
after(1) = LBOUND(buf,1)
after(2) = UBOUND(buf,1)
double precision, allocatable :: buf(:)
double precision :: buf2(n)

write(*,'(a20,2i5,l5)') "allocatable lbound", before(1), after(1), before(1) .EQ. after(1)
write(*,'(a20,2i5,l5)') "allocatable ubound", before(2), after(2), before(2) .EQ. after(2)
allocate(buf(n))
before(1) = lbound(buf,1)
before(2) = ubound(buf,1)
call dummy (buf)
after(1) = lbound(buf,1)
after(2) = ubound(buf,1)

before(1) = LBOUND(buf2,1)
before(2) = UBOUND(buf2,1)
CALL dummy (buf2)
after(1) = LBOUND(buf2,1)
after(2) = UBOUND(buf2,1)
write(*,'(a20,2i5,l5)') "allocatable lbound", before(1), after(1), before(1) .eq. after(1)
write(*,'(a20,2i5,l5)') "allocatable ubound", before(2), after(2), before(2) .eq. after(2)

write(*,'(a20,2i5,l5)') "static lbound", before(1), after(1), before(1) .EQ. after(1)
write(*,'(a20,2i5,l5)') "static ubound", before(2), after(2), before(2) .EQ. after(2)
before(1) = lbound(buf2,1)
before(2) = ubound(buf2,1)
call dummy (buf2)
after(1) = lbound(buf2,1)
after(2) = ubound(buf2,1)

END PROGRAM
write(*,'(a20,2i5,l5)') "static lbound", before(1), after(1), before(1) .eq. after(1)
write(*,'(a20,2i5,l5)') "static ubound", before(2), after(2), before(2) .eq. after(2)
end program
Loading