Skip to content

Commit 4e32fed

Browse files
committed
merged master into the gases dev branch
2 parents 4a7fd5e + b2c11b6 commit 4e32fed

25 files changed

+1352
-384
lines changed

.github/workflows/dev.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Alquimia CI
2+
3+
on: [workflow_dispatch, push, pull_request]
4+
5+
env:
6+
# Customizing build type
7+
BUILD_TYPE: DEBUG
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: package-install
16+
run: |
17+
sudo apt-get -qq update
18+
sudo apt -qq install gfortran libopenmpi-dev libhdf5-openmpi-dev hdf5-helpers
19+
20+
- name: directories-variables
21+
run: |
22+
echo "PETSC_DIR=$HOME/petsc" >> $GITHUB_ENV
23+
echo "PETSC_ARCH=debug" >> $GITHUB_ENV
24+
echo "PFLOTRAN_DIR=$HOME/pflotran" >> $GITHUB_ENV
25+
echo "CRUNCH_DIR=$HOME/crunchtope-dev" >> $GITHUB_ENV
26+
echo "ALQUIMIA_DIR=$HOME/work/install" >> $GITHUB_ENV
27+
echo "ALQUIMIA_REPO_DIR=$HOME/work/alquimia-dev/alquimia-dev" >> $GITHUB_ENV
28+
29+
- name: petsc-install
30+
run: |
31+
git clone https://gitlab.com/petsc/petsc.git --branch v3.18.0 $PETSC_DIR
32+
cd $PETSC_DIR
33+
echo "Alquimia >> Configuring petsc"
34+
PETSC_ARCH=$PETSC_ARCH ./configure --with-mpi=1 --with-debugging=1 --with-shared-libraries=1 --download-fblaslapack=1 --with-hdf5-dir=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
35+
echo "Alquimia >> Building petsc"
36+
make
37+
38+
- name: pflotran-install
39+
run: |
40+
git clone https://bitbucket.org/pflotran/pflotran --branch v4.0.1 $PFLOTRAN_DIR
41+
cd $PFLOTRAN_DIR/src/pflotran
42+
echo "Building libpflotranchem.a"
43+
make libpflotranchem.a
44+
45+
- name: crunchflow-install
46+
run: |
47+
git clone https://bitbucket.org/crunchflow/crunchtope-dev $CRUNCH_DIR
48+
cd $CRUNCH_DIR/source
49+
git apply MakefileForAlquimia.patch
50+
echo "Building libcrunchchem.a"
51+
make libcrunchchem.a
52+
53+
- uses: actions/checkout@v2
54+
55+
- name: configure
56+
run: |
57+
ls $HOME/work
58+
ls $HOME/runners
59+
mkdir $ALQUIMIA_REPO_DIR/build
60+
cd $ALQUIMIA_REPO_DIR/build
61+
cmake .. -DCMAKE_INSTALL_PREFIX=$ALQUIMIA_DIR -DCMAKE_C_COMPILER=`which mpicc` -DCMAKE_CXX_COMPILER=`which mpicxx` -DCMAKE_Fortran_COMPILER=`which mpif90` -DCMAKE_BUILD_TYPE=Release -DXSDK_WITH_PFLOTRAN=ON -DTPL_PFLOTRAN_LIBRARIES=$PFLOTRAN_DIR/src/pflotran/libpflotranchem.a -DTPL_PFLOTRAN_INCLUDE_DIRS=$PFLOTRAN_DIR/src/pflotran -DXSDK_WITH_CRUNCHFLOW=ON -DTPL_CRUNCHFLOW_LIBRARIES=$CRUNCH_DIR/source/libcrunchchem.a -DTPL_CRUNCHFLOW_INCLUDE_DIRS=$CRUNCH_DIR/source -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_C_FLAGS="-W -Wall -Wextra" -DCMAKE_CXX_FLAGS="-W -Wall -Wextra" -DCMAKE_Fortran_FLAGS="-W -Wall -Wextra"
62+
63+
- name: build
64+
run: |
65+
cd $ALQUIMIA_REPO_DIR/build
66+
make -j2
67+
68+
- name: test
69+
run: |
70+
cd $ALQUIMIA_REPO_DIR/build
71+
make test

.travis.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,35 @@ os:
88

99
sudo: required
1010

11-
dist: trusty # Ubuntu 14.04.
11+
dist: bionic # Ubuntu 18.04.
1212

1313
# Build/test only on the master branch.
1414
branches:
1515
only:
1616
- master
17+
- stable
1718

1819
compiler:
1920
- gcc
2021

21-
install: travis_wait 60 ./.install-$TRAVIS_OS_NAME-deps.sh
22+
install: travis_wait 60 ./.travis/install-$TRAVIS_OS_NAME-deps.sh
2223

