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

cpu branch configure: pnetcdf.h #9

Closed
tjasaki opened this issue May 9, 2021 · 9 comments
Closed

cpu branch configure: pnetcdf.h #9

tjasaki opened this issue May 9, 2021 · 9 comments
Assignees

Comments

@tjasaki
Copy link

tjasaki commented May 9, 2021

I have been unable to install a working copy of claire-gpu. The installation
initially appeared to have completed successfully up until running the makefile:

make -j

The terminal output begins with the message:

fatal: not a git repository (or any of the parent directories): .git

and continues. The next error message is

./include/ReadWriteReg.hpp:29:10: fatal error: pnetcdf.h: No such file or directory
29 | #include "pnetcdf.h"
| ^~~~~~~~~~~
compilation terminated.

Several similar messages appear refering to pnetcdf.h. Working backwards, I
found that that the compilation process ran into a compilation error:

Error during compile, check cxx_opt_sgl/lib/petsc/conf/make.log
Send it and cxx_opt_sgl/lib/petsc/conf/configure.log to petsc-maint@mcs.anl.gov

The two files in question are included. Note that all dependencies were downloaded/installed using the provided build scipt and all paths have been set.
Thank you for any help you can provide.

Tom

configure.log

make.log

@andreasmang
Copy link
Owner

andreasmang commented May 9, 2021

I am assuming you have switch on PNETCDF support on the GPU version. Is this true?

PNETCDF is a library used for IO. It is for large-scale runs on parallel architectures (IO can be done in parallel). It should not raise any error flags within PETSc.

The default IO uses NIFTI (common medical imaging format). You should compile using NIFTI at this time. Unfortunately, it only recently came to my attention (last week) that PNETCDF is currently not supported on the GPU version (only the CPU version supports it). You need to keep the default setting in the makefile for dependencies:

https://github.com/andreasmang/claire/blob/gpu/deps/makefile#L3

and for CLAIRE

https://github.com/andreasmang/claire/blob/gpu/makefile#L12

That is, keep WITH_PNETCDF = no

Please let me know if excluding PNETCDF from the compilation does not fix your issue.

The next release will allow you to use PNETCDF (if you want to test it). We are currently testing it on our end for the GPU version. The issue has been raised here (by myself):

#8

I decided to not remove the option in the makefile since we're currently fixing this. I raised an issue for awareness instead.

@naveenaero if you are confident that the PNETCDF installation works, please push the fix to this repo.

@andreasmang
Copy link
Owner

@tjasaki Sorry. I just saw the heading. Are you referring to the CPU branch or the GPU branch? The heading says CPU and the issue says "claire-gpu". It should work for the CPU. If you are on the CPU branch, I'll provide an updated response.

@tjasaki
Copy link
Author

tjasaki commented May 9, 2021

Sorry for the confusion. I am on the cpu branch.

@andreasmang
Copy link
Owner

andreasmang commented May 9, 2021

No problem. Can you set the following to no and try again:

USEPNETCDF=yes

https://github.com/andreasmang/claire/blob/cpu/makefile#L5

Compilation for CLAIRE in top level dir.

[
Alternatively, one needs to compile PNETCDF using the build script via

./build_libs.sh --bpnetcdf

Then PNETCDF is available and can be linked. But I would suggest to not use it for now. I'll check the documentation to see if I need to add some more info there.
]

I'll make no the default in the makefile (someone seems to have changed it; could have been me....sorry about that)

@andreasmang
Copy link
Owner

andreasmang commented May 10, 2021

I have made a couple of updates to help with this:

[ ] I have added a description of the flags to the main makefile
https://github.com/andreasmang/claire/blob/cpu/makefile

[ ] I have added more information about the libraries (in particular how to compile them individually) here:
https://github.com/andreasmang/claire/blob/cpu/doc/README-INSTALL.md#dependencies

Some of this is mentioned in general language at the bottom of this section. Now it's also explicit.

[ ] I have added additional descriptions of the options available in the makefile here:
https://github.com/andreasmang/claire/blob/cpu/doc/README-INSTALL.md#building-claire-

[ ] I have added a description of the data formats supported by CLAIRE here:
https://github.com/andreasmang/claire/blob/cpu/doc/README-RUNME.md#clairedata

Please let me know if any of this is unclear, convoluted, or should be improved.
Of course, also ping us if the help I have provided above does not resolve your issues.

I have set the default of USEPNETCDF again to no:
https://github.com/andreasmang/claire/blob/cpu/makefile#L5

@tjasaki
Copy link
Author

tjasaki commented May 10, 2021

I tried a fresh install, setting USEPNETCDF=no as you suggested. This eliminate the error, but I still have no binaries (and no bin directory either). The output of "make -j" (and of "make -j 12") is as follows.

fatal: not a git repository (or any of the parent directories): .git
mpicxx -O3 -ansi -fopenmp -march=native -std=c++11 -Warray-bounds -Wchar-subscripts -Wcomment -Wenum-compare -Wformat -Wuninitialized -Wmaybe-uninitialized -Wmain -Wnarrowing -Wnonnull -Wparentheses -Wreorder -Wreturn-type -Wsign-compare -Wsequence-point -Wtrigraphs -Wunused-function -Wwrite-strings -DGIT_VERSION="" -I./include -isystem/home/asaki/Software/claire-cpu/deps/libs/petsc-lite-3.9.1/build/include -isystem/home/asaki/Software/claire-cpu/deps/libs/petsc-lite-3.9.1/build/cxx_opt_dbl/include -I/home/asaki/Software/claire-cpu/deps/libs/accfft/build/include -I/home/asaki/Software/claire-cpu/deps/libs/fftw/build/include -I/home/asaki/Software/claire-cpu/deps/libs/libmorton -I./deps/3rdparty -c apps/claire.cpp -o obj/claire.o
mpicxx -O3 -ansi -fopenmp -march=native -std=c++11 -Warray-bounds -Wchar-subscripts -Wcomment -Wenum-compare -Wformat -Wuninitialized -Wmaybe-uninitialized -Wmain -Wnarrowing -Wnonnull -Wparentheses -Wreorder -Wreturn-type -Wsign-compare -Wsequence-point -Wtrigraphs -Wunused-function -Wwrite-strings -DGIT_VERSION="" -I./include -isystem/home/asaki/Software/claire-cpu/deps/libs/petsc-lite-3.9.1/build/include -isystem/home/asaki/Software/claire-cpu/deps/libs/petsc-lite-3.9.1/build/cxx_opt_dbl/include -I/home/asaki/Software/claire-cpu/deps/libs/accfft/build/include -I/home/asaki/Software/claire-cpu/deps/libs/fftw/build/include -I/home/asaki/Software/claire-cpu/deps/libs/libmorton -I./deps/3rdparty -c src/interp3.cpp -o obj/interp3.o
src/interp3.cpp:5:11: warning: ‘_mm256_insertf128_ps’ initialized and declared ‘extern’
5 | _mm256_insertf128_ps(_mm256_castps128_ps256(vb), va, 1)
| ^~~~~~~~~~~~~~~~~~~~
src/interp3.cpp:5:32: warning: ‘gnu_inline’ attribute ignored [-Wattributes]
5 | _mm256_insertf128_ps(_mm256_castps128_ps256(vb), va, 1)
| ^~~~~~~~~~~~~~~~~~~~~~
src/interp3.cpp:5:32: warning: ‘always_inline’ attribute ignored [-Wattributes]
src/interp3.cpp:5:32: warning: ‘artificial’ attribute ignored [-Wattributes]
src/interp3.cpp:5:32: error: ‘__m256 _mm256_insertf128_ps’ redeclared as different kind of entity
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:51,
from src/interp3.cpp:16:
/usr/lib/gcc/x86_64-linux-gnu/9/include/avxintrin.h:760:1: note: previous declaration ‘__m256 _mm256_insertf128_ps(__m256, __m128, int)’
760 | _mm256_insertf128_ps (__m256 __X, __m128 __Y, const int __O)
| ^~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/9/include/avxintrin.h:1489:1: error: expected primary-expression before ‘__L’
1489 | _mm256_set_m128 ( __m128 __H, __m128 __L)
| ^~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/9/include/avxintrin.h:1489:1: error: expected primary-expression before ‘__H’
1489 | _mm256_set_m128 ( __m128 __H, __m128 __L)
| ^~~~~~~~~~~~~~~
make: *** [makefile:25: obj/interp3.o] Error 1
rm obj/claire.o

@naveenaero
Copy link
Collaborator

What version of the GNU compiler are you using? I have never seen this kind of error before. Also does you machine support intel avx instructions (should not be a problem with compilation though)?

@tjasaki
Copy link
Author

tjasaki commented May 10, 2021

Some quick answers:

gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

avx insructions: (probably) Intel® Core™ i9-9880H CPU @ 2.30GHz × 16

@andreasmang
Copy link
Owner

@tjasaki and @naveenaero:
I have opened a new issue since it's unrelated to PNETCDF (feel free to follow up here if PNETCDF still causes 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