Skip to content

Commit

Permalink
Merge branch 'devel' into elmerice
Browse files Browse the repository at this point in the history
  • Loading branch information
tzwinger committed Jul 15, 2024
2 parents e5d05db + 401bfa1 commit 77bbe42
Show file tree
Hide file tree
Showing 3,571 changed files with 15,084 additions and 12,402 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
96 changes: 96 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: build
on:
workflow_dispatch:
push:
pull_request:

concurrency: ci-${{ github.ref }}

jobs:

ubuntu:
# For available GitHub-hosted runners, see:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest

name: ubuntu (${{ matrix.compiler }})

strategy:
# Allow other runners in the matrix to continue if some fail
fail-fast: false

matrix:
compiler: [gcc]
include:
- compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
#- compiler: clang
# compiler-pkgs: "clang libomp-dev"
# cc: "clang"
# cxx: "clang++"

env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- name: get CPU information
run: lscpu

- name: checkout repository
uses: actions/checkout@v4

- name: install dependencies
run: |
sudo apt -qq update
sudo apt install -y ${{ matrix.compiler-pkgs }} cmake gfortran \
libopenblas-dev libopenmpi-dev libmumps-dev libparmetis-dev
- name: configure
run: |
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \
-DBLA_VENDOR="OpenBLAS" \
-DWITH_OpenMP=ON \
-DWITH_LUA=ON \
-DWITH_Zoltan=OFF \
-DWITH_Mumps=ON \
-DCREATE_PKGCONFIG_FILE=ON \
-DWITH_MPI=ON \
-DMPI_TEST_MAXPROC=2 \
-DMPIEXEC_PREFLAGS="--allow-run-as-root" \
..
- name: build
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --build .
- name: install
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --install .
- name: check
id: run-ctest
timeout-minutes: 150
run: |
cd ${GITHUB_WORKSPACE}/build
ctest -L quick
- name: Re-run tests
if: always() && (steps.run-ctest.outcome == 'failure')
timeout-minutes: 60
run: |
cd ${GITHUB_WORKSPACE}/build
echo "::group::Re-run failing tests"
ctest --rerun-failed --output-on-failure || true
echo "::endgroup::"
echo "::group::Log from these tests"
[ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log
echo "::endgroup::"
97 changes: 97 additions & 0 deletions .github/workflows/full-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: full-test
on:
workflow_dispatch:
schedule:
# Run job every Tuesday at 09:50 UTC
- cron: '50 09 * * 2'

concurrency: ci-${{ github.ref }}

jobs:

ubuntu:
# For available GitHub-hosted runners, see:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest

name: ubuntu (${{ matrix.compiler }})

strategy:
# Allow other runners in the matrix to continue if some fail
fail-fast: false

matrix:
compiler: [gcc]
include:
- compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
#- compiler: clang
# compiler-pkgs: "clang libomp-dev"
# cc: "clang"
# cxx: "clang++"

env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}

steps:
- name: get CPU information
run: lscpu

- name: checkout repository
uses: actions/checkout@v4

- name: install dependencies
run: |
sudo apt -qq update
sudo apt install -y ${{ matrix.compiler-pkgs }} cmake gfortran \
libopenblas-dev libopenmpi-dev libmumps-dev libparmetis-dev
- name: configure
run: |
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \
-DBLA_VENDOR="OpenBLAS" \
-DWITH_OpenMP=ON \
-DWITH_LUA=ON \
-DWITH_Zoltan=OFF \
-DWITH_Mumps=ON \
-DCREATE_PKGCONFIG_FILE=ON \
-DWITH_MPI=ON \
-DMPI_TEST_MAXPROC=2 \
-DMPIEXEC_PREFLAGS="--allow-run-as-root" \
..
- name: build
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --build .
- name: install
run: |
cd ${GITHUB_WORKSPACE}/build
cmake --install .
- name: check
id: run-ctest
timeout-minutes: 150
run: |
cd ${GITHUB_WORKSPACE}/build
ctest .
- name: Re-run tests
if: always() && (steps.run-ctest.outcome == 'failure')
timeout-minutes: 60
run: |
cd ${GITHUB_WORKSPACE}/build
echo "::group::Re-run failing tests"
ctest --rerun-failed --output-on-failure || true
echo "::endgroup::"
echo "::group::Log from these tests"
[ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log
echo "::endgroup::"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ run_mgdyn_tests.sh
fem/tests/CircuitsAndDynamics
slurm*out
ElmerGUI/CMakeLists.txt
result

# Test-generated files
fem/tests/**/TEST.PASSED
Expand Down
61 changes: 21 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type (Release, Debug, RelWithDebugInfo, MinSizeRel)")
ENDIF()

PROJECT(Elmer Fortran C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)

# CMAKE_VERSION seems to require this in minimum
CMAKE_MINIMUM_REQUIRED(VERSION 1.0.2)
PROJECT(Elmer Fortran C CXX)

IF(APPLE)
SET(CMAKE_MACOSX_RPATH 1)
Expand Down Expand Up @@ -89,6 +88,7 @@ SET(WITH_CONTRIB FALSE CACHE BOOL "Include contributed solvers")

SET(WITH_LUA FALSE CACHE BOOL "Include LUA extensions.")
SET(WITH_MMG FALSE CACHE BOOL "Compile with MMG library.")
SET(WITH_ROCALUTION FALSE CACHE BOOL "Compile with Rocalution library.")

SET(WITH_Zoltan FALSE CACHE BOOL "Link in Zoltan mesh repartitioning library.")

Expand Down Expand Up @@ -164,46 +164,18 @@ IF(WITH_EXTOPTIM)
ENDIF()

IF(WITH_OpenMP)
# Advanced properties
MARK_AS_ADVANCED(
OpenMP_C_FLAGS
OpenMP_Fortran_FLAGS
OpenMP_CXX_FLAGS
)
FIND_PACKAGE(OpenMP REQUIRED)

# Add OpenMP flags to compilation flags
# if(APPLE)
# if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
# set(OpenMP_C "${CMAKE_C_COMPILER}")
# set(OpenMP_C_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
# set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
# set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
# set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
# set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
# endif()
# if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
# set(OpenMP_CXX "${CMAKE_CXX_COMPILER}")
# set(OpenMP_CXX_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
# set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
# set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
# endif()
# else()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# endif()

# Test compiler support for OpenMP 4.0 features used
INCLUDE(testOpenMP40)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_OPENMP40)
# FIXME: Should link to the CMake targets instead
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")

# Set variables for supported OpenMP version
IF(OpenMP_Fortran_VERSION VERSION_GREATER_EQUAL 4.0)
SET(HAVE_OPENMP40 TRUE)
MARK_AS_ADVANCED(HAVE_OPENMP40)
# Test compiler support for advanced OpenMP 4.5 features used
INCLUDE(testOpenMP45)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_OPENMP45)
IF(OpenMP_Fortran_VERSION VERSION_GREATER_EQUAL 4.5)
SET(HAVE_OPENMP45 TRUE)
MARK_AS_ADVANCED(HAVE_OPENMP45)
ENDIF()
Expand All @@ -212,7 +184,7 @@ ENDIF()

# Get rid of the annoying rank mismatch warning
IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.9)
IF(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 9.9)
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
# SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy")
ENDIF()
Expand All @@ -237,6 +209,15 @@ IF(WITH_MPI)
SET(CMAKE_Fortran_REQUIRED_LIBRARIES ${MPI_Fortran_LIBRARIES})
ENDIF(WITH_MPI)


