Repository navigation
Change the CISM license from LGPL to Apache 2.0 with LLVM exceptions - #119
Draft
whlipscomb wants to merge 11 commits into
Draft
whlipscomb wants to merge 11 commits into
whlipscomb wants to merge 11 commits into
Conversation
…ADME LICENSE now holds the Apache License, Version 2.0, with the LLVM exceptions (SPDX identifier Apache-2.0 WITH LLVM-exception), as used by CVMix since its PR #103. The Apache text is the official text from apache.org. The exceptions waive the attribution conditions for portions embedded in compiled code, and allow the parts of the license that conflict with GPLv2 to be waived when CISM is combined with GPLv2 code. COPYING (GPL v3) and COPYING.LESSER (LGPL v3), the texts of the previous license, are removed. The licensing section of README states the new license and lists the third-party code that keeps its own terms: SLAP (public domain), the reference BLAS in glimmer_solve/blas, cism_reprosum_mod (3-Clause BSD, from E3SM) and the optional GPTL library in utils/libgptl. BLAS and cism_reprosum_mod were not mentioned before. The file headers are changed in the following commits. This PR is to be merged only after the CISM authors have agreed to the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All 119 Fortran files with a license header (in cism_shared, glissade, glint, glide, glad, cism_driver and glimmer_solve) had the same LGPL block. It is replaced, by script, with: - Copyright (C) 2005-2026 (was 2005-2018, or 2005-2017 in glissade_inversion), CISM contributors (see AUTHORS); - an SPDX line, SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception; - the Apache 2.0 notice, naming the LLVM exceptions and pointing to the LICENSE file. The file name line above the block and the module descriptions below it are unchanged. A script checked that each file differs from the previous version only in this block. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
utils/build/generate_ncvars.py (which generates the I/O code from the *_vars.def files) and utils/f90_dependency_tool/f90_dependencies.py had an old Glimmer-CISM header under the GNU General Public License, version 2 or later, with a pointer to the BerliOS hosting site, which closed in 2014. Like the rest of CISM, they were written by CISM contributors; their headers now match the Fortran files (Apache 2.0 with LLVM exceptions, SPDX line), with '#' comments. Comments only. (f90_dependencies.py is Python 2 code and is not used by the CMake build; it is unchanged otherwise.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These CISM files had no license header; they now have the same header
as the Fortran files (Apache 2.0 with LLVM exceptions, SPDX line):
- the seven *_vars.def files (glad, glide, glint, glissade), which
generate_ncvars.py reads to write the I/O code ('#' comments, which
the config parser skips);
- glide_mask.inc and glide_nan.inc ('!' comments);
- CMakeLists.txt and cism_driver/CMakeLists.txt (CRLF line endings
kept);
- the build scripts in utils/build (autocopy-to-build-dir,
autogenerate-in-build-dir, autogen-for-glint-and-glad-in-build-dir)
and config.inc.cmake.in;
- the scripts in utils/config_reorg.
In scripts, the header follows the #! line.
Files in tests/, builds/ and doc/ are covered by the LICENSE file and get
no header. Third-party code keeps its own terms (see README).
No answer changes: the generated I/O code is identical (apart from the
generation time stamp), and the code builds with intel and gnu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cism_reprosum_mod.F90 is adapted from shr_reprosum_mod in E3SM (share/util), starting from Pat Worley's 2023 revisions (E3SM PRs #5534, #5549, #5560), as its notes say. E3SM is distributed under the 3-Clause BSD license, which requires that redistributed source keep the copyright notice, conditions and disclaimer; the file had no license text. It now starts with a header that names its origin and reproduces E3SM's BSD notice (from E3SM's LICENSE file), with SPDX-License-Identifier: BSD-3-Clause. This file keeps the BSD terms; the rest of CISM is Apache 2.0 with LLVM exceptions (see README). Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oocsr coicsr and coocsr convert a sparse matrix from coordinate to compressed sparse row format. They came from Yousef Saad's SPARSKIT2, which is released under the LGPL, and were converted to Fortran 90 by Jesse Johnson in 2009. Nothing in CISM calls them: the SLAP interface uses CISM's own format conversions and sorts in this module. They are removed, so that no LGPL code remains in CISM when its license changes. No answer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tils
glide_bwater, glint_routing and glissade_basal_hydro each had a copy of
indexx and q_sort_index, an index sort used to order cells by height
for flux routing of basal water (Glide, Glissade) and of runoff (Glint).
The comments said the routines were Ian Rutt's Fortran conversion of a
quicksort by Michael Lamont, written in C and issued under the GNU
General Public License, so they could not be relicensed with the rest
of CISM.
The three copies are replaced by index_sort in glimmer_utils, written
from scratch: a bottom-up (non-recursive) merge sort, which returns the
indices of the values from lowest to highest and keeps entries with
equal values in their original order. Being non-recursive, it also
removes the stack overflow noted in sort_heights ("the code can fail
here because of too much recursion").
Tested against the old routine on 4000 random arrays of up to 3000
values: for distinct values the two give identical indices; with ties,
both give the same sorted values, but equal values may come in a
different order (the new sort is stable, the old one was not).
Answer changes: possible in runs that use flux routing (Glissade
bwat_method = flux_routing, the Glide and Glint equivalents) where
cells have exactly equal heights, which happens in depressions filled by
fill_depressions. Flux routing is still in development, and no test
uses it. Other runs are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…quicksorts glissade_glacier had two recursive quicksorts: quicksort (for integer arrays, never called) and glacier_quicksort (the same code for the glacier_info type), which sorts the glacier cells by RGI ID at initialization. The code closely follows a public Fortran quicksort that is distributed under the GPL (version 3), so it is replaced before CISM's license changes. The new subroutine sort_glacier_list sorts the cells by calling index_sort from glimmer_utils and reordering the list; the i and j indices of each cell move with its ID, as before. The unused quicksort and the commented-out code that tested it are removed. The sorted IDs are the same as before; only the order of cells with the same ID can differ (index_sort is stable). The code that follows uses only the ID of each cell (to count the glaciers and fill cism_glacier_id), so answers do not change. Checked with the Alps test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(preliminary) The license headers name the "CISM contributors - see AUTHORS file". AUTHORS now has two lists: - contributors to the current code: people who contributed to code that is part of the current version of CISM (including intellectual contributions, such as the ideas behind the accelerated Picard solver and the slab test); - past contributors: people who contributed to earlier versions, in code that has since been removed. Affiliations are those at which each person contributed, with an asterisk for an affiliation the person has since left. A closing note credits code from other projects (the CICE remapping scheme, and the reproducible sums from E3SM). Compared with the old list, people whose code is no longer in CISM (e.g. the Trilinos and Albany-FELIX interfaces, the PB&J and JFNK solvers, PHAML) move to the past contributors, and people whose contributions are in the current code but who were not listed are added. The lists were checked against the git history. This is a preliminary version: it may change, after conversations with some of the authors, before this PR is merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FUNDING now starts with the current acknowledgement: CISM is developed primarily at the NSF National Center for Atmospheric Research, sponsored by the National Science Foundation under Cooperative Agreement No. 1852977, with computing and data storage resources, including the Derecho supercomputer, provided by CISL at NSF NCAR. The existing table of agencies and programs follows as the earlier support, with the name of the U.K. agency corrected (Natural Environment Research Council). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README (edits by Bill, with typo fixes): - the introduction describes CISM as the dynamic ice sheet component of CESM, links to the CISM repository on GitHub, and notes that the documentation for CISM 2.1 is the latest, with documentation for CISM 3.0 in preparation for the CESM 3.0 release; - the old link to the documentation source repository and the section pointing to the CISM 2.1 build instructions are removed; - issues are reported at https://github.com/ESCOMP/CISM/issues (the old link pointed to the former cism/cism repository); - help with building and running CISM comes from the liaisons of the CESM Land Ice Working Group; - wording, typos, the numbering of the mailing lists and the heading underlines are fixed. NEWS described the CISM 2.0 release (2014) and linked to an old documentation repository; it is removed. A new NEWS file may be written for the CESM 3.0 release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
lipscomb/apache_license(11 commits, 7f64df5..1cee499)Base:
lipscomb/shared_cleanup(#118). Stacked; the base will be changed tomainafter the earlier PRs are merged.CISM-wrapper: no change needed.
Do not merge yet. This PR is to be merged only after the CISM authors have agreed to the change of license. The AUTHORS file is preliminary and may change after conversations with some of the authors.
Summary
CISM has been distributed under the Lesser GNU General Public License (LGPL), version 3 or later. This PR changes it to the Apache License, Version 2.0, with LLVM exceptions (SPDX identifier
Apache-2.0 WITH LLVM-exception), the license CVMix adopted in its PR #103. The LLVM exceptions waive the attribution conditions for portions embedded in compiled code, and allow the parts of the license that conflict with GPLv2 to be waived when CISM is combined with GPLv2 code.There are no answer changes in the standard tests. Answers can change only in runs with flux routing of basal water, which is still in development and not used in any test (see below).
Changes
LICENSE and README (7f64df5). LICENSE holds the Apache 2.0 text (the official text from apache.org) followed by the LLVM exceptions. COPYING (GPL v3) and COPYING.LESSER (LGPL v3) are removed. The licensing section of README states the new license and lists the third-party code that keeps its own terms.
File headers (adb52b9, a8c1d4f, 9ae478d). Every CISM source file now has this header (with
!or#comments):generate_ncvars.pyandf90_dependencies.pyhad an old Glimmer-CISM header under the GPL (version 2 or later); they get the new header.*_vars.deffiles,glide_mask.incandglide_nan.inc, bothCMakeLists.txtfiles, the build scripts inutils/buildandconfig.inc.cmake.in, and the scripts inutils/config_reorg.Files in
tests/,builds/anddoc/get no header; they are covered by the LICENSE file.Third-party code. A review of the source for code from other projects found the following:
glimmer_solve/SLAPglimmer_solve/blasutils/libgptlcism_reprosum_modshr_reprosum_modin E3SM (3-Clause BSD)SPDX-License-Identifier: BSD-3-Clausecoicsr,coocsringlimmer_sparse_typeindexx,q_sort_indexinglide_bwater,glint_routing,glissade_basal_hydroindex_sortinglimmer_utilsquicksort,glacier_quicksortinglissade_glacierindex_sort(
testsfg.F90, code from PISM under the GPL, was removed in #118.)index_sort(05bada8, c5e3b44). The new routine, written from scratch, is a bottom-up (non-recursive) merge sort that returns the indices of the values from lowest to highest and keeps equal values in their original order. Being non-recursive, it also removes the stack overflow noted insort_heights. Tested against the old routine on 4000 random arrays of up to 3000 values: for distinct values the two give identical indices; with ties, both give the same sorted values, but equal values may come in a different order. Answers may therefore change in runs with flux routing (bwat_method = flux_routing, and the Glide and Glint equivalents) where cells have equal heights, as in filled depressions; flux routing is still in development, and no test uses it. Inglissade_glacier, the code after the sort uses only the ID of each cell, so the glacier initialization is unchanged (checked with the Alps test).AUTHORS (8108569, preliminary). Two lists: contributors to the current code (the "CISM contributors" named in the headers, including intellectual contributions) and past contributors, whose code has since been removed. Affiliations are those at which each person contributed, with an asterisk for an affiliation the person has since left. A closing note credits code from other projects (the CICE remapping scheme, and the reproducible sums from E3SM). The lists were checked against the git history; they may change after conversations with some of the authors.
FUNDING (ec0046f). Starts with the current acknowledgement of NSF NCAR support (Cooperative Agreement No. 1852977, and CISL computing resources including Derecho), followed by the earlier funding agencies; the name of the U.K. agency is corrected (Natural Environment Research Council).
README and NEWS (1cee499). README describes CISM as the dynamic ice sheet component of CESM, links to the repository, notes that documentation for CISM 3.0 is in preparation for the CESM 3.0 release, points to https://github.com/ESCOMP/CISM/issues for reporting issues, and names the CESM Land Ice Working Group liaisons for help. NEWS, which described the CISM 2.0 release (2014), is removed.
Testing
*_vars.deffiles is unchanged (apart from the generation time stamp).Commits
🤖 Generated with Claude Code