chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

Build time test between chpl and mason, mason slower than chpl #14954

Open milisarge opened 4 years ago

milisarge commented 4 years ago

i did some tests about building a chapel code with using chpl and mason. This link has details -> https://hastebin.com/inayorotil.nginx

is there any not fair comparison? let me know if is there any valid tests for comparison.

mppf commented 4 years ago

hi @milisarge - we like issues to have an achievable way to close them. In this case I think, you are pointing out that mason build is slower than just a chpl compile by a significant amount and requesting that somebody investigate the difference and possibly resolve it. If you agree, could you put that in the issue description?

ben-albrecht commented 4 years ago

Here are the relevant timings from the user hastebin summarized:

command time (s)
mason build 9.76
chpl 5.28
mason build --release 14.37
chpl --fast 7.24

mason --about:

``` Compilation command: chpl --fast mason.chpl Chapel compiler version: 1.20.0 Chapel environment: CHPL_HOME: /usr/share/chapel/1.20 CHPL_ATOMICS: cstdlib CHPL_AUX_FILESYS: none CHPL_COMM: none CHPL_COMM_SUBSTRATE: none CHPL_COMPILER_SUBDIR: linux64/gnu/x86_64/llvm-none CHPL_GASNET_SEGMENT: none CHPL_GMP: gmp CHPL_GMP_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none CHPL_HOST_ARCH: x86_64 CHPL_HOST_BIN_SUBDIR: linux64-x86_64 CHPL_HOST_COMPILER: gnu CHPL_HOST_CPU: none CHPL_HOST_MEM: cstdlib CHPL_HOST_PLATFORM: linux64 CHPL_HWLOC: none CHPL_HWLOC_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none-flat CHPL_JEMALLOC: jemalloc CHPL_JEMALLOC_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none CHPL_LAUNCHER: none CHPL_LAUNCHER_SUBDIR: linux64/gnu/x86_64/loc-flat/comm-none/tasks-fifo/launch-none/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/lib_pic-none CHPL_LIBUNWIND_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none CHPL_LIB_PIC: none CHPL_LLVM: none CHPL_LLVM_UNIQ_CFG_PATH: none CHPL_LOCALE_MODEL: flat CHPL_MAKE: make CHPL_MEM: jemalloc CHPL_NETWORK_ATOMICS: none CHPL_ORIG_TARGET_COMPILER: gnu CHPL_QTHREAD_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none-flat-jemalloc-none CHPL_RE2_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none CHPL_REGEXP: re2 CHPL_RUNTIME_CPU: native CHPL_RUNTIME_INCL: /usr//lib/chapel/1.20/runtime/include CHPL_RUNTIME_LIB: /usr//lib/chapel/1.20/runtime/lib CHPL_RUNTIME_SUBDIR: linux64/gnu/x86_64/arch-native/loc-flat/comm-none/tasks-fifo/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/none/re2/fs-none/lib_pic-none CHPL_TARGET_ARCH: x86_64 CHPL_TARGET_BACKEND_CPU: native CHPL_TARGET_BIN_SUBDIR: linux64-x86_64-native CHPL_TARGET_COMPILER: gnu CHPL_TARGET_CPU: native CHPL_TARGET_CPU_FLAG: arch CHPL_TARGET_MEM: jemalloc CHPL_TARGET_PLATFORM: linux64 CHPL_TASKS: fifo CHPL_THIRD_PARTY: /usr//lib/chapel/1.20/third-party CHPL_THIRD_PARTY_LINK_ARGS: -lhwloc -ljemalloc -lm -lre2 -lpthread CHPL_TIMERS: generic CHPL_UNWIND: none ```

I see a smaller difference on my local machine:

command time (s)
mason build 4.94
chpl 4.55
mason build --release 6.03
chpl --fast 5.90

mason --about:

``` Compilation command: chpl mason.chpl Chapel compiler version: 1.21.0 pre-release (3bdfeabee1) Chapel environment: CHPL_HOME: /projects/chapel/master CHPL_ATOMICS: cstdlib CHPL_AUX_FILESYS: none CHPL_COMM: none CHPL_COMM_SUBSTRATE: none CHPL_COMPILER_SUBDIR: darwin/clang/x86_64/llvm-none CHPL_GASNET_SEGMENT: none CHPL_GASNET_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none/substrate-none/seg-none CHPL_GMP: gmp CHPL_GMP_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none CHPL_HOST_ARCH: x86_64 CHPL_HOST_BIN_SUBDIR: darwin-x86_64 CHPL_HOST_COMPILER: clang CHPL_HOST_CPU: none CHPL_HOST_MEM: cstdlib CHPL_HOST_PLATFORM: darwin CHPL_HWLOC: hwloc CHPL_HWLOC_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none-flat CHPL_JEMALLOC: jemalloc CHPL_JEMALLOC_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none CHPL_LAUNCHER: none CHPL_LAUNCHER_SUBDIR: darwin/clang/x86_64/loc-flat/comm-none/tasks-qthreads/launch-none/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/lib_pic-none CHPL_LIBFABRIC: none CHPL_LIBFABRIC_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none CHPL_LIBUNWIND_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none CHPL_LIB_PIC: none CHPL_LLVM: none CHPL_LLVM_UNIQ_CFG_PATH: none CHPL_LOCALE_MODEL: flat CHPL_MAKE: make CHPL_MEM: jemalloc CHPL_NETWORK_ATOMICS: none CHPL_ORIG_TARGET_COMPILER: clang CHPL_QTHREAD_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none-flat-jemalloc-hwloc CHPL_RE2_UNIQ_CFG_PATH: darwin-x86_64-none-clang-none CHPL_REGEXP: re2 CHPL_RUNTIME_CPU: none CHPL_RUNTIME_INCL: /projects/chapel/master/runtime/include CHPL_RUNTIME_LIB: /projects/chapel/master/lib CHPL_RUNTIME_SUBDIR: darwin/clang/x86_64/arch-none/loc-flat/comm-none/tasks-qthreads/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/hwloc/re2/fs-none/lib_pic-none CHPL_TARGET_ARCH: x86_64 CHPL_TARGET_BACKEND_CPU: none CHPL_TARGET_BIN_SUBDIR: darwin-x86_64 CHPL_TARGET_COMPILER: clang CHPL_TARGET_CPU: none CHPL_TARGET_CPU_FLAG: none CHPL_TARGET_MEM: jemalloc CHPL_TARGET_PLATFORM: darwin CHPL_TASKS: qthreads CHPL_THIRD_PARTY: /projects/chapel/master/third-party CHPL_THIRD_PARTY_COMPILE_ARGS: CHPL_THIRD_PARTY_LINK_ARGS: -lgmp -ljemalloc -lchpl -lqthread -L/projects/chapel/master/third-party/hwloc/install/darwin-x86_64-none-clang-none-flat/lib -lhwloc -lm -lre2 -lpthread CHPL_TIMERS: generic CHPL_UNWIND: none ```

