Skip to content

cmake build system lacks optimization settings #172

@SamuelTrahanNOAA

Description

@SamuelTrahanNOAA

The optimization settings in the Makefile are absent from the CMake-based build system. This will lead to different performance. @guoqing-noaa alerted me to this problem.

From Makefile:

intel:   # BUILDTARGET Intel oneAPI Fortran, C, and C++ compiler suite
        ( $(MAKE) all \
        "FC_PARALLEL = mpifort" \
        "CC_PARALLEL = mpicc" \
        "CXX_PARALLEL = mpic++" \
        "FC_SERIAL = ifx" \
        "CC_SERIAL = icx" \
        "CXX_SERIAL = icpx" \
        "FFLAGS_PROMOTION = -real-size 64" \
        "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \
        "CFLAGS_OPT = -O3" \
        "CXXFLAGS_OPT = -O3" \
        "LDFLAGS_OPT = -O3" \
        "FFLAGS_DEBUG = -g -convert big_endian -free -check bounds,pointers,arg_temp_created,format,shape,contiguous -fpe0 -traceback" \
        "CFLAGS_DEBUG = -g -traceback" \
        "CXXFLAGS_DEBUG = -g -traceback" \
        "LDFLAGS_DEBUG = -g -traceback" \
        "FFLAGS_OMP = -qopenmp" \
        "CFLAGS_OMP = -qopenmp" \
        "PICFLAG = -fpic" \
        "BUILD_TARGET = $(@)" \
        "CORE = $(CORE)" \
        "DEBUG = $(DEBUG)" \
        "USE_PAPI = $(USE_PAPI)" \
        "OPENMP = $(OPENMP)" \
        "CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )

I can't find the -O3 -convert big_endian -free -align array64byte anywhere in the CMake-based build system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamBelieved to originate in the MPAS-Dev/MPAS-Model code rather than ufs-community/MPAS-Model code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions