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: cannot convert ‘std::nullptr_t’ to ‘Py_ssize_t’ {aka ‘long int’} in initialization #19675

Open
bcmundim opened this issue Jul 18, 2024 · 8 comments
Assignees
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood reviewed Issue has been reviewed and labeled by a developer

Comments

@bcmundim
Copy link

Describe the bug

While trying to build Visit from sources I encountered the error described in this bug report title at VTK-8.1.0 compilation:

/path/to/src/visit/VTK-8.1.0/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx: At global scope:
/path/to/src/visit/VTK-8.1.0/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx:230:1: error: cannot convert ‘std::nullptr_t’ to ‘Py_ssize_t’ {aka ‘long int’} in initialization
230 | };
| ^

To Reproduce

env PAR_COMPILER="${MODULE_OPENMPI_PREFIX}"/bin/mpicc
PAR_COMPILER_CXX="${MODULE_OPENMPI_PREFIX}"/bin/mpicxx
PAR_INCLUDE=-I"${MODULE_OPENMPI_PREFIX}"/include
PAR_LIBS=-lmpi
./build_visit3_4_1 --parallel --mesagl --llvm --makeflags -j10
--prefix /path/to/lib/visit
--thirdparty-path /path/to/lib/visit/third_party
--hdf5 --silo --netcdf
--server-components-only

Where MODULE_OPENMPI_PREFIX=/path/to/software/2022a/opt/gcc-11.3.0/openmpi/5.0.2+ucx-1.15.0

I believe this bug is related to building VTK 8.1.0 with python 3.9.18, which are both dependencies shipped with Visit v3.4.1. The solution is proposed in the following bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=1718837

and it is implemented in VTK in the following commit:

https://gitlab.kitware.com/vtk/vtk/-/commit/95fce35f6821e7e03e7b178435db9895b934d327

VTK 9.1.0 release already adopts the proposed fix. Is it possible to either change the VTK version shipped with Visit v3.4.1 to VTK 9.1.0 or to port the patch back to VTK 8.1.0, which is the version shipped with Visit v3.4.1?

Thanks,
Bruno.

@bcmundim bcmundim added bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood labels Jul 18, 2024
@biagas
Copy link
Contributor

biagas commented Jul 18, 2024

You should add --qt6 --vtk9 to your build_visit3_4_1 command line.
I recommend removing the current build artifacts and starting afresh.

@bcmundim
Copy link
Author

Thank you! Adding --vtk9 helped me pass through this problem. I am stuck now building icet software compilation. The reason seems to be with openmpi 5.0.X mpi.h file having comments that don't follow C90 standards and icet compiling with those standards when they turn on -ansi flag on gcc. Here it is the error I see:

[ 70%] Building C object src/ice-t/CMakeFiles/IceTCore.dir/__/strategies/radixkr.c.o In file included from /path/to/software/2022a/opt/gcc-11.3.0/openmpi/5.0.2+ucx-1.15.0/include/mpi.h:285, from /path/to/build/visit/icet-master-77c708f9090236b576669b74c53e9f105eedbd7e/src/strategies/radixk.c:24: /path/to/software/2022a/opt/gcc-11.3.0/openmpi/5.0.2+ucx-1.15.0/include/mpi_portable_platform.h:294:30: error: operator '/' has no right operand 294 | #elif defined(__NVCOMPILER) // Must occur prior to PGI and CLANG |

I am going to try again with an older version of openmpi. However I would like to know from you if it is really necessary to have compiled the libraries --mesagl --qt6 --vtk9 if I only want to build a stack with the server components so I can use the remote server client mode of visualization.

Thanks!

@biagas
Copy link
Contributor

biagas commented Jul 25, 2024

Sorry about the qt6 suggestion, definitely not needed since you have --server-components-only, which disables it anyways. I overlooked that. Apologies.

vtk is always required.

Generally, mesagl is required when the remote server doesn't have the requisite graphics cards.

IIRC we have encountered this OpenMPI issue (and others) , which is why we have the option to build mpich (--mpich).
You could try --no-icet.

@bcmundim
Copy link
Author

