Skip to content

Commit

Permalink
Merge pull request #292 from ludwig-cf/develop
Browse files Browse the repository at this point in the history
Release 0.21.0
  • Loading branch information
kevinstratford authored Jan 10, 2024
2 parents c21dba0 + eb6c5fa commit 7d8b8d8
Show file tree
Hide file tree
Showing 122 changed files with 7,829 additions and 1,615 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ jobs:
- name: Check
run: |
make unit
make -C tests d3q27
51 changes: 45 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@

### Changes


version 0.21.0

- Ellipsoids. A feature which allows ellipsoidal particles to be
used has been added by Sumesh Thampi.

- "colloid_type" has been split into a number of more general
properties including: boundary condition (bc) either bbl or
subgrid; shale either "disk", "sphere", or "ellipsoid";
active (logical); magnetic (logical).
The default is: bc = bbl, shape = sphere, active = no, magnetic = no.
There are some conditions, e.g., "disk" expects a 2D D2Q9 model.
This affects the way colloid details are specified in the input.
Older colloid state files should still work.
See https://ludwig.epcc.ed.ac.uk

- There is no longer an option available for field halo swaps; the
scheme has been consolidated is always the same (for CPU). GPU
run time configuration is pending. Halo information is still
available https://ludwig.epcc.ed.ac.uk/inputs/parallel.html
- If you use a 2-dimensional system (L_z = 1) with an order parameter, you
must use a 2d gradient calculation. This is related to the (non-) treatment
of halo swaps in the third dimension for fields.
- A `colloid_buoyancy` option has been added which is similar to
`colloid_gravity` but computes a force proportional to colloid volume.
See https://ludwig.epcc.ed.ac.uk/inputs/colloid.html#external-forces

Bug fixes:

- Issue 270: a colloid with an initial position placed exactly at a sub-domain
boundary can fail to be attached to the cell list in some
circumstances causing a crash. This has been fixed by adding
a small position adjustment, or if this doesn't work, failing
with a message.
- Issue 268: if using wetting information read from porous media files,
the form of the key words in the input file has been
adjusted. See https://ludwig.epcc.ed.ac.uk/inputs/porous.html


version 0.20.1
- Issue 271: missing stub prevents compilation at some compiler optimisation
levels.
Expand All @@ -26,16 +65,16 @@ version 0.19.0

- There has been a significant change to the way that i/o is undertaken.
See https://ludwig.epcc.ed.ac.uk/outputs/fluid.html
It is the intension to replace completely the 'old' I/O mechanism
It is the intention to replace completely the 'old' I/O mechanism
by release v0.21.0.
- The extract_colloids.c utility has been updated so that it takes
only one comand line argument for new I/O metadata.
only one command line argument for new I/O metadata.

- Input associated with the choice of force arising from the free energy
sector has been made more general. Specifically, input keys
`fd_force_divergence` and `fe_use_stress_relaxation` are replaced.
- For scalar order parameters an extra version of the "phi_gradmu"
approach is avaialble" "phi_gradmu_correction".
approach is available" "phi_gradmu_correction".
- See https://ludwig.epcc.ed.ac.uk/inputs/force.html for details.
- Order parameter statistics are now reported as "phi" for scalars
[Px,Py,Pz] for vectors, and [Qxx, Qxy, Qxz, Qyy, Qyz] for liquid
Expand Down Expand Up @@ -77,7 +116,7 @@ version 0.17.0
- add liquid crystal anchoring "fd_gradient_calculation s7_anchoring"
- this is a replcement for "3d_7pt_fluid" and does a slightly better
job at the edges and corners by using a consistent surface normal.
The anchoring properties are now specifed in a slightly different
The anchoring properties are now specified in a slightly different
way.
- For walls, see https://ludwig.epcc.ed.ac.uk/inputs/walls.html
- For colloids, see https://ludwig.epcc.ed.ac.uk/inputs/colloid.html
Expand Down Expand Up @@ -161,7 +200,7 @@ version 0.13.0
version 0.12.0

- Allow user to specify a linear combination of slip and no-slip for
plane walls. This was originally implementated by Katrin Wolff when
plane walls. This was originally implemented by Katrin Wolff when
at Edinburgh, and has been resurrected with the help of Ryan Keogh
and Tyler Shendruk. See https://ludwig.epcc.ed.ac.uk/inputs/walls.html
- Various minor code quality improvements
Expand Down Expand Up @@ -217,7 +256,7 @@ version 0.9.0
- Regression tests have been re-organised into different directories
and are run on a per-directory basis (see tests/Makefile)

- The default test is regression/d3q19-short
- The default test is regression/d3q19-short

- A link to new build and test instructions has been made available
from the README
Expand Down
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
target: 33%
threshold: 2%
patch:
default:
informational: true
31 changes: 18 additions & 13 deletions config/epcc-cirrus-nvcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@
#
# nvcc build
#
# module load intel-mpi-17
# module load intel-comiplers-17
# module load cuda/9.1
# There are a number of ways forward here... see further comments below
#
# Host As epcc-cirrus-intel.mk
# Device NVIDIA Tesla V100-SXM2
# E.g., serial with stub MPI
# module load nvidia/nvhpc-nompi/22.11
#
# E.g., parallel using NVHPC with MPI ...
# module load nvidia/nvhpc/22.11
#
###############################################################################

BUILD = parallel
MODEL = -D_D3Q19_
BUILD = parallel
MODEL = -D_D3Q19_

CC = nvcc
CFLAGS = -ccbin=icpc -DADDR_SOA -DNDEBUG -arch=sm_70 -x cu -dc -Xcompiler -fast
CFLAGS = -g -DADDR_SOA -O2 -arch=sm_70 -x cu -dc

# PTX assembler extra information: -Xptxas -v
# Alternative compiler, e.g., Intel: -ccbin=icpc -Xcompiler -fast

AR = ar
ARFLAGS = -cr
LDFLAGS= -ccbin=icpc -arch=sm_70
LDFLAGS = -arch=sm_70

MPI_HOME = /lustre/sw/intel/compilers_and_libraries_2017.2.174/linux/mpi
MPI_INC_PATH = -I$(MPI_HOME)/include64
MPI_LIB_PATH = -L$(MPI_HOME)/lib64 -lmpi
# nvhpc (mpicc is present but drives nvc not nvcc) so use nvcc still ... but
MPI_HOME = ${NVHPC_ROOT}/comm_libs/mpi
MPI_INC_PATH = -I$(MPI_HOME)/include
MPI_LIB_PATH = -L$(MPI_HOME)/lib -lmpi

# NVHPC bundled MPI must use mpirun supplied ...
LAUNCH_SERIAL_CMD =
LAUNCH_MPIRUN_CMD = mpirun
MPIRUN_NTASK_FLAG = -np

25 changes: 25 additions & 0 deletions config/unix-nvcc-default.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
##############################################################################
#
# unix-nvcc-default.mk
#
# This example uses "nvcc -ccbin=mpicc" to drive the compilation.
# Further include/library information may be required...
#
##############################################################################

BUILD = parallel
MODEL = -D_D3Q19_

CC = nvcc
CFLAGS = -ccbin=mpicc -O2 -DADDR_SOA -arch=sm_61 -x cu -dc

AR = ar
ARFLAGS = -cr
LDFLAGS= -arch=sm_61

MPI_INC_PATH=-I/usr/lib/x86_64-linux-gnu/openmpi/include
MPI_LIB_PATH=-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi

LAUNCH_SERIAL_CMD =
LAUNCH_MPIRUN_CMD = mpirun
MPIRUN_NTASK_FLAG = -np
8 changes: 7 additions & 1 deletion src/advection.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Edinburgh Soft Matter and Statistical Physics Group and
* Edinburgh Parallel Computing Centre
*
* (c) 2010-2021 The University of Edinburgh
* (c) 2010-2023 The University of Edinburgh
*
* Contributing authors:
* Kevin Stratford ([email protected])
Expand All @@ -31,6 +31,7 @@
*****************************************************************************/

#include <assert.h>
#include <limits.h>
#include <stdlib.h>

#include "advection_s.h"
Expand Down Expand Up @@ -171,6 +172,11 @@ __host__ int advflux_create(pe_t * pe, cs_t * cs, lees_edw_t * le, int nf,
obj->nf = nf;
obj->nsite = nsites;

if (nf < 1 || nsites < 1 || INT_MAX/nf < nsites) {
pe_info(pe, "advflux_create: failure in int32_t indexing\n");
return -1;
}

if (obj->le == NULL) {
/* If no Lees Edwards, we only require an fx = fw */

Expand Down
Loading

0 comments on commit 7d8b8d8

Please sign in to comment.