From: <ed...@op...> - 2019-12-25 13:41:27
|
Hello, Is there a way to use my system's netcdf instead of the one in the contrib directory? Thanks! ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |
From: <ed...@op...> - 2019-12-30 00:22:07
|
I attach a patch for netcdf.m4 which can help to use the system's netcdf. Mind you, this is the first autoconf script that I prepare. =make= is currently running. If there is a better solution, let me know. You can also find the file here: https://notabug.org/broncodev/libmesh-pkgbuild and you need to run =autoconf= in the libmesh root directory On 2019-12-25 13:40, ed...@op... wrote: > Hello, > > Is there a way to use my system's netcdf instead of the one in the > contrib directory? Thanks! ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |
From: <ed...@op...> - 2019-12-30 10:41:13
Attachments:
PKGBUILD
|
I can still not compile with my system's netcdf. With this code, I can compile and run a test: #+begin_SRC cpp #include "netcdf.h" int main(void){ static int ncid; nc_create("test.nc", NC_NETCDF4|NC_CLOBBER, &ncid);} #+end_SRC #+begin_SRC bash gcc -Wall -lnetcdf -L/usr/lib -I/usr/include -o run-test test.cpp ./run-test ls test.nc #+end_SRC #+RESULTS: : test.nc I added what I thought would be the same to netcdf.m4, but it seems that it cannot compile. I show the relevant portions of the attached file #+begin_SRC autoconf m4_define([_AX_CXX_COMPILE_NETCDF_preamble], [[ @%:@include "netcdf.h" ]]) m4_define([_AX_CXX_COMPILE_NETCDF_body], [[ static int ncid; nc_create("test.nc", NC_NETCDF4|NC_CLOBBER, &ncid); ]]) #+END_SRC This message does not show up in the log #+begin_SRC autoconf AS_IF([test "$netcdfincFound" = "no"], [ AC_MSG_RESULT(NETCDF header files not found!) enablenetcdf=no; ]) #+end_SRC So I think that this should work #+BEGIN_SRC autoconf NETCDF_INCLUDE="-I$NETCDF_INC" #+END_SRC ---8<--- snip #+begin_SRC autoconf AS_IF([test "x$RPATHFLAG" != "x" && test -d $NETCDF_LIB], [NETCDF_RPATH_FLAGS="${RPATHFLAG}${NETCDF_LIB}" NETCDF_LIBRARY="${RPATHFLAG}${NETCDF_LIB} $NETCDF_LIBRARY" ], [NETCDF_LIBRARY="-L${NETCDF_LIB} -lnetcdf $NETCDF_LIBRARY"]) LIBS="$LIBS $NETCDF_LIBRARY" CPPFLAGS="$CPPFLAGS $NETCDF_INCLUDE" #+end_SRC But I get the error from here #+begin_SRC autoconf AC_LINK_IFELSE([AC_LANG_PROGRAM([_AX_CXX_COMPILE_NETCDF_preamble],[_AX_CXX_COMPILE_NETCDF_body])], [AC_DEFINE(HAVE_NETCDF, 1, [Flag indicating whether the library will be compiled with Netcdf support])], [AC_MSG_ERROR(*** Linking a test program against the NETCDF libraries failed)]) #+end_SRC What I find funny is that if I force #+begin_SRC autoconf LIBS="$LIBS -lnetcdf -L/usr/lib" CPPFLAGS="$CPPFLAGS -I/usr/include" #+end_SRC then, configure runs well, but still picks up the =contrib/netcdf4=. I think that I will live with this. I am sure that there is a silly mistake. I hope that it is useful to others. If you want more debugging information, let me know. On 2019-12-30 00:21, ed...@op... wrote: > I attach a patch for netcdf.m4 which can help to use the system's > netcdf. Mind you, this is the first autoconf script that I prepare. > =make= is currently running. If there is a better solution, let me > know. You can also find the file here: > https://notabug.org/broncodev/libmesh-pkgbuild and you need to run > =autoconf= in the libmesh root directory > > On 2019-12-25 13:40, ed...@op... wrote: >> Hello, >> >> Is there a way to use my system's netcdf instead of the one in the >> contrib directory? Thanks! > > > ------------------------------------------------- > This free account was provided by VFEmail.net - report spam to > ab...@vf... > > ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out > of the NSA's hands! > $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No > bandwidth quotas! > Commercial and Bulk Mail Options! > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |
From: <ed...@op...> - 2019-12-30 14:34:06
|
I think that I found a way to use my system's netcdf with libMesh (make check gave no errors). - System: Parabola GNU/Linux x86_64 AMD Ryzen 2500 - PETSc from Git commit 5f77d1e0e5 - libMesh from Git commit 19706028f - a bunch of packagees from repositories (cgns 3.4.0-2, hdf5-openmpi 1.10.5-1, hdf5-openmpi 1.10.5-1, netcdf-openmpi 4.7.1-2, paraview 5.7.0-3, pnetcdf-openmpi 1.12.0-1, python-h5py-openmpi 2.10.0-1, vtk 8.2.0-9, hwloc 2.1.0-2, metis 5.1.0.p7-1, openmp 9.0.0-2, openmpi 4.0.2-3, suitesparse 5.6.0-1, scotch 6.0.6-1) - some from AUR's user-contributed packages (fftw-mpi 3.3.8-1, hypre-sm 2.14.0-1, mumps 5.2.1-3, superlu 5.2.1-9) If you want to try, my recipe is here: https://notabug.org/broncodev/libmesh-pkgbuild.git (commit e3d46fc) https://notabug.org/broncodev/petsc-pkgbuild.git (commit 3e9d679) MUMPS is still not detected by libMesh :( . Let me know if I did something unwise. Thanks! On 2019-12-30 10:40, ed...@op... wrote: > I can still not compile with my system's netcdf. With this code, I can > compile and run a test: > > #+begin_SRC cpp > #include "netcdf.h" > > int main(void){ > static int ncid; > nc_create("test.nc", NC_NETCDF4|NC_CLOBBER, &ncid);} > #+end_SRC > > #+begin_SRC bash > gcc -Wall -lnetcdf -L/usr/lib -I/usr/include -o run-test test.cpp > ./run-test > ls test.nc > #+end_SRC > > #+RESULTS: > : test.nc > > I added what I thought would be the same to netcdf.m4, but it seems > that it cannot compile. I show the relevant portions of the attached > file > > #+begin_SRC autoconf > m4_define([_AX_CXX_COMPILE_NETCDF_preamble], > [[ > @%:@include "netcdf.h" > ]]) > > m4_define([_AX_CXX_COMPILE_NETCDF_body], > [[ > static int ncid; > nc_create("test.nc", NC_NETCDF4|NC_CLOBBER, &ncid); > ]]) > #+END_SRC > > This message does not show up in the log > > #+begin_SRC autoconf > AS_IF([test "$netcdfincFound" = "no"], > [ > AC_MSG_RESULT(NETCDF header files not found!) > enablenetcdf=no; > ]) > #+end_SRC > > So I think that this should work > > #+BEGIN_SRC autoconf > NETCDF_INCLUDE="-I$NETCDF_INC" > #+END_SRC > ---8<--- snip > #+begin_SRC autoconf > AS_IF([test "x$RPATHFLAG" != "x" && test -d $NETCDF_LIB], > [NETCDF_RPATH_FLAGS="${RPATHFLAG}${NETCDF_LIB}" > NETCDF_LIBRARY="${RPATHFLAG}${NETCDF_LIB} $NETCDF_LIBRARY" > ], > [NETCDF_LIBRARY="-L${NETCDF_LIB} -lnetcdf $NETCDF_LIBRARY"]) > LIBS="$LIBS $NETCDF_LIBRARY" > CPPFLAGS="$CPPFLAGS $NETCDF_INCLUDE" > #+end_SRC > > But I get the error from here > > #+begin_SRC autoconf > > AC_LINK_IFELSE([AC_LANG_PROGRAM([_AX_CXX_COMPILE_NETCDF_preamble],[_AX_CXX_COMPILE_NETCDF_body])], > [AC_DEFINE(HAVE_NETCDF, 1, [Flag indicating whether the library > will be compiled with Netcdf support])], > [AC_MSG_ERROR(*** Linking a test program against the NETCDF > libraries failed)]) > #+end_SRC > > What I find funny is that if I force > > #+begin_SRC autoconf > LIBS="$LIBS -lnetcdf -L/usr/lib" > CPPFLAGS="$CPPFLAGS -I/usr/include" > #+end_SRC > > then, configure runs well, but still picks up the =contrib/netcdf4=. I > think that I will live with this. I am sure that there is a silly > mistake. I hope that it is useful to others. If you want more > debugging information, let me know. > > On 2019-12-30 00:21, ed...@op... wrote: >> I attach a patch for netcdf.m4 which can help to use the system's >> netcdf. Mind you, this is the first autoconf script that I prepare. >> =make= is currently running. If there is a better solution, let me >> know. You can also find the file here: >> https://notabug.org/broncodev/libmesh-pkgbuild and you need to run >> =autoconf= in the libmesh root directory >> >> On 2019-12-25 13:40, ed...@op... wrote: >>> Hello, >>> >>> Is there a way to use my system's netcdf instead of the one in the >>> contrib directory? Thanks! >> >> >> ------------------------------------------------- >> This free account was provided by VFEmail.net - report spam to >> ab...@vf... >> >> ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out >> of the NSA's hands! >> $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No >> bandwidth quotas! >> Commercial and Bulk Mail Options! >> _______________________________________________ >> Libmesh-users mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users > > > ------------------------------------------------- > This free account was provided by VFEmail.net - report spam to > ab...@vf... > > ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out > of the NSA's hands! > $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No > bandwidth quotas! > Commercial and Bulk Mail Options! > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |
From: Stogner, R. H <roy...@ic...> - 2019-12-30 17:27:24
|
On Mon, 30 Dec 2019, ed...@op... wrote: > I think that I found a way to use my system's netcdf with libMesh (make check > gave no errors). > > - System: Parabola GNU/Linux x86_64 AMD Ryzen 2500 > - PETSc from Git commit 5f77d1e0e5 > - libMesh from Git commit 19706028f > - a bunch of packagees from repositories (cgns 3.4.0-2, hdf5-openmpi > 1.10.5-1, hdf5-openmpi 1.10.5-1, netcdf-openmpi 4.7.1-2, paraview 5.7.0-3, > pnetcdf-openmpi 1.12.0-1, python-h5py-openmpi 2.10.0-1, vtk 8.2.0-9, hwloc > 2.1.0-2, metis 5.1.0.p7-1, openmp 9.0.0-2, openmpi 4.0.2-3, suitesparse > 5.6.0-1, scotch 6.0.6-1) > - some from AUR's user-contributed packages (fftw-mpi 3.3.8-1, hypre-sm > 2.14.0-1, mumps 5.2.1-3, superlu 5.2.1-9) > > If you want to try, my recipe is here: > https://notabug.org/broncodev/libmesh-pkgbuild.git (commit e3d46fc) I was going to say that there's no way for us to link against an external netcdf without actually changing our netcdf.m4 file, then I followed this link to find a patch against our netcdf.m4 file. So you're at least on the right track! I don't have time to check this out myself right now but I'll throw up a PR with it so we don't lose track of it and so we can see what our CI thinks of it. Thanks! > https://notabug.org/broncodev/petsc-pkgbuild.git (commit 3e9d679) > > MUMPS is still not detected by libMesh :( . Is configure finding your petscconf.h? Is PETSC_HAVE_MUMPS defined there? --- Roy |
From: <ed...@op...> - 2019-12-30 21:43:21
|
On 2019-12-30 17:26, Stogner, Roy H wrote: > ----8< snip ---- >> MUMPS is still not detected by libMesh :( . > > Is configure finding your petscconf.h? Is PETSC_HAVE_MUMPS defined > there? I looked into =configure=, and found this: $as_echo "#define PETSC_HAVE_MUMPS 1" >>confdefs.h Then found this in config.status: D["PETSC_HAVE_MUMPS"]=" 1" Then, my config.log shows: ----8< snip ---- configure:6861: mpicxx -c -fPIC -fopenmp -march=amdfam10 -mtune=generic -fPIC -fopenmp -march=amdfam10 -mtune=generic -O2 -D_FORTIFY_SOURCE=2 conftest.cpp >&5 conftest.cpp: In function 'int main()': conftest.cpp:18:9: error: 'thisisanerror' was not declared in this scope 18 | thisisanerror; | ^~~~~~~~~~~~~ configure:6861: $? = 1 configure: failed program was: | /* confdefs.h */ ----8< snip ---- | #define PETSC_HAVE_MUMPS 1 ----8< snip ---- but I cannot find conftest.cpp. This put a question mark on my face :) . P.S. If you don't get direct e-mails from me, it's because I can't (https://ut.service-now.com/sp?id=kb_article&number=KB0011416) ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |
From: Stogner, R. H <roy...@ic...> - 2019-12-30 17:34:03
|
On Mon, 30 Dec 2019, ed...@op... wrote: > I think that I found a way to use my system's netcdf with libMesh (make check > gave no errors). > If you want to try, my recipe is here: > https://notabug.org/broncodev/libmesh-pkgbuild.git (commit e3d46fc) This (plus a bootstrap commit) is now also a PR at https://github.com/libMesh/libmesh/pull/2388 - thanks again. --- Roy |
From: <ed...@op...> - 2019-12-30 21:20:37
Attachments:
configure_libmesh_netcdf_no_parmetis.out
|
On 2019-12-30 17:33, Stogner, Roy H wrote: > ----8<---- snip > This (plus a bootstrap commit) is now also a PR at > https://github.com/libMesh/libmesh/pull/2388 - thanks again. Thanks to you for libMesh. I saw the comments on the PR, and I want to share the output of my =configure= (attached). In summary: exodus........................... : yes If you need more information, let me know, although you can see how I compile with the repos https://notabug.org/broncodev. In particular, remember that I forced the library with =netcdf.m4= (look for this #+begin_src autoconf LIBS="$LIBS -lnetcdf -L/usr/lib" CPPFLAGS="$CPPFLAGS -I/usr/include" #+end_src which may be different in your system), and this in my PKGBUILD (the recipe to compile): #+begin_SRC bash [[ -f /usr/include/netcdf.h ]] && \ sed -i "s-\(ac_subdirs_all='\)contrib/netcdf/v4-\1-g; s-\(subdirs=\"\$subdirs\) contrib/netcdf/v4-\1-g" configure #+end_SRC Happy new year! ------------------------------------------------- This free account was provided by VFEmail.net - report spam to ab...@vf... ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! |