Skip to content

Fallback binary chains

magnum edited this page Nov 13, 2015 · 21 revisions

Here's how to do OpenMP or CPU fallback, with Jumbo & autoconf. This works also without JOHN_SYSTEMWIDE since 9e5f65a.

##OpenMP fallback Here's how to do just OpenMP fallback (native)

./configure --disable-openmp && make -s clean && make -sj8 && mv ../run/john ../run/john-non-omp &&
./configure CPPFLAGS='-DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-non-omp\""' &&
make -s clean && make -sj8 && echo All Done

Then, you always run "john" but it will silently switch to "john-non-omp" when applicable, for better performance.

##CPU fallback Here's how to build a CPU-fallback chain (with OpenMP fallback too) without JOHN_SYSTEMWIDE. For eg. heterogenous MPI clusters, this is required so you can just run "john" on all nodes regardless of what SIMD feature set it's got.

./configure --disable-native-tests --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-sse2-non-omp &&
./configure --disable-native-tests CPPFLAGS='-DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-sse2-non-omp\""' &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-sse2 &&
./configure --disable-native-tests CPPFLAGS=-mavx --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-avx-non-omp &&
./configure --disable-native-tests CPPFLAGS='-mavx -DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-avx-non-omp\"" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY="\"john-sse2\""' &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-avx &&
./configure --disable-native-tests CPPFLAGS=-mxop --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-xop-non-omp &&
./configure --disable-native-tests CPPFLAGS='-mxop -DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-xop-non-omp\"" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY="\"john-avx\""' &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-xop &&
./configure --disable-native-tests CPPFLAGS=-mavx2 --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-non-omp &&
./configure --disable-native-tests CPPFLAGS='-mavx2 -DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-non-omp\"" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY="\"john-xop\""' &&
make -s clean && make -sj8 && echo All Done

Then, you always run "john" but it will fallback to john-xop -> john-avx -> john-sse2 or to any of them with -non-omp, as appropriate.

##CPU fallback, without XOP Here's the same as above but without XOP, because OSX can't build XOP (native 'as' doesn't support it).

./configure --disable-native-tests --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-sse2-non-omp &&
./configure --disable-native-tests CPPFLAGS='-DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-sse2-non-omp\""' &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-sse2 &&
./configure --disable-native-tests CPPFLAGS=-mavx --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-avx-non-omp &&
./configure --disable-native-tests CPPFLAGS='-mavx -DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-avx-non-omp\"" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY="\"john-sse2\""' &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-avx &&
./configure --disable-native-tests CPPFLAGS=-mavx2 --disable-openmp &&
make -s clean && make -sj8 &&
mv ../run/john ../run/john-non-omp &&
./configure --disable-native-tests CPPFLAGS='-mavx2 -DOMP_FALLBACK -DOMP_FALLBACK_BINARY="\"john-non-omp\"" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY="\"john-avx\""' &&
make -s clean && make -sj8 && echo All Done