Skip to content

Commit

Permalink
Merge pull request #13 from milc-qcd/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
maddyscientist authored Dec 21, 2018
2 parents 30d3473 + 9494b31 commit 4f77680
Show file tree
Hide file tree
Showing 35 changed files with 975 additions and 426 deletions.
3 changes: 3 additions & 0 deletions Make_template_scidac
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ endif

ifeq ($(strip ${HAVEQMP}),true)
CSCIDAC += -DHAVE_QMP
ifneq ($(strip ${QMP_BACKEND}),)
CSCIDAC += -D${QMP_BACKEND}
endif
endif

ifeq ($(strip ${HAVEQIO}),true)
Expand Down
40 changes: 23 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ COMPILER ?= gnu # intel, ibm, portland, cray-intel
# 3. MPP vs Scalar

# Compiling for a parallel machine? blank for a scalar machine
MPP ?= true
MPP ?= false

#----------------------------------------------------------------------
# 4. Precision
Expand All @@ -40,45 +40,48 @@ PRECISION ?= 1
ifeq ($(strip ${COMPILER}),intel)

ifeq ($(strip ${MPP}),true)
CC ?= mpiicc
CXX ?= mpiicpc
MY_CC ?= mpiicc
MY_CXX ?= mpiicpc
else
CC ?= icc
CXX ?= icpc
MY_CC ?= icc
MY_CXX ?= icpc
endif

else ifeq ($(strip ${COMPILER}),cray-intel)

ifeq ($(strip ${MPP}),true)
CC ?= cc
CXX ?= CC
MY_CC ?= cc
MY_CXX ?= CC
else
CC ?= icc
CXX ?= icpc
MY_CC ?= icc
MY_CXX ?= icpc
endif

else ifeq ($(strip ${COMPILER}),gnu)

ifeq ($(strip ${MPP}),true)
CC ?= mpicc
CXX ?= mpiCC
MY_CC ?= mpicc
MY_CXX ?= mpiCC
else
CC ?= gcc
CXX ?= g++
MY_CC ?= gcc
MY_CXX ?= g++
endif

else ifeq ($(strip ${COMPILER}),ibm)

ifeq ($(strip ${MPP}),true)
CC = mpixlc_r
CXX = mpixlcxx_r
MY_CC ?= mpixlc_r
MY_CXX ?= mpixlcxx_r
else
CC = bgxlc_r
CXX = bgxlc++_r
MY_CC ?= bgxlc_r
MY_CXX ?= bgxlc++_r
endif

endif

CC = ${MY_CC}
CXX = ${MY_CXX}

# Override the above definitions

# ifeq ($(strip ${MPP}),true)
Expand Down Expand Up @@ -284,6 +287,9 @@ WANTQIO ?= # true # or blank. Implies HAVEQMP.

WANTQMP ?= # true or blank.

# QMP_MPI or QMP_SPI
QMP_BACKEND = QMP_MPI

# Edit these locations for the installed SciDAC packages
# It is assumed that these are the parents of "include" and "lib"

Expand Down
11 changes: 10 additions & 1 deletion generic/com_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static int n_gathers, gather_array_len;
* BASIC COMMUNICATIONS FUNCTIONS *
**********************************************************************/

void
static void
err_func(MPI_Comm *comm, int *stat, ...)
{
int len;
Expand Down Expand Up @@ -696,6 +696,15 @@ mynode(void)
return(node);
}

/*
** Return a pointer to my MPI communicator
*/
void *
mycomm(void)
{
return (void *)&MPI_COMM_THISJOB;
}

/*
** Return number of nodes
*/
Expand Down
22 changes: 22 additions & 0 deletions generic/com_qmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,28 @@ machine_type(void)
return(name);
}

/*
** Return a pointer to my MPI communicator
*/

#ifdef QMP_MPI
QMP_status_t QMP_get_mpi_comm(QMP_comm_t comm, void** mpicomm);

void *
mycomm(void)
{
void *comm;
QMP_get_mpi_comm(QMP_comm_get_default(), &comm);
return comm;
}
#else
void *
mycomm(void)
{
return NULL;
}
#endif

/*
** Return my node number
*/
Expand Down
9 changes: 9 additions & 0 deletions generic/com_vanilla.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ machine_type(void)
return(name);
}

/*
** Return NULL because we have no MPI communicator
*/
void *
mycomm(void)
{
return NULL;
}

/*
** Return my node number
*/
Expand Down
Loading

0 comments on commit 4f77680

Please sign in to comment.