RRZE-HPC / likwid

Performance monitoring and benchmarking suite
https://hpc.fau.de/research/tools/likwid/
GNU General Public License v3.0
1.65k stars 226 forks source link

[Build] benchmark build failed, Can't call method "process" #555

Open baiwfg2 opened 11 months ago

baiwfg2 commented 11 months ago

Which version do you want to build? http://ftp.fau.de/pub/likwid/likwid-stable.tar.gz

Which architecture do you want to build for?

[root@10 likwid-5.2.2]# make
===>  ENTER  /data/likwid-5.2.2/ext/hwloc
make[1]: Nothing to be done for 'all'.
===>  ENTER  /data/likwid-5.2.2/ext/lua
make[1]: Nothing to be done for 'all'.
===>  CREATE SHARED LIB  liblikwid.so
===>  ENTER  bench
===>  GENERATE BENCHMARKS
Can't call method "process" on an undefined value at ./perl/generatePas.pl line 202.
make[1]: *** [Makefile:128: GCC/clcopy.pas] Error 255
make: *** [Makefile:297: bench/likwid-bench] Error 2
TomTheBear commented 11 months ago

Please provide your OS version, the installed perl version and the perl environment variables.

Moreover, in this script ./perl/generatePas.pl (subfolder bench) is a print statement for these cases: https://github.com/RRZE-HPC/likwid/blob/master/bench/perl/generatePas.pl#L200

Please comment the line in and run again.

baiwfg2 commented 11 months ago

@TomTheBear Thanks for replying. My environment is

# uname -a
Linux localhost.localdomain 6.0.7-301.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 4 18:35:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@10 likwid-5.2.2]# perl --version

This is perl 5, version 36, subversion 1 (v5.36.1) built for x86_64-linux-thread-multi

I comment the line in and output is :

# make
===>  ENTER  /data/likwid-5.2.2/ext/hwloc
make[1]: Nothing to be done for 'all'.
===>  ENTER  /data/likwid-5.2.2/ext/lua
make[1]: Nothing to be done for 'all'.
===>  CREATE SHARED LIB  liblikwid.so
===>  ENTER  bench
===>  GENERATE BENCHMARKS
Can't call method "process" on an undefined value at ./perl/generatePas.pl line 202.
make[1]: *** [Makefile:128: GCC/clcopy.pas] Error 255
make: *** [Makefile:297: bench/likwid-bench] Error 2
[root@10 likwid-5.2.2]# vim bench/perl/generatePas.pl 
[root@10 likwid-5.2.2]# make
===>  ENTER  /data/likwid-5.2.2/ext/hwloc
make[1]: Nothing to be done for 'all'.
===>  ENTER  /data/likwid-5.2.2/ext/lua
make[1]: Nothing to be done for 'all'.
===>  CREATE SHARED LIB  liblikwid.so
===>  ENTER  bench
===>  GENERATE BENCHMARKS
$VAR1 = {
          'increment' => '16',
          'desc' => 'Single-precision triad A(i) = B(i) * C(i) + D(i), optimized for AVX-',
          'name' => 'triad_sp_mem_avx512_fma',
          'skip' => 0,
          'loop' => 'vmovaps zmm1, [STR1 + GPR1*4]
vmovaps zmm2, [STR2 + GPR1*4]
vfmadd213ps zmm1, zmm2, [STR3 + GPR1*4]
vmovntps   [STR0 + GPR1*4], zmm1

',
          'prolog' => '',
          'multi' => 0
        };
Can't call method "process" on an undefined value at ./perl/generatePas.pl line 202.
make[1]: *** [Makefile:128: GCC/clcopy.pas] Error 255
make: *** [Makefile:297: bench/likwid-bench] Error 2
TomTheBear commented 10 months ago

Thanks for the output. I asked @moebiusband73 as he is the original author of this Perl script.

In the meantime, try this ($LIKWID_SRC is your downloaded version):

$ mkdir -p $HOME/.likwid/bench/x86-64
$ mv $LIKWID_SRC/bench/x86-64/* $HOME/.likwid/bench/x86-64
$ cd $LIKWID_SRC
$ make distclean && make && (sudo) make install

There are two ways how the assembly kernels are loaded. Either they are compiled in at build time or they are generated on-the-fly. With above commands, no kernel will be compiled into likwid-bench, all will be generated on-the-fly.