Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # prallel himeno benchmark, needs mpifort, mpirun, wget, unzip and lzh unzipper(lhasa in arch linux)
- # Get number of cores
- cores=$(nproc)
- echo Detected $cores cores
- # Get date for temp folder name
- now=$(date +"%d.%m.%Y")
- tmpdir=/tmp/himeno-$now
- # Make temp dir and move to it (remove if exists)
- if [ -d $tmpdir ]; then echo "Temporary directory exists, removing it" & rm -rf $tmpdir; fi
- mkdir $tmpdir
- cd $tmpdir
- # Get himeno benchmark and unpack
- wget "http://accc.riken.jp/en/wp-content/uploads/sites/2/2015/07/f77_xp_mpi.zip"
- unzip f77_xp_mpi.zip
- lha -e f77_xp_mpi.lzh
- # Make paramset.h executable and run it to make use of all cores
- chmod +x paramset.sh
- sh ./paramset.sh S 1 1 $cores
- # Compile using mpifort
- mpifort himenoBMTxpr.f
- # Run the test using all cores
- mpirun -np $cores ./a.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement