Skip to content

Commit

Permalink
[Cylon] Add MPI environment variable
Browse files Browse the repository at this point in the history
Signed-off-by: Arup Sarker <[email protected]>
  • Loading branch information
arupcsedu committed May 19, 2024
1 parent 74e6c94 commit cf4393a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
20 changes: 20 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,26 @@ def build_cpp():
logger.info(f"Generate Symbolic link: {sym_generator}")
res = subprocess.call(sym_generator, cwd=BUILD_DIR, shell=True)
check_status(res, "Generate Symbolic link")

export_cc = f"export CC=`which mpicc`"
logger.info(f"export cc: {export_cc}")
res = subprocess.call(export_cc, cwd=BUILD_DIR, shell=True)
check_status(res, "Export CC")

export_cxx = f"export CXX=`which mpicxx`"
logger.info(f"export cxx: {export_cxx}")
res = subprocess.call(export_cxx, cwd=BUILD_DIR, shell=True)
check_status(res, "Export CXX")

export_mpicc = f"export MPI_CC=`which mpicc`"
logger.info(f"export mpicc: {export_mpicc}")
res = subprocess.call(export_mpicc, cwd=BUILD_DIR, shell=True)
check_status(res, "Export MPI_CC")

export_mpicxx = f"export MPI_CXX=`which mpicxx`"
logger.info(f"export mpicxx: {export_mpicxx}")
res = subprocess.call(export_mpicxx, cwd=BUILD_DIR, shell=True)
check_status(res, "Export MPI_CXX")

cmake_command = f"cmake -DPYCYLON_BUILD={on_off(BUILD_PYTHON)} {win_cmake_args} " \
f"-DCMAKE_BUILD_TYPE={CPP_BUILD_MODE} " \
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ build_cpp_conda() {
print_line
echo "Building Conda CPP in ${BUILD_MODE} mode"
print_line

export CC=`which mpicc`
export CXX=`which mpicxx`
export MPI_CC=`which mpicc`
export MPI_CXX=`which mpicxx`

# set install path to conda directory if not already set
INSTALL_PATH=${INSTALL_PATH:=${PREFIX:=${CONDA_PREFIX}}}
Expand Down
8 changes: 3 additions & 5 deletions conda/environments/gcylon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ channels:
- rapidsai
- conda-forge
- nvidia
- nvidia/label/cuda-12.2.0
- defaults
dependencies:
- python=3.9
- cudf=24.04
- python=3.11
- cuda-version=12.2
#- pytorch
- cudatoolkit
- cmake>=3.23.1
#- arrow-cpp=14.0.2
#- pyarrow=14.0.2
- cython
- glog
- openmpi=4.1.4
Expand All @@ -30,3 +26,5 @@ dependencies:
- gcc=11.4
- gxx=11.4
- gxx_linux-64=11.4
- cuda-runtime
- cudatoolkit

0 comments on commit cf4393a

Please sign in to comment.