2324
env:
24-
- BUILD_TYPE=Debug PETSC_DIR=$PWD/petsc PETSC_ARCH=petsc_debug DEBUG=1
25-
- BUILD_TYPE=Release PETSC_DIR=$PWD/petsc PETSC_ARCH=petsc_opt DEBUG=0
25+
global:
26+
- ALQUIMIA_DIR=$PWD
27+
- THIRD_PARTY_LIB_DIR=$HOME
28+
- CRUNCHTOPE_DIR=$THIRD_PARTY_LIB_DIR/crunchtope-dev
29+
- PETSC_DIR=$THIRD_PARTY_LIB_DIR/petsc
30+
- PFLOTRAN_DIR=$THIRD_PARTY_LIB_DIR/pflotran
31+
jobs:
32+
- BUILD_TYPE=Debug PETSC_ARCH=petsc_debug DEBUG=1
33+
- BUILD_TYPE=Release PETSC_ARCH=petsc_opt DEBUG=0
2634

2735
script:
28-
- mkdir build && cd build
29-
- ls $PETSC_DIR
30-
- ls $PETSC_DIR/$PETSC_ARCH
31-
- ls $PETSC_DIR/$PETSC_ARCH/lib
32-
- export TMPDIR=/tmp
33-
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../alquimia-install -DCMAKE_C_COMPILER=`which mpicc` -DCMAKE_CXX_COMPILER=`which mpicxx` -DCMAKE_Fortran_COMPILER=`which mpif90` -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DXSDK_WITH_PFLOTRAN=ON -DTPL_PFLOTRAN_LIBRARIES=$PETSC_DIR/$PETSC_ARCH/externalpackages/git.pflotran/src/pflotran/libpflotranchem.a -DTPL_PFLOTRAN_INCLUDE_DIRS=$PETSC_DIR/$PETSC_ARCH/externalpackages/git.pflotran/src/pflotran -DXSDK_WITH_CRUNCHFLOW=ON -DTPL_CRUNCHFLOW_LIBRARIES=$PETSC_DIR/$PETSC_ARCH/externalpackages/crunchtope-dev/source/libcrunchchem.a -DTPL_CRUNCHFLOW_INCLUDE_DIRS=$PETSC_DIR/$PETSC_ARCH/externalpackages/crunchtope-dev/source
34-
- make -j4
35-
- make test
36-
- make install
37-
- make test_install
38-
- cd ..
36+
- ./.travis/install-petsc.sh
37+
- ./.travis/install-crunchtope.sh
38+
- ./.travis/install-pflotran.sh
39+
- ./.travis/install-alquimia.sh
3940

4041
after_failure:
41-
- cat build/Testing/Temporary/LastTest.log
42+
- cat $ALQUIMIA_DIR/build/Testing/Temporary/LastTest.log

.travis/install-alquimia.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
cd $ALQUIMIA_DIR
4+
mkdir build
5+
cd build
6+
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../alquimia-install \
7+
-DCMAKE_C_COMPILER=`which mpicc` \
8+
-DCMAKE_CXX_COMPILER=`which mpicxx` \
9+
-DCMAKE_Fortran_COMPILER=`which mpif90` \
10+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
11+
-DXSDK_WITH_PFLOTRAN=ON \
12+
-DTPL_PFLOTRAN_LIBRARIES=$PFLOTRAN_DIR/src/pflotran/libpflotranchem.a \
13+
-DTPL_PFLOTRAN_INCLUDE_DIRS=$PFLOTRAN_DIR/src/pflotran \
14+
-DXSDK_WITH_CRUNCHFLOW=ON \
15+
-DTPL_CRUNCHFLOW_LIBRARIES=$CRUNCHTOPE_DIR/source/libcrunchchem.a \
16+
-DTPL_CRUNCHFLOW_INCLUDE_DIRS=$CRUNCHTOPE_DIR/source
17+
make -j4
18+
make test
19+
make install
20+
make test_install

.travis/install-crunchtope.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
git clone https://bitbucket.org/crunchflow/crunchtope-dev.git --branch petsc-upgrade $CRUNCHTOPE_DIR
4+
cd $CRUNCHTOPE_DIR/source
5+
git apply MakefileForAlquimia.patch
6+
make libcrunchchem.a

.travis/install-linux-deps.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Install necessary software.
2+
sudo apt-get update -qq
3+
sudo apt-get install -y cmake gcc libopenmpi-dev openmpi-bin liblapack-dev gfortran git
4+

.travis/install-osx-deps.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Install required software
2+
brew cask uninstall oclint
3+
brew update
4+
brew install openmpi
5+
export TMPDIR=/tmp
6+
7+
# Make sure the weird gfortran library links are in place.
8+
ln -s /usr/local/lib/gcc/7/libgfortran.dylib /usr/local/lib/libgfortran.dylib
9+
ln -s /usr/local/lib/gcc/7/libgfortran.a /usr/local/lib/libgfortran.a
10+
11+
# Go get PETSc 3.6.x and build it.
12+
git clone https://bitbucket.org/petsc/petsc petsc
13+
pushd $PETSC_DIR
14+
./configure --with-mpi=1 --download-hdf5 --with-debug=$DEBUG --with-shared-libraries=1 --download-pflotran --download-pflotran-commit=origin/master
15+
make
16+
make test
17+
popd
18+
19+
# Go get pflotran and build it.
20+
# -already installed under PETSc

