Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Dockerfile to build the GPA tool #3

Open
YuanXDD opened this issue Jul 16, 2022 · 10 comments
Open

Can't use Dockerfile to build the GPA tool #3

YuanXDD opened this issue Jul 16, 2022 · 10 comments

Comments

@YuanXDD
Copy link

YuanXDD commented Jul 16, 2022

I just used Docker file in Ubuntu20.04LTS and can't build the docker.

It seems there is something wrong with spack.

@Jokeren
Copy link
Owner

Jokeren commented Jul 17, 2022

spack was configured with a specific commit. So I'm not sure why it caused problems.

Can you copy and paste your build logs?

@YuanXDD
Copy link
Author

YuanXDD commented Jul 17, 2022

Firstly, It showed a gpg key error, so I add the following lines before apt-get update:

RUN gpg --keyserver keyserver.ubuntu.com --recv A4B469963BF863CC                                                                                      
RUN gpg --export --armor A4B469963BF863CC | apt-key add -

And then I can go on and face this error log:

Step 15/27 : RUN spack install --only dependencies hpctoolkit ^dyninst@cgo ^elfutils
 ---> Running in a089245edbc4
==> Error: Package Libiconv has no version with a URL.
The command 'docker-shell spack install --only dependencies hpctoolkit ^dyninst@cgo ^elfutils' returned a non-zero code: 1

@Jokeren
Copy link
Owner

Jokeren commented Jul 18, 2022

It might be a spack issue. You might be able to use the update-to-date spack instead.

Two potential solutions.

  1. Try /bin/install.sh

  2. Replacing the following lines.

    Line 16:
    RUN git clone -c feature.manyFiles=true https://github.com/spack/spack.git

    Line 24:
    RUN spack install --only dependencies hpctoolkit

@YuanXDD
Copy link
Author

YuanXDD commented Jul 19, 2022

  1. I have tried to install by /bin/install.sh, it seems hpctool is not installed successfully. I can't use ./bin/bench.sh -m advise to enable advice mode.
  2. I have rerun with your suggestion and it did build an image, but I still can't use advise mode, the wrong info is like this:
root@dd01088303b5:/staging/GPA# ./bin/bench.sh -m advise
Traceback (most recent call last):
  File "./python/bench.py", line 572, in <module>
    advise(test_cases, args.arch, args.origin)
  File "./python/bench.py", line 500, in advise
    pipe_read(opts + [test_case.command] + test_case.options)
  File "./python/bench.py", line 233, in pipe_read
    process = subprocess.Popen(command,
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gpa'

I understande this as hpctool not successfully installed and look back to find the error msg in install hpctool log like this:

../../../../src/lib/prof-lean/crypto-hash.c:67:10: fatal error: mbedtls/md5.h: No such file or directory                                                  
   67 | #include <mbedtls/md5.h>  // MD5                                                                                                                  
      |          ^~~~~~~~~~~~~~~                                                                                                                          
compilation terminated.      

@Jokeren
Copy link
Owner

Jokeren commented Jul 19, 2022

mbedtls can be installed with spack. See ./bin/spack spec mbedtls

HPCToolkit has removed its dependency on mbedtls, but GPA depends on an old version of HPCToolkit. In the future, GPA will be merged into HPCToolkit's main repository. Do you just want to get some immediate result? Or you are doing a research project similar to GPA? If the latter, I'll try to fix the dependency sometime.

@YuanXDD
Copy link
Author

YuanXDD commented Jul 20, 2022

Yeah, we are the latter. We're working on a gpu profiling tool that analyze the performance of gpu programs so that we can give some advice on how to optimize them. And we want to make a comparison with GPA and GVProf, the conclusion will be part of our work. We'll really appreciate that if you could fix the problem.

@Jokeren
Copy link
Owner

Jokeren commented Jul 20, 2022

OK, I'll take a look next week and notify you. Please remind me if I forget.

@Jokeren
Copy link
Owner

Jokeren commented Jul 24, 2022

Hi, can you try to use the following commands to install related packages?

spack install --only dependencies hpctoolkit ^dyninst@master ^binutils@2.34+libiberty~nls 
spack install libmonitor@master+dlopen+hpctoolkit
spack install mbedtls gotcha

Then you can skip the spack commands in /bin/install.sh

../configure --prefix=$DIR/hpctoolkit --with-cuda=$CUDA_PATH \
  --with-cupti=$CUDA_PATH --with-spack=$SPACK_DIR

@Jokeren
Copy link
Owner

Jokeren commented Jul 25, 2022

Hi @YuanXDD, @Lin-Mao can help you if you still have install issues.

@Lin-Mao
Copy link
Contributor

Lin-Mao commented Jul 25, 2022

Sure, please feel free to @me if you still have install issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants