Build and install Charm with Arm Compiler for HPC

  1. Change into the charm-6.8.0 directory, using:

    cd charm-6.8.0
  2. Generate an armclang configuration for the required architecture based on the existing one in src/arch/, for example src/arch/multicore-linux64, using:


    cp -R src/arch/multicore-linux64 src/arch/$CHARMARCH

    sed -i "s|^CMK_CPP_CHARM=.*|CMK_CPP_CHARM='cpp -P'|g" $FILE
    sed -i "s|^CMK_NATIVE_CC=.*|CMK_NATIVE_CC='$CC '|g" $FILE
    sed -i "s|^CMK_NATIVE_CXX=.*|CMK_NATIVE_CXX='$CXX '|g" $FILE
    sed -i "s|^CMK_NATIVE_LD=.*|CMK_NATIVE_LD='$CC '|g" $FILE
    sed -i "s|^CMK_NATIVE_LDXX=.*|CMK_NATIVE_LDXX='$CXX '|g" $FILE
    sed -i "s|^CMK_QT=.*|CMK_QT='generic64-light '|g" $FILE
    sed -i "s|^CMK_CF77=.*|CMK_CF77='$FC '|g" $FILE
    sed -i "s|^CMK_CF90=.*|CMK_CF90='$FC '|g" $FILE
    sed -i "s|^CMK_CF90_FIXED=.*|CMK_CF90_FIXED='$FC -Mfixed '|g" $FILE

    sed -i "/#endif/i #define CMK_THREADS_USE_CONTEXT                            1" ${}.h
    sed -i "/#endif/i #define CMK_THREADS_USE_PTHREADS                           0" ${}.h
    sed -i "/#endif/i #define CMK_64BIT                                          1" ${}.h

    sed -i "s|cc-gcc|cc-armclang|g" $FILE

    cp src/arch/common/ src/arch/common/

    sed -i "s|gcc|armclang|g" src/arch/common/
    sed -i "s|g++|armclang++|g" src/arch/common/
  3. Configure and build Charm++, using:

    mkdir ${INSTALL_DIR}/charm680/
    ./build charm++ $CHARMARCH --with-production --destination=${INSTALL_DIR}/charm680/${CHARMARCH} -j
Previous Next