All timings are with MASON_OFFLINE=true to remove any overhead from remote git commands.

ben-albrecht commented 4 years ago

@milisarge - Could you provide the printchplenv with which mason was built? mason requires CHPL_REGEXP: re2, but I see your configuration has CHPL_REGEXP: none.

milisarge commented 4 years ago

# ./mason --about

Compilation command: chpl --fast mason.chpl 
Chapel compiler version: 1.20.0
Chapel environment:
  CHPL_HOME: /usr/share/chapel/1.20
  CHPL_ATOMICS: cstdlib
  CHPL_AUX_FILESYS: none
  CHPL_COMM: none
  CHPL_COMM_SUBSTRATE: none
  CHPL_COMPILER_SUBDIR: linux64/gnu/x86_64/llvm-none
  CHPL_GASNET_SEGMENT: none
  CHPL_GMP: gmp
  CHPL_GMP_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none
  CHPL_HOST_ARCH: x86_64
  CHPL_HOST_BIN_SUBDIR: linux64-x86_64
  CHPL_HOST_COMPILER: gnu
  CHPL_HOST_CPU: none
  CHPL_HOST_MEM: cstdlib
  CHPL_HOST_PLATFORM: linux64
  CHPL_HWLOC: none
  CHPL_HWLOC_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none-flat
  CHPL_JEMALLOC: jemalloc
  CHPL_JEMALLOC_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none
  CHPL_LAUNCHER: none
  CHPL_LAUNCHER_SUBDIR: linux64/gnu/x86_64/loc-flat/comm-none/tasks-fifo/launch-none/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/lib_pic-none
  CHPL_LIBUNWIND_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none
  CHPL_LIB_PIC: none
  CHPL_LLVM: none
  CHPL_LLVM_UNIQ_CFG_PATH: none
  CHPL_LOCALE_MODEL: flat
  CHPL_MAKE: make
  CHPL_MEM: jemalloc
  CHPL_NETWORK_ATOMICS: none
  CHPL_ORIG_TARGET_COMPILER: gnu
  CHPL_QTHREAD_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none-flat-jemalloc-none
  CHPL_RE2_UNIQ_CFG_PATH: linux64-x86_64-native-gnu-none
  CHPL_REGEXP: re2
  CHPL_RUNTIME_CPU: native
  CHPL_RUNTIME_INCL: /usr//lib/chapel/1.20/runtime/include
  CHPL_RUNTIME_LIB: /usr//lib/chapel/1.20/runtime/lib
  CHPL_RUNTIME_SUBDIR: linux64/gnu/x86_64/arch-native/loc-flat/comm-none/tasks-fifo/tmr-generic/unwind-none/mem-jemalloc/atomics-cstdlib/none/re2/fs-none/lib_pic-none
  CHPL_TARGET_ARCH: x86_64
  CHPL_TARGET_BACKEND_CPU: native
  CHPL_TARGET_BIN_SUBDIR: linux64-x86_64-native
  CHPL_TARGET_COMPILER: gnu
  CHPL_TARGET_CPU: native
  CHPL_TARGET_CPU_FLAG: arch
  CHPL_TARGET_MEM: jemalloc
  CHPL_TARGET_PLATFORM: linux64
  CHPL_TASKS: fifo
  CHPL_THIRD_PARTY: /usr//lib/chapel/1.20/third-party
  CHPL_THIRD_PARTY_LINK_ARGS: -lhwloc -ljemalloc -lm -lre2 -lpthread
  CHPL_TIMERS: generic
  CHPL_UNWIND: none
milisarge commented 4 years ago

first i built chapel with export CHPL_TASKS=fifo; ./configure --prefix=/usr && make && make install then built mason manually using cd tools/mason; chpl mason.chpl

milisarge commented 4 years ago

@milisarge - Could you provide the printchplenv with which mason was built? mason requires CHPL_REGEXP: re2, but I see your configuration has CHPL_REGEXP: none.

in mason about info of chapel environment , it says CHPL_REGEXP: re2

milisarge commented 4 years ago

@milisarge - Could you provide the printchplenv with which mason was built? mason requires CHPL_REGEXP: re2, but I see your configuration has CHPL_REGEXP: none.

i also did export CHPL_REGEXP=re2 then re-compiled mason with this chplenv config. but test result are same

ben-albrecht commented 4 years ago

Some next steps for this task could be: