Changeset 8e20490 in rtems-testing


Ignore:
Timestamp:
May 15, 2012, 8:51:44 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
c912158
Parents:
f0bc7c2
Message:

bit_rtems - Determine make parallel jobs dynamically

Use 1.5 * number of CPU cores + 1. If the getconf fails,
assume the machine has 2 cores for a minimum of -j3.
On a 4 core machine, this yields a -j7.

The -j factor is not intended to be nice but to maximize
the use of the machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtems/bit_rtems

    rf0bc7c2 r8e20490  
    384384fi
    385385
     386# Calculate number of jobs as 1.5*ncpus + 1
     387ncpus=`/usr/bin/getconf _NPROCESSORS_ONLN 2>/dev/null`
     388if [ $? -ne 0 ] ; then
     389  ncpus=2
     390fi
     391njobs=`expr ${ncpus} / 2 + 1 + ${ncpus}`
     392echo "Using make ${njobs} parallel jobs"
     393
    386394case ${BSP_TO_TEST} in
    387395  multilib)
    388396     echo "Executing ${MAKE} ${MAKE_DEBUG_ARG} ..."
    389      ${MAKE} -j8 RTEMS_BSP= ${MAKE_DEBUG_ARG}
     397     ${MAKE} -j${njobs} RTEMS_BSP= ${MAKE_DEBUG_ARG}
    390398     check_fatal $? "failed ${MAKE} ${MAKE_DEBUG_ARG}."
    391399     BSP_TO_TEST=
     
    393401  *)
    394402     echo "Executing ${MAKE} ${MAKE_DEBUG_ARG} ..."
    395      ${MAKE} -j8 RTEMS_BSP=${BSP_TO_TEST} ${MAKE_DEBUG_ARG}
     403     ${MAKE} -j${njobs} RTEMS_BSP=${BSP_TO_TEST} ${MAKE_DEBUG_ARG}
    396404     check_fatal $? "failed ${MAKE} ${MAKE_DEBUG_ARG}."
    397405     ;;
     
    440448
    441449     echo "Executing multilib BSP: ${MAKE} ${MAKE_DEBUG_ARG} ..."
    442      ${MAKE} -k -j8 ${MAKE_DEBUG_ARG}
     450     ${MAKE} -k -j${njobs} ${MAKE_DEBUG_ARG}
    443451     status=$?
    444452
Note: See TracChangeset for help on using the changeset viewer.