Skip to content

Commit

Permalink
Merge pull request #28 from gridap/gridap_0.16
Browse files Browse the repository at this point in the history
Bunch of tentative changes required to upgrade GridapPardiso to Gridap 0.16
  • Loading branch information
fverdugo authored Jul 27, 2021
2 parents 5adaafd + 1c53fe9 commit e1ccca8
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 151 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI
on: [push, pull_request]
jobs:
test:
name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
env:
MKLROOT: /opt/intel/mkl/
strategy:
fail-fast: false
matrix:
version:
- '1.6'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: myci-actions/add-deb-repo@8
with:
repo: deb [trusted=yes] https://apt.repos.intel.com/mkl all main
repo-name: mkl
# keys:
key-server: https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
install: intel-mkl-64bit-2019.5-075
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
# - run: if [ `getconf LONG_BIT` = "64" ];then source /opt/intel/mkl/bin/mklvars.sh intel64;else source /opt/intel/mkl/bin/mklvars.sh ia32; fi
- run: ls -l /opt/intel/mkl/bin/
- run: echo $MKLROOT
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info

docs:
name: Documentation
env:
MKLROOT: /opt/intel/mkl/
runs-on: ubuntu-latest
steps:
- uses: myci-actions/add-deb-repo@8
with:
repo: deb [trusted=yes] https://apt.repos.intel.com/mkl all main
repo-name: mkl
# keys:
key-server: https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
install: intel-mkl-64bit-2019.5-075
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
- uses: julia-actions/julia-buildpkg@v1
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
# - run: |
# julia --project=docs -e '
# using Documenter: doctest
# using Gridap
# doctest(Gridap)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name = "GridapPardiso"
uuid = "34aa2546-dee6-11e9-014e-739fa02ec06f"
authors = ["Francesc Verdugo <[email protected]>", "Víctor Sande <[email protected]>"]
version = "0.4.2"
version = "0.5.0"

[deps]
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1"

[compat]
Gridap = "0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14"
Gridap = "0.15,0.16"
julia = "1"

[extras]
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,30 @@ solve!(x, ns, b)
```julia
using Gridap
using GridapPardiso
using SparseMatricesCSR

# Define the FE problem
# -Δu = x*y in (0,1)^3, u = 0 on the boundary.

model = CartesianDiscreteModel((0,1,0,1,0,1), (10,10,10))

V = TestFESpace(reffe=:Lagrangian, order=1, valuetype=Float64,
conformity=:H1, model=model, dirichlet_tags="boundary")

order=1
reffe = ReferenceFE(lagrangian,Float64,order)
V = FESpace(model,
reffe,
conformity=:H1,
dirichlet_tags="boundary")
U = TrialFESpace(V)

trian = get_triangulation(model)
quad = CellQuadrature(trian,2)
= Measure(trian,2)

t_Ω = AffineFETerm(
(u,v) -> inner((v),(u)),
(v) -> inner(v, (x) -> x[1]*x[2] ),
trian, quad)
a(u,v)=((v)(u))dΩ
f(x)=x[1]*x[2]
l(v)=(v*f)dΩ

op = AffineFEOperator(SparseMatrixCSR{1,Float64,Int},U,V,t_Ω)
assem = SparseMatrixAssembler(SparseMatrixCSR{1,Float64,Int},Vector{Float64},U,V)
op = AffineFEOperator(a,l,U,V,assem)

ls = PardisoSolver(op)
solver = LinearFESolver(ls)
Expand Down
17 changes: 16 additions & 1 deletion src/GridapPardiso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module GridapPardiso

using Libdl
using SparseArrays
using SparseMatricesCSR
using Gridap.Algebra
using Gridap.FESpaces
using Gridap.Helpers
Expand Down Expand Up @@ -48,7 +49,7 @@ const MKL_PARDISO_LOADED = Ref(false)

function __init__()

if MKL_FOUND
if MKL_FOUND
libmkl = load_mkl_gcc(mkllibdir,gcclibdir)

pardisoinit_sym[] = Libdl.dlsym(libmkl,:pardisoinit)
Expand All @@ -72,6 +73,20 @@ include("bindings.jl")

include("PardisoParameters.jl")

getptr(S::SparseMatrixCSC) = S.colptr
getptr(S::SparseMatrixCSR) = S.rowptr
getptr(S::SymSparseMatrixCSR) = getptr(S.uppertrian)

getindices(S::SymSparseMatrixCSR) = colvals(S)
getindices(S::SparseMatrixCSC) = rowvals(S)
getindices(S::SparseMatrixCSR) = colvals(S)

hascolmajororder(::Type{<:SymSparseMatrixCSR}) = false
hascolmajororder(a::SymSparseMatrixCSR) = hascolmajororder(SymSparseMatrixCSR)
hascolmajororder(::Type{<:SparseMatrixCSC}) = true
hascolmajororder(a::SparseMatrixCSC) = hascolmajororder(SparseMatrixCSC)
hascolmajororder(a::SparseMatrixCSR) = false

include("LinearSolver.jl")


Expand Down
Loading

5 comments on commit e1ccca8

@amartinhuertas
Copy link
Member

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/41578

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" e1ccca82ee6080a62bf24219ad6c4a78d7aaac47
git push origin v0.5.0

@fverdugo
Copy link
Member Author

Choose a reason for hiding this comment

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

@amartinhuertas the CI has failed! Please, cancel the registration process until we understand what is happening. The tests in the PR passed...

@amartinhuertas
Copy link
Member

Choose a reason for hiding this comment

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

The CI jobs actually passed ... only documenter/deploy failed. Why?

@amartinhuertas
Copy link
Member

Choose a reason for hiding this comment

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

The CI jobs actually passed ... only documenter/deploy failed. Why?

Ok, solved. The secret/ssh key was missing. No need to cancel registration process.

Please sign in to comment.