.travis/install-petsc.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
git clone https://gitlab.com/petsc/petsc.git $PETSC_DIR
4+
cd $PETSC_DIR
5+
git checkout balay/fix-make-f90-target/maint
6+
./configure --with-mpi=1 --with-debug=1 --with-shared-libraries=1 --download-fblaslapack=1 --with-debug=$DEBUG
7+
make

.travis/install-pflotran.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
git clone https://bitbucket.org/pflotran/pflotran $PFLOTRAN_DIR
4+
cd $PFLOTRAN_DIR/src/pflotran
5+
git checkout v3.0
6+
#git apply $ALQUIMIA_DIR/.travis/pflotran_version_patch.txt
7+
make libpflotranchem.a

.travis/pflotran_version_patch.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/pflotran/pflotran_constants.F90 b/src/pflotran/pflotran_constants.F90
2+
index dd88e7265..86d0816c4 100644
3+
--- a/src/pflotran/pflotran_constants.F90
4+
+++ b/src/pflotran/pflotran_constants.F90
5+
@@ -16,7 +16,7 @@ module PFLOTRAN_Constants_module
6+
PetscInt, parameter :: PFLOTRAN_VERSION_PATCH = 0 ! (alpha < -1; beta = -1)
7+
8+
#define VMAJOR 3
9+
-#define VMINOR 13
10+
+#define VMINOR 11
11+
#define VSUBMINOR 0
12+
#if (PETSC_VERSION_MAJOR < VMAJOR || \
13+
(PETSC_VERSION_MAJOR == VMAJOR && \

LICENSE.txt

+36-46
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,45 @@
1-
Alquimia Copyright (c) 2013-2016, The Regents of the University of
2-
California, through Lawrence Berkeley National Laboratory (subject to
3-
receipt of any required approvals from the U.S. Dept. of Energy). All
4-
rights reserved.
1+
*** License Agreement ***
52

6-
3+
Alquimia Copyright (c) 2013-2021, The Regents of the University of
4+
California, through Lawrence Berkeley National Laboratory (subject
5+
to receipt of any required approvals from the U.S. Dept. of Energy).
6+
All rights reserved.
77

88
Redistribution and use in source and binary forms, with or without
9-
modification, are permitted provided that the following conditions are
10-
met:
9+
modification, are permitted provided that the following conditions are met:
1110

12-
13-
14-
(1) Redistributions of source code must retain the above copyright
15-
notice, this list of conditions and the following disclaimer.
16-
17-
11+
(1) Redistributions of source code must retain the above copyright notice,
12+
this list of conditions and the following disclaimer.
1813

1914
(2) Redistributions in binary form must reproduce the above copyright
2015
notice, this list of conditions and the following disclaimer in the
2116
documentation and/or other materials provided with the distribution.
2217

23-
24-
25-
(3) Neither the name of the University of California, Lawrence
26-
Berkeley National Laboratory, U.S. Dept. of Energy nor the names of
27-
its contributors may be used to endorse or promote products derived
28-
from this software without specific prior written permission.
29-
30-
31-
32-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
39-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
40-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
42-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43-
44-
45-
46-
You are under no obligation whatsoever to provide any bug fixes,
47-
patches, or upgrades to the features, functionality or performance of
48-
the source code ("Enhancements") to anyone; however, if you choose to
49-
make your Enhancements available either publicly, or directly to
50-
Lawrence Berkeley National Laboratory, without imposing a separate
51-
written license agreement for such Enhancements, then you hereby grant
52-
the following license: a non-exclusive, royalty-free perpetual license
53-
to install, use, modify, prepare derivative works, incorporate into
54-
other computer software, distribute, and sublicense such enhancements
55-
or derivative works thereof, in binary and source code form.
18+
(3) Neither the name of the University of California, Lawrence Berkeley
19+
National Laboratory, U.S. Dept. of Energy nor the names of its contributors
20+
may be used to endorse or promote products derived from this software
21+
without specific prior written permission.
22+
23+
24+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34+
POSSIBILITY OF SUCH DAMAGE.
35+
36+
You are under no obligation whatsoever to provide any bug fixes, patches,
37+
or upgrades to the features, functionality or performance of the source
38+
code ("Enhancements") to anyone; however, if you choose to make your
39+
Enhancements available either publicly, or directly to Lawrence Berkeley
40+
National Laboratory, without imposing a separate written license agreement
41+
for such Enhancements, then you hereby grant the following license: a
42+
non-exclusive, royalty-free perpetual license to install, use, modify,
43+
prepare derivative works, incorporate into other computer software,
44+
distribute, and sublicense such enhancements or derivative works thereof,
45+
in binary and source code form.

0 commit comments

Comments
 (0)