Thanks! Isn't icet necessary for distributed tiling at the server? In any case, I will try with --mpich flag to see how it goes. I opened an openmpi issue to see if they can address this simple problem. I will let you know how it goes.

Thanks!

@bcmundim
Copy link
Author

Unfortunately with OpenMPI 4.1.4 also failed. Some internal environmental variable was not set properly when building Visit. I gave up on that and tried your suggestion with --mpich:

env FC="${F90}" FCFLAGS="${FCFLAGS}" \
     ./build_visit3_4_1 --parallel --mpich --mesagl --llvm --vtk9 \
     --makeflags -j10 \
     --installation-build-dir /home/s/scinet/bmundim/build/visit \
     --prefix /home/s/scinet/bmundim/lib/visit \
     --thirdparty-path /home/s/scinet/bmundim/lib/visit/third_party \
     --hdf5 --silo --netcdf \
     --server-components-only

I was able to build everything I asked for but mpich:

checking whether C compiler accepts option -O2... yes
checking whether C compiler option -O2 works with an invalid prototype program... yes
checking whether routines compiled with -O2 can be linked with ones compiled without -O2... yes
checking for shared library (esp. rpath) characteristics of CC... done (results in src/env/cc_shlib.conf)
configure: error: F90 and F90FLAGS are replaced by FC and FCFLAGS respectively in this configure, please unset F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure again.
+ return 1
+ set +x
make: *** No targets specified and no makefile found.  Stop.

I tried both setting FC/FCFLAGS variables and not setting them. Unfortunately I am stuck on this part now. Any advice would be much appreciated.

Thanks!

@bcmundim
Copy link
Author

I was able to overcome the previous problem and compile mpich with the following command:

env  --unset=F90 --unset=F90FLAGS FC=gfortran \
     ./build_visit3_4_1 --parallel --mpich --mesagl --llvm --vtk9 \
     --makeflags -j10 \
     --installation-build-dir /home/s/scinet/bmundim/build/visit \
     --prefix /home/s/scinet/bmundim/lib/visit \
     --thirdparty-path /home/s/scinet/bmundim/lib/visit/third_party \
     --hdf5 --silo --netcdf \
     --server-components-only

Now visit bails out apparently during documentation build:

...
[100%] Built target ESimV2Database_ser
Run CPack packaging tool...
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: VISIT
CPack: - Install project: VISIT []
Symlinking current to 3.4.1
gmake[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
Running Sphinx v7.0.1

Extension error:
Could not import extension sphinx.builders.linkcheck (exception: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips  26 Jan 2017'. See: https://github.com/urllib3/urllib3/issues/2168)
make[4]: *** [doc/CMakeFiles/manuals] Error 2
make[3]: *** [doc/CMakeFiles/manuals.dir/all] Error 2
make[2]: *** [doc/CMakeFiles/manuals.dir/rule] Error 2
gmake[1]: *** [doc/CMakeFiles/manuals.dir/rule] Error 2
CMake Error at /home/s/scinet/bmundim/build/visit/visit3.4.1/build/doc/cmake_install.cmake:51 (file):
  file INSTALL cannot find
  "/home/s/scinet/bmundim/build/visit/visit3.4.1/build/resources/help/en_US/manual":
  No such file or directory.
Call Stack (most recent call first):
  /home/s/scinet/bmundim/build/visit/visit3.4.1/build/cmake_install.cmake:1330 (include)


CPack Error: Error when generating package: visit
make: *** [package] Error 1

Is it possible to build without documentation? I don't really need it on a cluster.

Thanks,
Bruno.

@biagas
Copy link
Contributor

biagas commented Jul 30, 2024

You can turn off the building of the manuals by setting VISIT_ENABLE_MANUALS:BOOL=OFF (can manually edit the CMakeCache.txt and rebuild).

However, I think the install step currently forces the need for manuals to have been built.

@cyrush
Copy link
Member

cyrush commented Aug 22, 2024

@bcmundim Were you able to get a successful build after turning off the manuals?

@cyrush cyrush added the reviewed Issue has been reviewed and labeled by a developer label Aug 22, 2024
@cyrush cyrush self-assigned this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood reviewed Issue has been reviewed and labeled by a developer
Projects
None yet
Development

No branches or pull requests

3 participants