IF (WITH_ROCALUTION)
SET(HAVE_ROCALUTION TRUE)
MARK_AS_ADVANCED(HAVE_ROCALUTION)
INCLUDE_DIRECTORIES("${ROCALUTION_INCLUDE_DIR}")
# LINK_DIRECTORIES("${ROCALUTION_LINK_DIRECTORIES}")
ENDIF()


IF(WITH_AMGX)
FIND_PACKAGE(AMGX)
ENDIF()
Expand Down
Empty file modified ElmerGUI/Application/Application.pro
100755 → 100644
Empty file.
Empty file modified ElmerGUI/Application/ElmerGUI.qrc
100755 → 100644
Empty file.
Empty file modified ElmerGUI/Application/ElmerGUI.rc
100755 → 100644
Empty file.
Empty file modified ElmerGUI/Application/icons/Mesh3D.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified ElmerGUI/Application/images/bgimage.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 3 additions & 15 deletions ElmerGUI/Application/plugins/egconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ int LoadAbaqusInput(struct FemType *data,struct BoundaryType *bound,
if(allocated) {
if(info) printf("Loading boundary set %d for side %d of %s\n",bcind+newsurface,side,entityname);
k = bcind+newsurface;
if(k>MAXBCS) bigerror("Boundary set larger than MAXBCS!");
if(!data->boundaryname[k]) data->boundaryname[k] = Cvector(0,MAXNAMESIZE);
strcpy(data->boundaryname[k],entityname);
data->boundarynamesexist = TRUE;
Expand All @@ -738,6 +739,7 @@ int LoadAbaqusInput(struct FemType *data,struct BoundaryType *bound,
sscanf(pstr,"%s",entityname);
if(allocated) {
if(info) printf("Loading element to body %d from %s\n",bodyid,entityname);
if(bodyid>MAXBODIES) bigerror("Body set larger than MAXBODIES!");
if(!data->bodyname[bodyid]) data->bodyname[bodyid] = Cvector(0,MAXNAMESIZE);
strcpy(data->bodyname[bodyid],entityname);
data->bodynamesexist = TRUE;
Expand Down Expand Up @@ -1770,23 +1772,15 @@ int LoadFidapInput(struct FemType *data,struct BoundaryType *boundaries,char *pr
elems,nodes,entityname);

for(entity=1;entity<=maxentity;entity++) {
#if 0
k = strcmp(entityname,entitylist[entity]);
#else
if(!data->bodyname[entity]) break;
k = strcmp(entityname,data->bodyname[entity]);
#endif
if(k == 0) break;
}

if(entity > maxentity) {
maxentity++;
#if 0
strcpy(entitylist[entity],entityname);
#else
if(!data->bodyname[entity]) data->bodyname[entity] = Cvector(0,MAXNAMESIZE);
strcpy(data->bodyname[entity],entityname);
#endif
if(info) printf("Found new entity: %s\n",entityname);
}

Expand Down Expand Up @@ -2331,6 +2325,7 @@ int LoadAnsysInput(struct FemType *data,struct BoundaryType *bound,
bcind = i;
bctypeused[bcind] = TRUE;
if(0) printf("First unused boundary is of type %d\n",bcind);
if(bcind>MAXBCS) bigerror("bcind larger than MAXBCS!");
if(!data->boundaryname[bcind]) data->boundaryname[bcind] = Cvector(0,MAXNAMESIZE);
strcpy(data->boundaryname[bcind],text);

Expand Down Expand Up @@ -2953,15 +2948,8 @@ int LoadMeditInput(struct FemType *data,struct BoundaryType *bound,

for(i=1; i <= noknots; i++) {
GETLINE;
#if 0
printf("i=%d line=%s",i,line);
#endif
if(allocated) {
cp = line;
#if 0
printf("cp = %s",cp);
#endif

data->x[i] = next_real(&cp);
data->y[i] = next_real(&cp);
if(dim > 2) data->z[i] = next_real(&cp);
Expand Down
Loading

0 comments on commit 77bbe42

Please sign in to comment.