# *************************************************************************
# *                                                                       *
# *  Makefile for HeteroMPI library                                       *
# *                                                                       *
# *                                                                       *
# *  Copyright (c) 2002 Department of Computer Science,                   *
# *                     University College Dublin, Ireland.               *
# *                                                                       *
# *  All rights reserved. We assume no responsibility for the use         *
# *  or reliability of our software.                                      *
# *                                                                       *
# *************************************************************************

###############################################
#                                             #
#    INSTALLATION DIRECTORY                   #
#                                             #
###############################################
HMPI_HOME_DIR 	= $(HMPI_HOME)

CC		= gcc
CPP		= g++
CC_INCLUDES	= -I$(MPCHOME)/h -I$(MPIDIR)/include -I./include
OPT		= -O2
GOPT		= -g

all: create_install_dir build do_install

create_install_dir:
	@echo "#############################################################"
	@echo "Creating installation directory $(HMPI_HOME)"
	@echo "#############################################################"
	-mkdir -p $(HMPI_HOME)

build: build_src build_tools

build_third_party_software:
	@echo "#############################################################"
	@echo "Building third-party software"
	@echo "#############################################################"
	(cd ./Third_Party_Software/metis-4.0 && make)

build_src:
	(cd src/heterompi && make)

build_tools:
	@echo "#############################################################"
	@echo "Building tools"
	@echo "#############################################################"
	(cd ./tools && make)
	(cd ./scripts && ./print_hmpi_info_file hmpi_version_info && chmod a+x hmpi_version_info)

do_install: build_tree copy_elements create_soft_links copy_third_party_software copy_tests message

build_tree:
	@echo "#############################################################"
	@echo "Installing into directory $(HMPI_HOME_DIR)"
	@echo "#############################################################"
	-mkdir -p $(HMPI_HOME_DIR)/man/man1
	-mkdir -p $(HMPI_HOME_DIR)/bin
	-mkdir -p $(HMPI_HOME_DIR)/include
	-mkdir -p $(HMPI_HOME_DIR)/h
	-mkdir -p $(HMPI_HOME_DIR)/docs
	-mkdir -p $(HMPI_HOME_DIR)/scripts
	-mkdir -p $(HMPI_HOME_DIR)/tests
	-mkdir -p $(HMPI_HOME_DIR)/tests/Environment
	-mkdir -p $(HMPI_HOME_DIR)/tests/Groups
	-mkdir -p $(HMPI_HOME_DIR)/tests/Performance
	-mkdir -p $(HMPI_HOME_DIR)/tests/Timeof
	-mkdir -p $(HMPI_HOME_DIR)/tests/Timeof/bcast
	-mkdir -p $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm
	-mkdir -p $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq
	-mkdir -p $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp
	-mkdir -p $(HMPI_HOME_DIR)/tests/Recon
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Irregular
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm
	-mkdir -p $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/Jacobi
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto
	-mkdir -p $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous
	-mkdir -p $(HMPI_HOME_DIR)/tests/Irregular
	-mkdir -p $(HMPI_HOME_DIR)/tests/Irregular/em3d
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/sets
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/matrices
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/graphs
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/trees
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/Memory_bounds
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/Generate_cholesky_data
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/Generate_mxm_data
	-mkdir -p $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/Memory_bounds
	-mkdir -p $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm
	-mkdir -p $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv
	-mkdir -p $(HMPI_HOME_DIR)/tests/Performance_model_tests

copy_elements:
	-/bin/cp ./man/man1/* $(HMPI_HOME_DIR)/man/man1/
	-/bin/cp ./docs/heterompi-1.0-uguide.pdf $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/heterompi-1.0-uguide.ps $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/heterompi-1.0-uguide.doc $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/mpc-3.x.x-spec.pdf $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/mpc-3.x.x-spec.ps $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/mpc-3.x.x-uguide.pdf $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./docs/mpc-3.x.x-uguide.ps $(HMPI_HOME_DIR)/docs/
	-/bin/cp ./tools/create_hmpiload $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiload $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiclean $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiclean_mpcload $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiloadclean $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiclean_mpctopo $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpitopoclean $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpiautorun $(HMPI_HOME_DIR)/bin
	-/bin/cp ./tools/hmpibcast $(HMPI_HOME_DIR)/bin

	-/bin/cp ./include/hmpi.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hdpi.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_err.h $(HMPI_HOME_DIR)/include/ 
	-/bin/cp ./include/hmpi_ops.h $(HMPI_HOME_DIR)/include/ 
	-/bin/cp ./include/hmpi_internal.h $(HMPI_HOME_DIR)/include/ 
	-/bin/cp ./include/hmpi_partitioning_internal.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_types.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_sets.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_trees.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_matrices.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_graphs.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./include/hmpi_partitioning_graphs_wrappers.h $(HMPI_HOME_DIR)/include/

	-/bin/cp ./include/hmpi.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hdpi.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_err.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_ops.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_internal.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_internal.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_types.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_sets.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_trees.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_matrices.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_graphs.h $(HMPI_HOME_DIR)/h
	-/bin/cp ./include/hmpi_partitioning_graphs_wrappers.h $(HMPI_HOME_DIR)/h

	-/bin/cp ./scripts/hmpi_version_info $(HMPI_HOME_DIR)/scripts/

create_soft_links:
	-ln -sf $(MPCHOME)/bin/mpcc $(HMPI_HOME_DIR)/bin/hmpicc
	-ln -sf $(MPCHOME)/bin/mpcrun $(HMPI_HOME_DIR)/bin/hmpirun

copy_third_party_software:
	-/bin/cp ./Third_Party_Software/metis-4.0/Lib/metis.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./Third_Party_Software/hmetis-1.5/Lib/hmetis.h $(HMPI_HOME_DIR)/include/
	-/bin/cp ./Third_Party_Software/metis-4.0/Lib/metis.h $(HMPI_HOME_DIR)/h/
	-/bin/cp ./Third_Party_Software/hmetis-1.5/Lib/hmetis.h $(HMPI_HOME_DIR)/h/

copy_tests:
	-/bin/cp ./tests/Environment/README $(HMPI_HOME_DIR)/tests/Environment/
	-/bin/cp ./tests/Environment/Init_and_Exit.c $(HMPI_HOME_DIR)/tests/Environment/

	-/bin/cp ./tests/Groups/README $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/Test_group_create.c $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/simpleGrid.* $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/Test_predefined_groups.c $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/Test_group_1.c $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/Test_group_2.c $(HMPI_HOME_DIR)/tests/Groups/
	-/bin/cp ./tests/Groups/Test_group_3.c $(HMPI_HOME_DIR)/tests/Groups/
	
	-/bin/cp ./tests/Performance/README $(HMPI_HOME_DIR)/tests/Performance/
	-/bin/cp ./tests/Performance/simpleGrid.* $(HMPI_HOME_DIR)/tests/Performance/
	-/bin/cp ./tests/Performance/Get_processor_perf.c $(HMPI_HOME_DIR)/tests/Performance/
	-/bin/cp ./tests/Performance/Get_processes_perf.c $(HMPI_HOME_DIR)/tests/Performance/
	
	-/bin/cp ./tests/Timeof/bcast/README $(HMPI_HOME_DIR)/tests/Timeof/bcast/
	-/bin/cp ./tests/Timeof/bcast/bcast.c $(HMPI_HOME_DIR)/tests/Timeof/bcast/
	-/bin/cp ./tests/Timeof/bcast/bcast.mpc $(HMPI_HOME_DIR)/tests/Timeof/bcast/
	-/bin/cp ./tests/Timeof/bcast/counter.h $(HMPI_HOME_DIR)/tests/Timeof/bcast/
	-/bin/cp ./tests/Timeof/bcast/HMPI_bcast.c $(HMPI_HOME_DIR)/tests/Timeof/bcast/

	-/bin/cp ./tests/Timeof/striped_mxm/README $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/mxm.c  $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/mxm_i.c $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/mxm_i.h $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/mxm_recon.c $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/counter.h   $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/ParallelAxB.c   $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/
	-/bin/cp ./tests/Timeof/striped_mxm/ParallelAxB.mpc   $(HMPI_HOME_DIR)/tests/Timeof/striped_mxm/

	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/README $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/mxm.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/mxm_i.h $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/mxm_i.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/Load_balance.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxq/counter.h $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxq/

	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/README $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/mxm.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/mxm_i.h $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/mxm_i.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/Load_balance.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/
	-/bin/cp ./tests/Timeof/block_cyclic_mxm_pxp/counter.h $(HMPI_HOME_DIR)/tests/Timeof/block_cyclic_mxm_pxp/

	-/bin/cp ./tests/Recon/README $(HMPI_HOME_DIR)/tests/Recon/
	-/bin/cp ./tests/Recon/simpleGrid.* $(HMPI_HOME_DIR)/tests/Recon/
	-/bin/cp ./tests/Recon/Test_recon_mxm.c $(HMPI_HOME_DIR)/tests/Recon/
	-/bin/cp ./tests/Recon/Test_recon_cholesky.c $(HMPI_HOME_DIR)/tests/Recon/
	-/bin/cp ./tests/Recon/Test_recon_mxm_processes_perf.c $(HMPI_HOME_DIR)/tests/Recon/

	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/README $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/mxm.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/mxm_i.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/mxm_i.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/counter.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm/Load_balance.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm/
	
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/README $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/mxm.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/mxm_i.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/mxm_i.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/counter.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/
	-/bin/cp ./tests/MPI/Linear_algebra/block_cyclic_mxm_timed/Load_balance.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/block_cyclic_mxm_timed/

	-/bin/cp ./tests/MPI/Linear_algebra/striped_mxm/README $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_mxm/mxm.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_mxm/mxm_i.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_mxm/mxm_i.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_mxm/counter.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_mxm/

	-/bin/cp ./tests/MPI/Linear_algebra/striped_cholesky/README $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_cholesky/cholesky.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_cholesky/cholesky_i.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_cholesky/cholesky_i.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky/
	-/bin/cp ./tests/MPI/Linear_algebra/striped_cholesky/counter.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/striped_cholesky/

	-/bin/cp ./tests/MPI/Linear_algebra/Jacobi/README $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/Jacobi/
	-/bin/cp ./tests/MPI/Linear_algebra/Jacobi/jacobi.c $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/Jacobi/
	-/bin/cp ./tests/MPI/Linear_algebra/Jacobi/counter.h $(HMPI_HOME_DIR)/tests/MPI/Linear_algebra/Jacobi/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/README.pdf $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/mxm.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/mxm.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/mxm_i.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/Load_balance.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/Load_balance.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp_mpc/

	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/README $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/mxm_recon.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_auto/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_auto/

	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/README $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/mxm_recon.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/
	-/bin/cp ./tests/Linear_algebra/striped_mxm_no_auto/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/striped_mxm_no_auto/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_auto/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_no_auto/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxp/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxp/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/ParallelAxB.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/ParallelAxB.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_grid_pxq_memory_efficient/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/mxm.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/mxm_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/mxm_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/simple.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_mxm_1d_contiguous/

	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/README $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/cholesky_mpc.mpc $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/cholesky.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/cholesky_i.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/cholesky_i.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/counter.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/Load_balance.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/errors.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/errors.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/mat.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/mat.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/vec.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/vec.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/qinv.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/qinv.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/simpleGrid.c $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/
	-/bin/cp ./tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/simpleGrid.h $(HMPI_HOME_DIR)/tests/Linear_algebra/block_cyclic_cholesky_grid_pxp/

	-/bin/cp ./tests/Irregular/em3d/README $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/counter.h $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/em3d.c $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/em3d.mpc $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/HMPI_em3d.c $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/HMPI_em3d.h $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/HMPI_em3d_i.c $(HMPI_HOME_DIR)/tests/Irregular/em3d/
	-/bin/cp ./tests/Irregular/em3d/HMPI_recon.c $(HMPI_HOME_DIR)/tests/Irregular/em3d/

	-/bin/cp ./tests/MPI/Irregular/em3d/README $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d/
	-/bin/cp ./tests/MPI/Irregular/em3d/counter.h $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d/
	-/bin/cp ./tests/MPI/Irregular/em3d/MPI_em3d.c $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d/
	-/bin/cp ./tests/MPI/Irregular/em3d/MPI_em3d.h $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d/
	-/bin/cp ./tests/MPI/Irregular/em3d/MPI_em3d_i.c $(HMPI_HOME_DIR)/tests/MPI/Irregular/em3d/

	-/bin/cp ./tests/Partitioning/sets/* $(HMPI_HOME_DIR)/tests/Partitioning/sets/
	-/bin/cp ./tests/Partitioning/matrices/* $(HMPI_HOME_DIR)/tests/Partitioning/matrices/

	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/bounds.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/counter.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/mxm.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/mxm_i.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/mxm_i.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/mxm_data.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/mxm_data.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/Generate_mxm_data/* $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/Generate_mxm_data/
	-/bin/cp ./tests/Partitioning/Applications/striped_mxm/Memory_bounds/* $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_mxm/Memory_bounds/

	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/Memory_bounds/* $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/Memory_bounds/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/Generate_cholesky_data/* $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/Generate_cholesky_data/

	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/bounds.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/counter.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/cholesky.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/cholesky_i.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/cholesky_i.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/cholesky_data.h $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/
	-/bin/cp ./tests/Partitioning/Applications/striped_cholesky/cholesky_data.c $(HMPI_HOME_DIR)/tests/Partitioning/Applications/striped_cholesky/

	-/bin/cp ./tests/ScaLAPACK/gemm/README $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/counter.h $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/counter_auto.h $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/ParallelAxB* $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/pdgemm* $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/simpleGrid.* $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/pdmatgen.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/
	-/bin/cp ./tests/ScaLAPACK/gemm/pmatgeninc.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gemm/

	-/bin/cp ./tests/ScaLAPACK/gesv/README $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/counter.h $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/counter_auto.h $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/pdgesv.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/pdgesv_auto.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/simpleGrid.* $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/pdmatgen.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/pmatgeninc.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/
	-/bin/cp ./tests/ScaLAPACK/gesv/Generate_matrix.c $(HMPI_HOME_DIR)/tests/ScaLAPACK/gesv/

	-/bin/cp ./tests/Performance_model_tests/* $(HMPI_HOME_DIR)/tests/Performance_model_tests/

message:
	@echo "#############################################################"
	@echo "   Installation of HeteroMPI SUCCESSFUL"
	@echo "   Update your shell startup files with the following:"
	@echo "export HMPI_HOME=$(HMPI_HOME)"
	@echo "export MPCHOME=$(HMPI_HOME)"
	@echo "   Set the value below in PATH environment variable"
	@echo "$(HMPI_HOME)/bin"
	@echo "   Set the value below in MANPATH environment variable"
	@echo "$(HMPI_HOME)/man"
	@echo "#############################################################"

clean:
	(cd src/heterompi && make clean)
	(cd tools && make clean)
	(cd ./Third_Party_Software/metis-4.0 && make realclean)
	(cd ./Third_Party_Software/metis-4.0/DummyLibSrc && make clean)
	(cd ./Third_Party_Software/hmetis-1.5/DummyLibSrc && make clean)

%.o: %.c
	$(CC) $(OPT) $(CC_INCLUDES) -c -o $@ $<
