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

Fix typo in CI rules for OpenMP on Ubuntu runners. #552

Merged
merged 5 commits into from
Sep 1, 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
36 changes: 30 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false

matrix:
compiler: [gcc, clang]
compiler: [gcc]
mpi: [with]
openmp: [with]
include:
Expand All @@ -35,26 +35,35 @@ jobs:
cc: "gcc"
cxx: "g++"
openmp: with
openmp-cmake-flags: "-WITH_OpenMP=ON"
openmp-cmake-flags: "-DWITH_OpenMP=ON"
- compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
mpi: without
openmp: with
openmp-cmake-flags: "-WITH_OpenMP=ON"
openmp-cmake-flags: "-DWITH_OpenMP=ON"
- compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
mpi: with
openmp: without
openmp-cmake-flags: "-WITH_OpenMP=OFF"
openmp-cmake-flags: "-DWITH_OpenMP=OFF"
- compiler: clang
compiler-pkgs: "clang"
cc: "clang"
cxx: "clang++"
openmp-cmake-flags: "-WITH_OpenMP=ON -DOpenMP_C_FLAGS=-fopenmp=libgomp -DOpenMP_CXX_FLAGS=-fopenmp=libgomp"
mpi: with
openmp: without
openmp-cmake-flags: "-DWITH_OpenMP=OFF"
# - compiler: clang
# compiler-pkgs: "clang libomp-dev"
# cc: "clang"
# cxx: "clang++"
# mpi: with
# openmp: with
# openmp-cmake-flags: "-DWITH_OpenMP=ON -DOpenMP_C_FLAGS='-fopenmp=libgomp -D_OPENMP=201511' -DOpenMP_CXX_FLAGS='-fopenmp=libgomp -D_OPENMP=201511' -DOpenMP_C_LIB_NAMES='gomp;pthread' -DOpenMP_CXX_LIB_NAMES='gomp;pthread'"

env:
CC: ${{ matrix.cc }}
Expand Down Expand Up @@ -119,7 +128,7 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
ctest -L quick -j$(nproc)
set -o pipefail && ctest -L quick -j$(nproc) . | tee ./ctest_output.log

- name: Re-run tests
if: always() && (steps.run-ctest.outcome == 'failure')
Expand All @@ -128,6 +137,21 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
failed_tests=($(sed -n 's/^.*#[0-9]*\:\s*\(\S*\).*Failed.*/\1/p' ./ctest_output.log))
for test in "${failed_tests[@]}"; do
echo "::group::Content of fem/tests/${test}"
echo ---- Files ----
ls -Rl fem/tests/${test}
if [ -f fem/tests/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat fem/tests/${test}/test-stderr*.log
fi
if [ -f fem/tests/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat fem/tests/${test}/test-stdout*.log
fi
echo "::endgroup::"
done
echo "::group::Re-run failing tests"
ctest --rerun-failed --output-on-failure || true
echo "::endgroup::"
Expand Down
20 changes: 10 additions & 10 deletions ElmerGUI/matc/src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,27 +722,27 @@ VARIABLE *evalclause(root) CLAUSE *root;
{
VARIABLE *var;
char *r;

/*
* VARIABLE name
*/
r = SDATA(root->this);

/*
* check for name conflicts
* check for name conflicts
*/
if (fnc_check(r) || com_check(r) || lst_find(CONSTANTS, r))
{
error( "VARIABLE not created [%s], identifier in use.\n ", r);
}
if ((res = evaltree(LINK(root->this))) != NULL)

if ((res = evaltree(LINK(root->this))) != NULL)
{
var_delete(r);
var = var_new(r,TYPE(res),1,1);
if ((var = var_check(r)) == NULL)
var = var_new(r,TYPE(res),1,1);

d = MATR(res);
for(i = 0; i < NCOL(res)*NROW(res); i++)
for(i = 0; i < NCOL(res)*NROW(res); i++)
{
*MATR(var) = *d++;
ptr = evalclause(LINK(root));
Expand All @@ -753,7 +753,7 @@ VARIABLE *evalclause(root) CLAUSE *root;
root = root->jmp;
break;
}
}
}
root = LINK(root);
}
return ptr;
Expand Down
20 changes: 10 additions & 10 deletions matc/src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,27 +723,27 @@ VARIABLE *evalclause(root) CLAUSE *root;
{
VARIABLE *var;
char *r;

/*
* VARIABLE name
*/
r = SDATA(root->this);

/*
* check for name conflicts
* check for name conflicts
*/
if (fnc_check(r) || com_check(r) || lst_find(CONSTANTS, r))
{
error( "VARIABLE not created [%s], identifier in use.\n ", r);
}
if ((res = evaltree(LINK(root->this))) != NULL)

if ((res = evaltree(LINK(root->this))) != NULL)
{
var_delete(r);
var = var_new(r,TYPE(res),1,1);
if ((var = var_check(r)) == NULL)
var = var_new(r,TYPE(res),1,1);

d = MATR(res);
for(i = 0; i < NCOL(res)*NROW(res); i++)
for(i = 0; i < NCOL(res)*NROW(res); i++)
{
*MATR(var) = *d++;
ptr = evalclause(LINK(root));
Expand All @@ -754,7 +754,7 @@ VARIABLE *evalclause(root) CLAUSE *root;
root = root->jmp;
break;
}
}
}
root = LINK(root);
}
return ptr;
Expand Down
22 changes: 12 additions & 10 deletions post/matc/src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ VARIABLE *evalclause(root) CLAUSE *root;
FILE *fp = popen( SDATA(root->this), "r" );
#endif
static char s[101];
#pragma omp threadprivate (s)

if ( !fp ) error( "systemcall: open failure: [%s].\n", SDATA(root->this) );

Expand Down Expand Up @@ -722,27 +723,27 @@ VARIABLE *evalclause(root) CLAUSE *root;
{
VARIABLE *var;
char *r;

/*
* VARIABLE name
*/
r = SDATA(root->this);

/*
* check for name conflicts
* check for name conflicts
*/
if (fnc_check(r) || com_check(r) || lst_find(CONSTANTS, r))
{
error( "VARIABLE not created [%s], identifier in use.\n ", r);
}
if ((res = evaltree(LINK(root->this))) != NULL)

if ((res = evaltree(LINK(root->this))) != NULL)
{
var_delete(r);
var = var_new(r,TYPE(res),1,1);
if ((var = var_check(r)) == NULL)
var = var_new(r,TYPE(res),1,1);

d = MATR(res);
for(i = 0; i < NCOL(res)*NROW(res); i++)
for(i = 0; i < NCOL(res)*NROW(res); i++)
{
*MATR(var) = *d++;
ptr = evalclause(LINK(root));
Expand All @@ -753,7 +754,7 @@ VARIABLE *evalclause(root) CLAUSE *root;
root = root->jmp;
break;
}
}
}
root = LINK(root);
}
return ptr;
Expand All @@ -765,6 +766,7 @@ VARIABLE *put_values(ptr, resname, par) VARIABLE *ptr, *par; char *resname;
^=====================================================================*/
{
static double defind = 0.0;
#pragma omp threadprivate (defind)

double *ind1,
*ind2,
Expand Down
Loading