-
Notifications
You must be signed in to change notification settings - Fork 15
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
Trouble Configuring HDF5 #20
Comments
Hi @fredt00, unfortunately HDF5 build is a bit buggy and requires a few tricks by hand. Generally the The key issues seems to be The overall steps for building Nbody6++GPU with HDF5 support are as follows (details may vary):
You should not need to touch lines 120 and 129 if you follow theses steps. Let me know if it helps! The key lines in the
best wishes |
Hi Uli, Thanks for the quick reply! I followed your steps, however I still get errors when I do make clean && make -j: custom_output_facility.o: In function This only goes away if I instead specify the linker commands after the object files in line 120 and 129 like before. But then I still get the segmentation fault on an input file that worked before I tried enabling hdf5. Best, |
Hi fred, can you please share with us your "config.log" file? In this way we can understand what compilers are compiling the files. Also it would help to update your compilers just in case (this solve several issues normally). Alsoalso, did you add that hdf5 in the compilation (like Uli suggested in point 4) or you forgot to remove "-enable--hdf5" from the \configure command? If that is the latter, the issue is that one. Cheers, |
Hi Francesco, Here's my config.log file: I'm running this on a shared cluster so I don't have the permissions to update the compilers, but I'll ask if this is possible. And yes, I removed --enable-hdf5 and added ${HDF5_FLAGS} to Makefile with .hdf5 at the end of the result. |
Hi Fred, I checked the configure and I see that you don't have installed cuda. Cuda is necessary for mpi computation. If you have it installed, you need to update the path in your ".bashrc" file: export PATH=$PATH:/usr/local/cuda-7.5/bin Here it is CUDA 7.5, but you may have some different version. If you have a non-nvidia gpu (as intel), you cannot use it for now (we are currently also try for AMD, but work in progress). No worries, you can still use the code without it (just disable-mpi in the configure). If you still encounter issues, please come back here. best regards, |
Hi Francesco, Strangely I am able to build nbody6++.sse.mpi without any cuda specified as long as I do --diable-gpu and it still runs correctly with multiple cores. However, even when I specify cuda (version 12.3), it fails to build as soon as I add the above flags to the Makefile for hdf5 with the same 'undefined reference' errors. Then if I remove the references to hdf5, I am able to build nbody6++.sse.mpi.gpu as well. I tried --disable-mpi as well and was able to build nbody6++.sse. Adding the hdf5 information to the Makefile again generates the same errors. However, instead editing the Makefile to read on lines 25, 30, 120 and 129 respectively:
successfully built nbody6++.sse.hdf5 and I was able to run a 1000 particle simulation with the correct .h5part output. I think the key is specifying the linker commands for hdf5 after the object files as I think we require the library with symbol definitions to follow the object code containing symbol references. That said I'm not sure why when I build nbody6++.sse.mpi.hdf5 it does not run correctly... Best, |
Hi Fred, I think I've managed to encounter similar errors you have. There seems to be something with the HDF5 files when not using MPI and/or cuda. That might also be related to older versions... In short what did the trick for me was using the So basically follow my first answer, add the I hope this helps and I'll find some time soon to investigate more closely what is the issue here... kind regards |
I am closing this issue because there is no conversation for 6 months. If you have any further question, feel free to reopen it. |
Hi,
I'm having some trouble building the code with HDF5 enabled. I configured with the options:
FC=FC=mpif90 ./configure --enable-simd=sse --enable-mcmodel=large --enable-hdf5 --disable-gpu
And then followed the instructions in the examples to link HDF5 correctly (https://github.com/nbody6ppgpu/Nbody6PPGPU-beijing/tree/stable/examples). However I found that I kept getting errors like this:
custom_output_facility.o: In function
output_merger_':custom_output_facility.F:(.text+0x3cc4): undefined reference to
__h5g_MOD_h5gcreate_f' custom_output_facility.F:(.text+0x4766): undefined reference to
__h5f_MOD_h5fflush_f'custom_output_facility.F:(.text+0x4775): undefined reference to
__h5g_MOD_h5gclose_f' custom_output_facility.F:(.text+0x48ba): undefined reference to '__h5g_MOD_h5gopen_f'
In the end I finally managed to execute:
make clean && make -j
But I had to edit the build/Makefile created by configure to read on line 25:
HDF5_FLAGS = -D H5OUTPUT -I/usr/include/hdf5/openmpi
and on lines 120 and 129:
$(RESULT): $(OBJECTS) $(EXTRAOBJ) $(FC) $(FFLAGS) $(LDFLAGS) $(OBJECTS) $(EXTRAOBJ) -lstdc++ -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -lhdf5_fortran
nb6++dumpb2a: dump_btoa.F $(FC) $(FFLAGS) $^ -o nb6++dumpb2a -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -lhdf5_fortran
This successfully created nbody6++.sse.mpi.hdf5. However, when I execute this on an input file that worked with the version I had before I enabled hdf5, immediately get the error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x15182960b2ed in ???
#1 0x15182960a503 in ???
#2 0x151828a58f0f in ???
#3 0x151827bd62f9 in ???
#4 0x151827bd6691 in ???
#5 0x151827bd66f0 in ???
#6 0x151828200264 in ???
#7 0x1518282212aa in ???
#8 0x151829a18a17 in ???
#9 0x563082f22bcd in ???
#10 0x563082f1ea65 in ???
#11 0x151828a3bc86 in ???
#12 0x563082f1ec09 in ???
#13 0xffffffffffffffff in ???
/mnt/zfsusers/fthompson/nb6_exec: line 4: 28113 Segmentation fault (core dumped) $HOME/Nbody6PPGPU-beijing/build/nbody6++.sse.mpi.hdf5 < $1
Any help with this would be much appreciated!
The text was updated successfully, but these errors were encountered: