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

Installation fails on --chaco-- EDIT netcdf #12857

Closed
VictorEijkhout opened this issue Mar 25, 2024 · 6 comments
Closed

Installation fails on --chaco-- EDIT netcdf #12857

VictorEijkhout opened this issue Mar 25, 2024 · 6 comments
Labels
type: bug The primary issue is a bug in Trilinos code or tests

Comments

@VictorEijkhout
Copy link

I thought I was letting cmake generate lots of output already, but I see no error in this.

cd /work2/00434/eijkhout/trilinos/build-15.1.0-stampede3-intel24-impi/packages/seacas/libraries/chaco && /opt/apps/cmake/3.28.1/bin/cmake -E cmake_symlink_library libchaco.so.15.1.0 libchaco.so.15 libchaco.so
[ 13%] Built target chaco
make[1]: *** [Makefile:169: all] Error 2

output attached.

Victor.
trilinos_logs.zip

@VictorEijkhout VictorEijkhout added the type: bug The primary issue is a bug in Trilinos code or tests label Mar 25, 2024
@cgcgcg
Copy link
Contributor

cgcgcg commented Mar 25, 2024

I don't think this has anything to do with Chaco. From the log file:

make[3]: *** No rule to make target '/libpnetcdf.so', needed by 'packages/seacas/libraries/exodus/libexodus.so.15.1.0'.  Stop.

From the configure log:

-D TPL_ENABLE_Netcdf:BOOL=ON 
-D TPL_Netcdf_INCLUDE_DIRS:PATH= 
-D TPL_Netcdf_LIBRARY_DIRS:PATH= 
-D TPL_Netcdf_LIBRARIES=/libpnetcdf.so

@VictorEijkhout
Copy link
Author

Thanks for spotting that.

Eh, why didn't your cmake catch that? I've had it abort on me so many times for failing to find netcdf.

@cgcgcg
Copy link
Contributor

cgcgcg commented Mar 25, 2024

I believe the library checks only run when TPL_Netcdf_LIBRARIES is not set directly with cmake -D. I would recommend to configure like so

-D TPL_ENABLE_Netcdf:BOOL=ON \
-D TPL_Netcdf_INCLUDE_DIRS:PATH=${WHEREVER_NETCDF_ROOT_IS}/include \ 
-D TPL_Netcdf_LIBRARY_DIRS:PATH=${WHEREVER_NETCDF_ROOT_IS}/lib \

@VictorEijkhout
Copy link
Author

Ok, I fixed the null variable.

In file included from /work2/00434/eijkhout/trilinos/trilinos-15.1.0/packages/seacas/libraries/exodus/src/ex__put_homogenous_block_params.c:9:
/work2/00434/eijkhout/trilinos/trilinos-15.1.0/packages/seacas/libraries/exodus/include/exodusII.h:18:10: fatal error: 'netcdf.h' file not found
   18 | #include "netcdf.h"
      |          ^~~~~~~~~~
1 error generated.

Now I'm really confused. You're using libpnetcdf but also netcdf.h. The library that generates libpnetcdf only generates pnetcdf.h.

This relates to my question #12854

@cgcgcg
Copy link
Contributor

cgcgcg commented Mar 25, 2024

I'm not the expert on *netcdf usage in Trilinos, but when I build using spack I usually build against

parallel-netcdf
[email protected]+parallel-netcdf

So I think you need both libraries, and there is an option in netcdf that enables (?) the dependency on pnetcdf.

For Trilinos I set:

-D TPL_ENABLE_Netcdf:BOOL=ON \
-D TPL_Netcdf_INCLUDE_DIRS:PATH=${WHEREVER_NETCDF_ROOT_IS}/include \ 
-D TPL_Netcdf_LIBRARY_DIRS:PATH=${WHEREVER_NETCDF_ROOT_IS}/lib \
-D TPL_ENABLE_Pnetcdf:BOOL=ON \
-D TPL_Pnetcdf_INCLUDE_DIRS:PATH=${WHEREVER_PNETCDF_ROOT_IS}/include \ 
-D TPL_Pnetcdf_LIBRARY_DIRS:PATH=${WHEREVER_PNETCDF_ROOT_IS}/lib \

@VictorEijkhout
Copy link
Author

VictorEijkhout commented Mar 26, 2024

Ok, got it. So load sequential netcdf & (parallel) pnetcdf. With this my installation passes.

Better documentation of all these options would be a good idea.

@VictorEijkhout VictorEijkhout changed the title Installation fails on chaco without error message Installation fails on --chaco-- EDIT netcdf Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

2 participants