SWIFTSIM / SWIFT

Modern astrophysics and cosmology particle-based code. Mirror of gitlab developments at https://gitlab.cosma.dur.ac.uk/swift/swiftsim
http://www.swiftsim.com
GNU Lesser General Public License v3.0
88 stars 58 forks source link

Can't find METIS library #43

Closed tianninglyu closed 8 months ago

tianninglyu commented 8 months ago

Dear all,

I try to configure swift --with-metis=my path to metis, but it occurs to the problem that

checking for METIS_PartGraphKway in -lmetis... no
configure: error: "Failed to find a METIS library"

I have tried both static and shared library when installing metis, but it doesn't help. I don't know what's happening. Does anyone have any ideas of it? Any help will be highly appreciated.

Thank you, Tianning

tianninglyu commented 8 months ago

I try to use swift without metis, it can run correctly, but get this problem:

HDF5-DIAG: Error detected in HDF5 (1.14.3) thread 0:
  #000: H5F.c line 660 in H5Fcreate(): unable to synchronously create file
    major: File accessibility
    minor: Unable to create file
[00001.1] engine_init_particles: Setting particles to a valid state...
[00001.1] engine_init_particles: Computing initial gas densities and approximate gravity.
[00002.3] engine_init_particles: Converting internal energy variable.
[00002.3] engine_init_particles: Running initial fake time-step.
  #001: H5F.c line 614 in H5F__create_api_common(): unable to create file
    major: File accessibility
    minor: Unable to open file
  #002: H5VLcallback.c line 3605 in H5VL_file_create(): file create failed
    major: Virtual Object Layer
    minor: Unable to create file
  #003: H5VLcallback.c line 3571 in H5VL__file_create(): file create failed
    major: Virtual Object Layer
    minor: Unable to create file
  #004: H5VLnative_file.c line 94 in H5VL__native_file_create(): unable to create file
    major: File accessibility
    minor: Unable to open file
  #005: H5Fint.c line 1910 in H5F_open(): unable to lock the file
    major: File accessibility
    minor: Unable to lock file
  #006: H5FD.c line 2412 in H5FD_lock(): driver lock request failed
    major: Virtual File Layer
    minor: Unable to lock file
  #007: H5FDsec2.c line 941 in H5FD__sec2_lock(): unable to lock file, errno = 11, error message = 'Resource temporarily unavailable'
    major: Virtual File Layer
    minor: Unable to lock file

I don't know if this question caused by no-metis.

tianninglyu commented 8 months ago

And another small question. When I use fftw installed by myself, there is no fftw_malloc there. What should I do to make fftw_malloc available?

MatthieuSchaller commented 8 months ago

For the hdf5 problem, it looks like you are writing to a directory where you don't have permission or to a disk that is not mounted.

For metis, it looks like something is not right with the installation. Note that you only really neet metis for very large calculations over MPI.

For FFTW, if fftw_malloc is not found then the installation it probably not correct.

Note that on most unixoids, all these libraries can be installed straight from the package manager and require no extra interventions.

tianninglyu commented 8 months ago

OK I see. However the problem of metis still remained puzzle for me. I need to use swift to do a very large simulation, so it might be important. Thank you for help!

MatthieuSchaller commented 8 months ago

Check the different options like the size of the indices in metis. Also, you can see what went wrong more precisely in the config.log file.

pwdraper commented 8 months ago

Indeed, if you search the config.log file for the part starting: checking for METIS_PartGraphKway you should see why the test to find this function in the METIS installation failed.

tianninglyu commented 8 months ago

I have checked, that's because it can't find gklib. Can I specify the path to GKlib when configuring?

pwdraper commented 8 months ago

No, that needs to be installed into the same directory as your METIS build. Just point the installation target there when you configure GKlib.

tianninglyu commented 8 months ago

I have installed GKlib, metis and parmetis into the same directory, but error still occurs.

tianninglyu commented 8 months ago

I also try to install them into the default path, but doesn't help.

pwdraper commented 8 months ago

Can you attach your config.log file and also a listing of ls -lR from the head of your installation? Probably easiest if I have a look as the github release of METIS has only been tested once.

Alternatively get the METIS from http://glaros.dtc.umn.edu/gkhome/metis/metis/download that has a bundled GKlib and is the one we use.

tianninglyu commented 8 months ago

Thanks a lot. I use shared library instead of static one when installing metis and parmetis, and everything goes well.