Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/f_soa_p8' into feature/f…
Browse files Browse the repository at this point in the history
…_soa_p8
  • Loading branch information
reguly committed May 31, 2016
2 parents 3714a48 + 5a6638a commit 565a0dc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
36 changes: 36 additions & 0 deletions apps/c/bin/numawrap20
@@ -0,0 +1,36 @@
#!/bin/bash
# e.g. mpirun -np 4 numawrap ./application

# Find the rank of the process from the MPI local rank environment variable
# to ensure unique output filenames.
if [[ -n ${OMPI_COMM_WORLD_LOCAL_RANK} ]]
then
let lrank=${OMPI_COMM_WORLD_LOCAL_RANK}
elif [[ -n ${MV2_COMM_WORLD_LOCAL_RANK} ]]
then
let lrank=${MV2_COMM_WORLD_LOCAL_RANK}
elif [[ -n ${PMI_RANK} ]]
then
let lrank=${PMI_RANK}
elif [[ -n ${PMI_ID} && -n ${MPISPAWN_LOCAL_NPROCS} ]]
then
let lrank=${PMI_ID}%${PERHOST}
elif [[ -n ${MPI_LOCALRANKID} ]]
then
let lrank=${MPI_LOCALRANKID}
else
echo could not determine local rank
fi

export CUDA_VISIBLE_DEVICES=${lrank}
echo "cuda devces" $CUDA_VISIBLE_DEVICES
#let lrank=${PMI_RANK}
echo $lrank

if [[ $lrank -lt 10 ]]; then
numactl --cpunodebind=0 ${@}
fi

if [[ $lrank -ge 10 ]]; then
numactl --cpunodebind=1 ${@}
fi
11 changes: 6 additions & 5 deletions scripts/test_cmake.sh
Expand Up @@ -28,6 +28,7 @@ echo "In directory $PWD"
# test Arifoil DP- with plain text file I/O
#-------------------------------------------------------------------------------

#<<COMMENT
echo " "
echo "----------------Testing airfoil_dp_seq ----------------------------------"
echo " "
Expand Down Expand Up @@ -137,7 +138,6 @@ export OMP_NUM_THREADS=2
$MPI_INSTALL_PATH/bin/mpirun -np 11 ./airfoil_sp_mpi_openmp OP_PART_SIZE=256 > perf_out
grep "1.060" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out


#-------------------------------------------------------------------------------
# test Arifoil DP- with hdf5 file I/O
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -199,7 +199,7 @@ grep "1.060" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
#-------------------------------------------------------------------------------

echo " "
echo "-----------------Testing Sairfoil_tempdats_seq---------------------------"
echo "-----------------Testing airfoil_tempdats_seq---------------------------"
echo " "
./airfoil_tempdats_seq > perf_out
grep "1.060" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
Expand Down Expand Up @@ -339,6 +339,7 @@ echo " "
$MPI_INSTALL_PATH/bin/mpirun -np 20 ./jac2_mpi > perf_out
grep "Results check" perf_out

#COMMENT


#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -380,7 +381,7 @@ grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
echo " "
echo "-------------------Testing aero_dp_mpi_cuda 2 mpi procs------------------"
echo " "
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./aero_dp_mpi_cuda OP_PART_SIZE=128 OP_BLOCK_SIZE=192 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./numawrap20 ./aero_dp_mpi_cuda OP_PART_SIZE=128 OP_BLOCK_SIZE=192 > perf_out
grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out

echo " "
Expand All @@ -404,7 +405,7 @@ grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
#-------------------------------------------------------------------------------

echo " "
echo "-------------------Testing Saero_hdf5_dp_seq-----------------------------"
echo "-------------------Testing aero_hdf5_dp_seq-----------------------------"
echo " "
./aero_hdf5_dp_seq > perf_out
grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
Expand Down Expand Up @@ -438,7 +439,7 @@ grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out
echo " "
echo "-------------------Testing aero_hdf5_dp_mpi_cuda 2 mpi procs-------------"
echo " "
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./aero_hdf5_dp_mpi_cuda OP_PART_SIZE=128 OP_BLOCK_SIZE=192 > perf_out
$MPI_INSTALL_PATH/bin/mpirun -np 2 ./numawrap20 ./aero_hdf5_dp_mpi_cuda OP_PART_SIZE=128 OP_BLOCK_SIZE=192 > perf_out
grep "iter: 200" perf_out;grep "Max total runtime" perf_out;tail -n 1 perf_out

echo " "
Expand Down

0 comments on commit 565a0dc

Please sign in to comment.