Skip to content

Commit

Permalink
Merge pull request #9 from jchristopherson/v1.5.4
Browse files Browse the repository at this point in the history
V1.5.4
  • Loading branch information
jchristopherson authored Jan 22, 2025
2 parents c534f2c + 51c9ec7 commit 81a6d04
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 18 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/fpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [10] # Version of GFortran we want to use.
gcc_v: [12] # Version of GFortran we want to use.
include:
- os: ubuntu-latest
os-arch: linux-x86_64
Expand All @@ -22,26 +22,25 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1

- name: Install GFortran macOS
if: contains(matrix.os, 'macos')
run: |
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
which gfortran-${GCC_V}
which gfortran
- name: Install GFortran Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: Install BLAS & LAPACK
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install libopenblas-dev liblapack-dev
- name: Install fpm
uses: fortran-lang/setup-fpm@v3
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.8.2'
fpm-version: 'v0.10.1'

- name: Build the library
- name: Build LINALG
run: |
gfortran --version
fpm build
Expand Down Expand Up @@ -86,8 +85,8 @@ jobs:
fail-fast: false

env:
FPM_FC: ifort
FC: ifort
FPM_FC: ifx
FC: ifx

steps:
- name: Checkout code
Expand All @@ -110,14 +109,21 @@ jobs:
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- name: Install MKL
run: |
sudo apt-get update
sudo apt-get -y install intel-mkl
sudo apt update
sudo apt -y install intel-mkl
- name: Install fpm
uses: fortran-lang/setup-fpm@v3
with:
fpm-version: 'v0.8.2'

- name: fpm build
run: |
ifort --version
ifx --version
fpm --version
fpm build --profile debug --flag "-warn nointerfaces"
Expand Down
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.24)
project(
nonlin
LANGUAGES Fortran
VERSION 1.5.3
VERSION 1.5.4
)

# Get helper macros and functions
Expand All @@ -17,6 +17,18 @@ find_package(BLAS)
find_package(LAPACK)
add_subdirectory(dependencies)

if (NOT BLAS_FOUND OR NOT LAPACK_FOUND)
message(STATUS "BLAS/LAPACK could not be found. A reference version will be employed.")
include(FetchContent)
FetchContent_Declare(
lapack
GIT_REPOSITORY "https://github.com/Reference-LAPACK/lapack"
)
FetchContent_MakeAvailable(lapack)
set(BLAS_LIBRARIES blas)
set(LAPACK_LIBRARIES lapack)
endif()

# Source
add_subdirectory(src)
add_fortran_library(
Expand Down
2 changes: 1 addition & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "nonlin"
version = "1.5.3"
version = "1.5.4"
license = "GPL-3.0"
author = "Jason Christopherson"
maintainer = "Jason Christopherson"
Expand Down
3 changes: 2 additions & 1 deletion src/nonlin_constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
!! To provide various constants used by the NONLIN library.
module nonlin_constants
use, intrinsic :: iso_fortran_env, only : int32
use linalg
use linalg_errors, only : LA_OUT_OF_MEMORY_ERROR, LA_CONVERGENCE_ERROR, &
LA_INVALID_OPERATION_ERROR
implicit none

! ******************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion src/nonlin_optimize.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module nonlin_optimize
use nonlin_constants
use nonlin_core
use linalg, only : rank1_update, tri_mtx_mult, cholesky_rank1_update, &
cholesky_rank1_downdate, solve_cholesky, LA_MATRIX_FORMAT_ERROR
cholesky_rank1_downdate, solve_cholesky
use linalg_errors, only : LA_MATRIX_FORMAT_ERROR
implicit none
private
public :: nelder_mead
Expand Down

0 comments on commit 81a6d04

Please sign in to comment.