Skip to content

Commit a53d6aa

Browse files
committed
Merge branch 'master' into kida-1d
2 parents 82bb787 + 848ee5d commit a53d6aa

29 files changed

+82
-59
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ aliases:
6868
jobs:
6969
include:
7070
- <<: *precache_tests_mpi
71-
env: TEST_SUITE=MPI_tests MPI=mvapich2
71+
env: TEST_SUITE=tests MPI=mvapich2
7272
compiler: gcc
7373
# clang MPI_tests disabled due to issues with manually built boost python libstdc++ / libc++ issues
7474
# - <<: *precache_default
@@ -88,7 +88,7 @@ jobs:
8888
env: TEST_SUITE=cuda MPI=none
8989

9090
- compiler: clang
91-
env: TEST_SUITE=MPI_tests MPI=none
91+
env: TEST_SUITE=tests MPI=mvapich2
9292

9393
- compiler: clang
9494
env: TEST_SUITE=UWLCM_MT MPI=mvapich2
@@ -180,7 +180,7 @@ install:
180180
- if [[ $MPI == 'none' && ($TEST_SUITE != 'tests' || $TEST_SUITE != 'KidA') ]]; then sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so; fi # different naming conventions for boost python with python 3
181181

182182
# thrust
183-
- git clone --depth=1 git://github.com/thrust/thrust.git;
183+
- git clone --depth=1 git://github.com/thrust/thrust.git --branch 1.9.10-1;
184184
- sudo ln -s `pwd`/thrust/thrust /usr/local/include/thrust;
185185
- if [[ $TEST_SUITE == 'cuda' ]]; then sudo ln -s `pwd`/thrust/thrust /usr/local/cuda/include/thrust; fi
186186

@@ -202,6 +202,4 @@ script:
202202
- if [[ $TEST_SUITE == 'UWLCM_unit_smg' ]]; then . ./.travis_scripts/UWLCM.sh unit_smg; fi
203203
# KiD-A 1D
204204
- if [[ $TEST_SUITE == 'KidA' ]]; then . ./.travis_scripts/KidA.sh; fi
205-
# unit tests and drops.py with MPI (drop drops here?)
206-
- if [[ $TEST_SUITE == 'MPI_tests' ]]; then . ./.travis_scripts/tests.sh; fi
207205

.travis_scripts/deps_install/boost.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
1919
cat $HOME/user-config.jam
2020
if [[ $COMPILER == 'g++' ]]; then
2121
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=chrono,regex,serialization,mpi,atomic,thread,date_time,system,iostreams,timer,filesystem,program_options,python
22-
./b2 -d0 install
22+
travis_wait 30 ./b2 -d0 install
2323
fi
2424
if [[ $COMPILER == 'clang++' ]]; then
2525
#clang installation taken from https://gist.github.com/jimporter/10442880

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ target_include_directories(cloudphxx_lgrngn
108108
)
109109

110110
# enabling additional warnings
111-
target_compile_options(cloudphxx_lgrngn PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -Wextra>)
111+
#target_compile_options(cloudphxx_lgrngn PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -Wextra>)
112112
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
113113

114114
# enabling c++11

include/libcloudph++/common/detail/toms748.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ T toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol t
295295

296296
a = ax;
297297
b = bx;
298+
299+
fa = fax;
300+
fb = fbx;
298301

299302
#if !defined(NDEBUG)
300303
if(a >= b)
@@ -303,10 +306,6 @@ T toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol t
303306
assert(0);
304307
}
305308
#endif
306-
307-
308-
fa = fax;
309-
fb = fbx;
310309

311310
if(tol(a, b) || (fa == 0) || (fb == 0))
312311
{

include/libcloudph++/common/output.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace libcloudphxx
1616
outS_VI = chem::S_VI,
1717
outH = chem::H,
1818
outliq_vol,
19-
outdry_vol
19+
outdry_vol,
20+
outprtcl_num
2021
};
2122

2223
const std::map<output_t, std::string> output_names
@@ -30,7 +31,8 @@ namespace libcloudphxx
3031
{outS_VI , "S_VI"},
3132
{outH , "H"},
3233
{outliq_vol, "liquid_volume"},
33-
{outdry_vol, "dry_volume"}
34+
{outdry_vol, "dry_volume"},
35+
{outprtcl_num, "particle_number"}
3436
};
3537
};
3638
};

models/kinematic_2D/tests/paper_GMD_2015/fig_a/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ add_test(travis_2D_kin_cloud_dims_lgrngn bash -c "
106106
add_test(travis_2D_kin_cloud_diff_lgrngn bash -c "
107107
for dir in travis_out_lgrngn; do
108108
echo 'comparing const.h5'
109-
h5diff --delta=1e-6 -v2 $dir/const.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_const.h5 &&
109+
h5diff --delta=1e-6 -v2 $dir/const.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_const.h5 &&
110110
echo 'comparing timestep0000000000.h5' &&
111-
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /th &&
112-
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /rv &&
113-
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /sd_conc &&
111+
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /th &&
112+
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /rv &&
113+
h5diff --relative=1e-9 -v2 $dir/timestep0000000000.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000000.h5 /sd_conc &&
114114
echo 'comparing timestep0000000020.h5' &&
115-
h5diff --relative=0.001 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /th &&
116-
h5diff --relative=0.002 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /rv &&
117-
h5diff --delta=1 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /sd_conc || exit 1;
115+
h5diff --relative=0.001 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /th &&
116+
h5diff --relative=0.0021 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /rv &&
117+
h5diff --delta=1 -v2 $dir/timestep0000000020.h5 ${CMAKE_CURRENT_SOURCE_DIR}/refdata/$dir/travis_timestep0000000020.h5 /sd_conc || exit 1;
118118
done
119119
")

src/detail/gpu_assert.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace libcloudphxx
1616
{
1717
namespace detail
1818
{
19-
void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true)
19+
inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true)
2020
{
2121
if (code != cudaSuccess)
2222
{
@@ -26,10 +26,10 @@ namespace libcloudphxx
2626
}
2727

2828
// max(1, n)
29-
int m1(int n) { return n == 0 ? 1 : n; }
29+
inline int m1(int n) { return n == 0 ? 1 : n; }
3030

3131
// run a function on a specific gpu
32-
void set_device_and_run(int id, std::function<void()> fun)
32+
inline void set_device_and_run(int id, std::function<void()> fun)
3333
{
3434
gpuErrchk(cudaSetDevice(id));
3535
fun();

src/detail/kernels.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ namespace libcloudphxx
2828
k_params(k_params), n_user_params(n_user_params), r_max(r_max) {}
2929

3030
// thrust requires that a default ctor exists
31-
BOOST_GPU_ENABLED
3231
kernel_base() = default;
3332

3433
BOOST_GPU_ENABLED
@@ -45,7 +44,6 @@ namespace libcloudphxx
4544
kernel_golovin(thrust_device::pointer<real_t> k_params) : kernel_base<real_t, n_t>(k_params, 1) {}
4645

4746
// thrust requires that a default ctor exists
48-
BOOST_GPU_ENABLED
4947
kernel_golovin() = default;
5048

5149
BOOST_GPU_ENABLED
@@ -134,7 +132,6 @@ namespace libcloudphxx
134132
kernel_geometric_with_multiplier(thrust_device::pointer<real_t> k_params) : kernel_geometric<real_t, n_t>(k_params, 1) {}
135133

136134
// thrust requires that a default ctor exists
137-
BOOST_GPU_ENABLED
138135
kernel_geometric_with_multiplier() = default;
139136

140137
BOOST_GPU_ENABLED
@@ -186,7 +183,6 @@ namespace libcloudphxx
186183
kernel_geometric_with_efficiencies(thrust_device::pointer<real_t> k_params, real_t r_max) : kernel_geometric<real_t, n_t>(k_params, 0, r_max) {}
187184

188185
// thrust requires that a default ctor exists
189-
BOOST_GPU_ENABLED
190186
kernel_geometric_with_efficiencies() = default;
191187

192188
BOOST_GPU_ENABLED
@@ -220,7 +216,6 @@ namespace libcloudphxx
220216
kernel_onishi(thrust_device::pointer<real_t> k_params, real_t r_max) : kernel_geometric<real_t, n_t>(k_params, 1, r_max) {}
221217

222218
// thrust requires that a default ctor exists
223-
BOOST_GPU_ENABLED
224219
kernel_onishi() = default;
225220

226221
BOOST_GPU_ENABLED

src/detail/urand.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ namespace libcloudphxx
120120
)
121121
{
122122
int status = curandGenerateUniform(gen, thrust::raw_pointer_cast(v.data()), n);
123-
assert(status == CURAND_STATUS_SUCCESS /* && "curandGenerateUniform failed"*/);
123+
assert(status == CURAND_STATUS_SUCCESS /* && "curandGenerateUniform failed"*/);
124124
_unused(status);
125+
125126
}
126127

127128
void generate_n(

src/impl/particles_impl.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ namespace libcloudphxx
354354

355355
// if using nvcc, put increase_sstp_coal flag in host memory, but with direct access from device code
356356
#if defined(__NVCC__)
357-
cudaMallocHost(&increase_sstp_coal, sizeof(bool));
357+
gpuErrchk(cudaMallocHost(&increase_sstp_coal, sizeof(bool)));
358358
#else
359359
increase_sstp_coal = new bool();
360360
#endif

0 commit comments

Comments
 (0)