Skip to content

Commit 6196180

Browse files
committed
remove sqlite and material db commands
update build instructions
1 parent e89de38 commit 6196180

45 files changed

Lines changed: 258 additions & 1516 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎BUILD.md‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# DEVSIM Installation from source
2+
3+
## Introduction
4+
5+
6+
It is usually not necessary to build from source, however the instructions below are provided If you need support, please post a message at [https://forum.devsim.org](https://forum.devsim.org).
7+
8+
9+
## Prerequisites
10+
11+
An Anaconda (or Miniconda) installation is optional for `Linux` and `macOS`, but is highly recommended for `Windows`. The full package may be downloaded from [https://anaconda.com](https://anaconda.com). The minimal install is available from. [https://docs.anaconda.com/free/miniconda/](https://docs.anaconda.com/free/miniconda/)
12+
13+
14+
For `x86_64` or `x64` systems, the Intel MKL is recommended, but it is not needed for building the application.
15+
16+
## Setting Version Number
17+
18+
Set the version number by changing `DEVSIM_VERSION_STRING` in `CMakeLists.txt`. The `version` also needs to be changed in `dist/bdist_wheel/setup.cfg`.
19+
20+
## Platform Instructions
21+
22+
### Linux
23+
24+
#### Building Red Hat 7 compatible version
25+
26+
The `Centos 7` compatible [manylinux2014](https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux2014-centos-7-based-glibc-217) distribution is used for binary Linux releases, as it is forward compatible with most Linux distributions and used the Intel MKL. It will install all required dependencies, including Anaconda Python. It is recommended to run this in a docker image.
27+
28+
First download the source on your host Linux machine:
29+
```
30+
git clone https://github.com/devsim/devsim
31+
cd devsim
32+
git submodule init
33+
git submodule update
34+
```
35+
36+
Then to build on the local system, use
37+
```
38+
bash scripts/build_manylinux2014.sh version
39+
```
40+
41+
or in a docker image.
42+
```
43+
bash scripts/build_docker_manylinux2014.sh version
44+
```
45+
46+
Note `version` is replaced with the desired version. There should then be a Python `.whl` file in the `dist` directory.
47+
48+
#### Other Linux Distributions
49+
50+
Additional build scripts are available for `Ubuntu` and `Fedora` in the `scripts` directory.
51+
52+
53+
### Building macOS
54+
55+
The macOS release version is built using a Travis build server (see `.travis.yml`), but it can be built locally with the following prerequisites:
56+
57+
* Xcode
58+
* Homebrew [https://brew.sh/](https://brew.sh/)
59+
60+
The rest of the components, including Anaconda Python and various build components are downloaded and installed in the scripts below.
61+
62+
```
63+
git clone https://github.com/devsim/devsim.git
64+
cd devsim
65+
git submodule init
66+
git submodule update
67+
bash scripts/build_macos.sh clang version
68+
```
69+
70+
where `version` is replaced with the desired version. The Python wheel file is then in `devsim/dist`
71+
Note that the resulting package file does not have any dependencies on Homebrew to run.
72+
73+
### Building on Windows
74+
75+
***Please note that the Windows build scripts will make changes to an existing MSYS 2 installation. It will also create new Anaconda environments.***
76+
77+
#### Visual Studio 2022 version
78+
79+
This version requires installing:
80+
81+
* Anaconda Python (or Miniconda)
82+
* MSYS 2 [https://www.msys2.org/](https://www.msys2.org/)
83+
* Microsoft Visual Studio 2022 [https://visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/)
84+
85+
as well as the prerequisites for the MSYS version above.
86+
87+
From a Anaconda environment command prompt:
88+
89+
```
90+
scripts\build_appveyor.bat x64 conda version
91+
```
92+
93+
where `version` is replaced with the desired version name. The Python wheel file is then in the `dist` directory.
94+

‎CHANGES.md‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,38 @@
55

66
Please see the release notes in ``doc/devsim.pdf`` or at [https://devsim.net](https://devsim.net) for more detailed information about changes.
77

8+
## Version 2.8.1
9+
10+
### Help Files
11+
12+
Updated instructions. Added additional documentation files.
13+
14+
| File | Purpose |
15+
| --- | --- |
16+
| [BUILD.md](BUILD.md) | Building from source |
17+
| [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | Code of conduct |
18+
| [TEST.md](TEST.md) | Testing instructions |
19+
20+
and removed [install.py](install.py).
21+
22+
### Database Command Removal
23+
24+
Remove commands:
25+
26+
* `create_db`
27+
* `open_db`
28+
* `close_db`
29+
* `save_db`
30+
* `add_db_entry`
31+
* `get_db_entry`
32+
33+
This feature was not used in any example or well documented. This also removes the binary dependence on SQLite.
34+
835
## Version 2.8.0
936

1037
### Python Scripts
1138

12-
Based on a contribution by [@simbilod](https://github.com/simbilod), all of the Python scripts have been reformatted. The build system was also updated to enforce Python script modifiecations are properly formatted when submitted to the project.
39+
Based on a contribution by [@simbilod](https://github.com/simbilod), all of the Python scripts have been reformatted. The build system was also updated to enforce Python script modifications are properly formatted when submitted to the project.
1340

1441
### Data output
1542

‎CMakeLists.txt‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ OPTION(EIGEN_DENSE_EXTENDED "Use eigen for the dense matrix in extended precisio
1111
OPTION(EIGEN_DENSE_DOUBLE "Use eigen for the dense matrix in double precision" OFF)
1212
OPTION(SUPERLU_PRECONDITIONER "Use superlu for the preconditioner" OFF)
1313
OPTION(DEVSIM_LOAD_MATHLIBS "Load BLAS/LAPACK libraries at startup" ON)
14-
OPTION(DEVSIM_MATERIALDB "Use Material DB (requires sqlite)" ON)
1514
OPTION(STATICONLY "Build static only" OFF)
1615

1716

@@ -21,13 +20,9 @@ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/${DEVSIM_CONFIG}.cmake OPTIONAL)
2120
INCLUDE(${PROJECT_SOURCE_DIR}/local.cmake OPTIONAL)
2221

2322
#also change this in setup.cfg
24-
ADD_DEFINITIONS(-DDEVSIM_VERSION_STRING=\"2.8.0\")
23+
ADD_DEFINITIONS(-DDEVSIM_VERSION_STRING=\"2.8.1\")
2524
ADD_DEFINITIONS(-DDEVSIM_COPYRIGHT_YEAR=\"2009-2024\")
2625
27-
IF (DEVSIM_MATERIALDB)
28-
ADD_DEFINITIONS(-DUSE_MATERIALDB)
29-
ENDIF()
30-
3126
IF (MKL_PARDISO)
3227
ADD_DEFINITIONS(-DUSE_MKL_PARDISO)
3328
ENDIF (MKL_PARDISO)

‎CODE_OF_CONDUCT.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at {{ email }}. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+

‎INSTALL.md‎

Lines changed: 2 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
Please visit the DEVSIM homepage at [https://devsim.org](https://devsim.org) for the latest information concerning the availability of the software.
66

7-
Supported Platforms:
8-
9-
* Centos, Red Hat 7
10-
* macOS
11-
* Microsoft Windows (64 bit)
12-
137
## Installing the Binary Package
148

159
### Prerequisites
@@ -59,12 +53,7 @@ pip install devsim
5953

6054
#### Alternative Package Download
6155

62-
Binary releases are available from [Zenodo](https://doi.org/10.5281/zenodo.1186952), or from [GitHub](https://github.com/devsim/devsim/releases). Uncompress the file to the desired directory. Then go into the the directory and run the Python installer.
63-
64-
cd devsim
65-
python install.py
66-
67-
This script will install DEVSIM into your environment. If you should need to remove this environment, you can use ``pip``. Alternatively, you can set the PYTHONPATH environment variable to the ``devsim/lib`` directory.
56+
Binary releases are available from [Zenodo](https://doi.org/10.5281/zenodo.1186952), or from [GitHub](https://github.com/devsim/devsim/releases). Uncompress the file to the desired directory. The preferred installation method is to install the `.whl` file using `pip`.
6857

6958
#### Basic Test
7059

@@ -83,105 +72,5 @@ At this time, the macOS version only targets Intel-based systems. There has bee
8372

8473
## Building from Source
8574

86-
***For the builds in this section, an Anaconda (or Miniconda) installation is required. Please install using the instructions above. Ensure that you are running the scripts below from a shell with an activated Python environment, having the ``conda`` command in your path. Please note that the build scripts will create a conda environment named ``devsim_python3_build``.***
87-
88-
#### Building Centos 7 Linux
89-
90-
***The scripts will install many system packages. It is highly recommended to run these scripts in a docker container.***
91-
92-
The Centos 7 version is used for binary Linux releases, as it is forward compatible with most Linux distributions and used the Intel MKL. It will install all required dependencies, including Anaconda Python. It is recommended to run this in a docker image. ***There is no need to run ``install_miniconda_linux.sh`` if it is already installed***.
93-
94-
```
95-
git clone https://github.com/devsim/devsim.git
96-
cd devsim
97-
git submodule init
98-
git submodule update
99-
bash scripts/build_centos_7.sh devsim_linux_version
100-
```
101-
102-
where ``version`` is replaced with the desired version. The compressed file is then ``devsim/dist/devsim_linux_version.tgz``
103-
104-
#### Building Other Linux Systems
105-
106-
***Please note that these scripts may attempt to install packages using the system installer on your system. Please evaluate the scripts carefully to ensure you agree with these changes to your system. It is highly recommended to run these scripts in a docker container. Anaconda Python is not required for these builds.***
107-
108-
Additional build scripts are available for ``Ubuntu`` and ``Fedora`` in the ``scripts`` directory. These version do not use the Intel MKL and replace the use of the Intel MKL Pardiso Solver with UMFPACK.
109-
110-
### Building macOS
111-
112-
#### Release Version
113-
114-
***The builds scripts will make changes to an existing Homebrew installation.***
115-
116-
The macOS release version is built using a Travis build server (see ``.travis.yml``), but it can be built locally with the following prerequisites:
117-
118-
* Xcode 10.1
119-
* Homebrew [https://brew.sh/](https://brew.sh/)
120-
* GCC Compiler (Brew package gcc@9)
121-
122-
The rest of the components, including Anaconda Python and various build components are downloaded and installed in the scripts below. ***There is no need to run ``install_miniconda_macos.sh`` if Anaconda Python is already installed.***.
123-
124-
```
125-
git clone https://github.com/devsim/devsim.git
126-
cd devsim
127-
git submodule init
128-
git submodule update
129-
source scripts/install_miniconda_macos.sh
130-
bash scripts/build_macos.sh gcc version
131-
```
132-
133-
where ``version`` is replaced with the desired version. The compressed file is then ``devsim/dist/devsim_macos_version.tgz``
134-
Note that the resulting package file does not have any dependencies on Homebrew on the target system.
135-
136-
#### Using macOS system compiler
137-
138-
Please note that you will need to install the Xcode developer tools, including the C++ compiler for your system. By default it uses UMFPACK 5.1 as the direct solver, but the build scripts can be modified to support Intel MKL Pardiso. The rest of the components, including Anaconda Python and various build components are downloaded and installed in the scripts below. ***There is no need to run ``install_miniconda_macos.sh`` if Anaconda Python is already installed.***
139-
140-
```
141-
git clone https://github.com/devsim/devsim.git
142-
cd devsim
143-
git submodule init
144-
git submodule update
145-
source scripts/install_miniconda_macos.sh
146-
bash scripts/build_macos.sh gcc version
147-
```
148-
149-
### Building on Windows
150-
151-
***Please note that the Windows build scripts will make changes to an existing MSYS 2 installation. It will also create new Anaconda environments.***
152-
153-
#### MSYS version
154-
155-
Please see ``appveyor.yml`` in the source directory for more information about the automated build process.
156-
157-
To build manually, the prerequisites are to have installed:
158-
159-
* Anaconda Python (or Miniconda)
160-
* MSYS 2 [https://www.msys2.org/](https://www.msys2.org/)
161-
162-
First download the source and initialize the submodule from [https://github.com/devsim/devsim.git](https://github.com/devsim/devsim.git).
163-
164-
From a Anaconda environment command prompt:
165-
166-
scripts\build_appveyor.bat msys conda version
167-
168-
where ``version`` is replaced with the desired version. The compressed file is then ``devsim/dist/devsim_msys_version.zip``.
169-
170-
171-
#### Visual Studio 2022 version
172-
173-
This version requires installing:
174-
175-
* Anaconda Python (or Miniconda)
176-
* MSYS 2 [https://www.msys2.org/](https://www.msys2.org/)
177-
* Microsoft Visual Studio 2022 [https://visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/)
178-
179-
as well as the prerequisites for the MSYS version above.
180-
181-
From a Anaconda environment command prompt:
182-
183-
scripts\build_appveyor.bat x64 conda version
184-
185-
where ``version`` is replaced with the desired version. The compressed file is then ``devsim/dist/devsim_win64_version.zip``
186-
75+
Please see [BUILD.md](BUILD.md) for instructions for building from source.
18776

0 commit comments

Comments
 (0)