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

error while compiling PnMPI with hires libs on a clean CentOS7 installation. #11

Open
cboneti opened this issue Oct 14, 2020 · 3 comments

Comments

@cboneti
Copy link

cboneti commented Oct 14, 2020

On a clean Centos 7 machine (Intel64):

packages

sudo yum -y group install "Development Tools" 
sudo yum -y install cmake screen gcc-gfortran git help2man install environment-modules mpich-devel

build llnl-hires-timers and PnMPI

git clone https://github.com/LLNL/llnl-hires-timers.git
mkdir llnl-hires-timers/build && cd llnl-hires-timers/build && cmake .. && make &&sudo make install
git clone https://github.com/LLNL/PnMPI.git && cd PnMPI
git submodule update --init --recursive
mkdir build && cd build && module load mpi && cmake -DCMAKE_INSTALL_PREFIX=${HOME}/pnmpi ..
make

Error

That produces an error in modules/metrics/timing.c.

Scanning dependencies of target metrics-timing
[ 45%] Building C object src/modules/metrics/CMakeFiles/metrics-timing.dir/timing.c.o
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:847:1: warning: implicit declaration of function ‘metric_atomic_init’ [-Wimplicit-function-declaration]
 metric_atomic_keyword size_t metric_invocations = metric_atomic_init(0);
 ^
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:847:1: error: initializer element is not constant
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c: In function ‘MPI_Finalize’:
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10933:23: error: ‘counters’ undeclared (first use in this function)
       print_counters(&counters);
                       ^
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10933:23: note: each undeclared identifier is reported only once for each function it appears in
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10940:10: error: variable ‘tmp’ has initializer but incomplete type
   struct counter tmp = { 0 };
          ^
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10940:10: warning: excess elements in struct initializer [enabled by default]
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10940:10: warning: (near initialization for ‘tmp’) [enabled by default]
/home/user/source/PnMPI/buildtimer/src/modules/metrics/timing.c:10940:18: error: storage size of ‘tmp’ isn’t known
   struct counter tmp = { 0 };
                  ^
make[2]: *** [src/modules/metrics/CMakeFiles/metrics-timing.dir/timing.c.o] Error 1
make[1]: *** [src/modules/metrics/CMakeFiles/metrics-timing.dir/all] Error 2
make: *** [all] Error 2

solution:

It appears there are a few bugs in src/modules/metrics/timing.c.w. I was able to fix them. Should I send a patch?

@alehaa
Copy link
Contributor

alehaa commented Oct 14, 2020

Thanks for reporting this issue. Please feel free to send a patch as pull request or comment the changes into this issue, so we can add it to the code.

@cboneti
Copy link
Author

cboneti commented Oct 14, 2020

Thanks, I submitted the pull request.

@alehaa
Copy link
Contributor

alehaa commented Oct 14, 2020

Thanks for tracking this down. Seems I forgot to remove a few invocations of metric_atomic_init(). when removing this function in 195b14c. I definitely should add a test case for this configuration.

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

2 participants