Skip to content

Commit

Permalink
Merge pull request #159 from ludwig-cf/develop
Browse files Browse the repository at this point in the history
Release 0.15.0
  • Loading branch information
kevinstratford authored Dec 23, 2021
2 parents 8fb2392 + 4a76117 commit 19093eb
Show file tree
Hide file tree
Showing 159 changed files with 11,564 additions and 1,371 deletions.
16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@

### Changes

version 0.15.0

- Active stress implementation is updated to conform to the documented
case; active emulsion stress is available.
- Add ability to rotate BPI and BPII liquid crystal initial conditions
Thanks to Oliver H. for this. See Section 3 of web documentation.
- A diagnostic computation and output of the force breakdown on each
colloid has been added. This is currently via a static switch in
stats_colloid_force_split.c
- An option for a "lap timer" is now provided.
- Some simple open boundary conditions for fluid and binary composition
are available. See the "Open boundaries" section at
https://ludwig.epcc.ed.ac.uk/
- Some refactoring of the lattice Boltzmann basis information has been
performed in order to be able to move to a more flexible approach.
This should have no practical impact at present.

version 0.14.0

Expand Down
2 changes: 1 addition & 1 deletion config/codeql-g++.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
BUILD = serial
MODEL = -D_D3Q19_

CC = g++
CC = g++ -fopenmp
CFLAGS = -O -g -Wall -Werror

AR = ar
Expand Down
26 changes: 26 additions & 0 deletions config/epcc-archer2.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
##############################################################################
#
# archer2
# https://www.archer2.ac.uk
#
# PrgEnv-cray
# - Use cce >= 12 to avoid problem in openmp
# - "module load cce/12.0.3"
#
# Same compiler options for all PrgEnv are available.
#
##############################################################################

BUILD = parallel
MODEL = -D_D3Q19_

CC = cc -fopenmp
CFLAGS = -g -O3 -Wall -DNSIMDVL=2 -DNDEBUG

MPI_INC_PATH =
MPI_LIB_PATH =
MPI_LIB =

LAUNCH_SERIAL_CMD =
LAUNCH_MPIRUN_CMD = srun
MPIRUN_NTASK_FLAG = -n
23 changes: 10 additions & 13 deletions mpi_s/mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ typedef struct {
int MPI_TAG;
} MPI_Status;

#define MPI_STATUS_IGNORE ((MPI_Status *) 0)
#define MPI_STATUSES_IGNORE ((MPI_Status *) 0)

/* MPI_Aint is a signed integer. Prefer intmax_t over intptr_t as
the latter is optional in the standard. */
Expand Down Expand Up @@ -88,11 +90,6 @@ enum collective_operations {MPI_MAX,
MPI_LOR,
MPI_LXOR};

/* special datatypes for constructing derived datatypes */

#define MPI_UB 0
#define MPI_LB 0

/* reserved communicators */

enum reserved_communicators{MPI_COMM_WORLD, MPI_COMM_SELF};
Expand All @@ -110,6 +107,13 @@ enum reserved_communicators{MPI_COMM_WORLD, MPI_COMM_SELF};

#define MPI_IN_PLACE ((void *) 1)

/* Thread support level */

#define MPI_THREAD_SINGLE 1
#define MPI_THREAD_FUNNELED 2
#define MPI_THREAD_SERIALIZED 3
#define MPI_THREAD_MULTIPLE 4

/* Interface */

int MPI_Barrier(MPI_Comm comm);
Expand Down Expand Up @@ -159,10 +163,6 @@ int MPI_Type_contiguous(int count, MPI_Datatype oldtype,
MPI_Datatype * newtype);
int MPI_Type_vector(int count, int blocklength, int stride,
MPI_Datatype oldtype, MPI_Datatype * newtype);
int MPI_Type_struct(int count, int * array_of_blocklengths,
MPI_Aint * array_of_displacements,
MPI_Datatype * array_of_types, MPI_Datatype * newtype);
int MPI_Address(void * location, MPI_Aint * address);
int MPI_Type_commit(MPI_Datatype * datatype);
int MPI_Type_free(MPI_Datatype * datatype);
int MPI_Waitall(int count, MPI_Request * array_of_requests,
Expand Down Expand Up @@ -207,16 +207,13 @@ double MPI_Wtime(void);
double MPI_Wtick(void);

int MPI_Init(int * argc, char *** argv);
int MPI_Init_thread(int * argc, char *** argv, int required, int * provided);
int MPI_Finalize(void);
int MPI_Initialized(int * flag);
int MPI_Abort(MPI_Comm comm, int errorcode);

/* MPI 2.0 */
/* In particular, replacements for routines removed from MPI 3 */
/* MPI_Address() -> MPI_Get_Address()
* MPI_Type_struct() -> MPI_Type_create_struct()
* MPI_Type_lb() and MPI_Type_ub() -> MPI_Type_get_extent()
* See MPI 3 standard */

int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler erhandler);
int MPI_Get_address(const void * location, MPI_Aint * address);
Expand Down
108 changes: 42 additions & 66 deletions mpi_s/mpi_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,29 @@ int MPI_Init(int * argc, char *** argv) {
return MPI_SUCCESS;
}

/*****************************************************************************
*
* MPI_Init_thread
*
*****************************************************************************/

int MPI_Init_thread(int * argc, char *** argv, int required, int * provided) {

assert(argc);
assert(argv);
assert(MPI_THREAD_SINGLE <= required && required <= MPI_THREAD_MULTIPLE);
assert(provided);

MPI_Init(argc, argv);

/* We are going to say that MPI_THREAD_SERIALIZED is available */
/* Not MPI_THREAD_MULTIPLE */

*provided = MPI_THREAD_SERIALIZED;

return MPI_SUCCESS;
}

/*****************************************************************************
*
* MPI_Initialized
Expand Down Expand Up @@ -290,7 +313,6 @@ int MPI_Recv(void * buf, int count, MPI_Datatype datatype, int source,
int tag, MPI_Comm comm, MPI_Status * status) {

assert(buf);
assert(status);

printf("MPI_Recv should not be called in serial.\n");
exit(0);
Expand All @@ -310,8 +332,8 @@ int MPI_Irecv(void * buf, int count, MPI_Datatype datatype, int source,
assert(buf);
assert(request);

printf("MPI_Irecv should not be called in serial.\n");
exit(0);
/* Could assert tag is ok */
*request = tag;

return MPI_SUCCESS;
}
Expand Down Expand Up @@ -346,8 +368,8 @@ int MPI_Isend(void * buf, int count, MPI_Datatype datatype, int dest,
assert(buf);
assert(request);

printf("MPI_Isend should not be called in serial\n");
exit(0);
/* Could assert tag is ok */
*request = tag;

return MPI_SUCCESS;
}
Expand Down Expand Up @@ -383,7 +405,6 @@ int MPI_Waitall(int count, MPI_Request * requests, MPI_Status * statuses) {

assert(count >= 0);
assert(requests);
assert(statuses);

return MPI_SUCCESS;
}
Expand All @@ -396,12 +417,25 @@ int MPI_Waitall(int count, MPI_Request * requests, MPI_Status * statuses) {
*****************************************************************************/

int MPI_Waitany(int count, MPI_Request requests[], int * index,
MPI_Status * statuses) {
MPI_Status * status) {

assert(count >= 0);
assert(requests);
assert(index);
assert(statuses);

*index = MPI_UNDEFINED;

for (int ireq = 0; ireq < count; ireq++) {
if (requests[ireq] != MPI_REQUEST_NULL) {
*index = ireq;
requests[ireq] = MPI_REQUEST_NULL;
if (status) {
status->MPI_SOURCE = 0;
status->MPI_TAG = requests[ireq];
}
break;
}
}

return MPI_SUCCESS;
}
Expand All @@ -417,7 +451,6 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status) {

assert(source == 0);
assert(mpi_is_valid_comm(comm));
assert(status);

printf("MPI_Probe should not be called in serial\n");
exit(0);
Expand All @@ -440,7 +473,6 @@ int MPI_Sendrecv(void * sendbuf, int sendcount, MPI_Datatype sendtype,
assert(dest == source);
assert(recvbuf);
assert(recvcount == sendcount);
assert(status);

printf("MPI_Sendrecv should not be called in serial\n");
exit(0);
Expand Down Expand Up @@ -737,62 +769,6 @@ int MPI_Type_vector(int count, int blocklength, int stride,
return MPI_SUCCESS;
}

/*****************************************************************************
*
* MPI_Type_struct
*
* Superceded by MPI_Type_create_struct.
*
*****************************************************************************/

int MPI_Type_struct(int count, int * array_of_blocklengths,
MPI_Aint * array_of_displacements,
MPI_Datatype * array_of_types, MPI_Datatype * newtype) {

assert(count > 0);
assert(array_of_blocklengths);
assert(array_of_displacements);
assert(array_of_types);
assert(newtype);

printf("MPI_Type_struct: please use MPI_Type_create_struct instead\n");

return -1;
}

/*****************************************************************************
*
* MPI_Address
*
* Please use MPI_Get_Address().
*
*****************************************************************************/

int MPI_Address(void * location, MPI_Aint * address) {

assert(location);
assert(address);

*address = 0;

return MPI_SUCCESS;
}

/*****************************************************************************
*
* MPI_Errhandler_set
*
*****************************************************************************/

int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) {

assert(mpi_info);
assert(comm != MPI_COMM_NULL);
assert(errhandler == MPI_ERRORS_ARE_FATAL);

return MPI_SUCCESS;
}

/*****************************************************************************
*
* MPI_Cart_create
Expand Down
3 changes: 3 additions & 0 deletions src/advection.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ int advection_x(advflux_t * obj, hydro_t * hydro, field_t * field) {
advflux_memcpy(obj, tdpMemcpyHostToDevice);
break;
case 5:
/* Ditto */
advflux_memcpy(obj, tdpMemcpyDeviceToHost);
advection_le_5th(obj, hydro, nf, field->data);
advflux_memcpy(obj, tdpMemcpyHostToDevice);
break;
default:
pe_fatal(obj->pe, "Unexpected advection scheme order\n");
Expand Down
Loading

0 comments on commit 19093eb

Please sign in to comment.