rui314 / mold

Mold: A Modern Linker 🦠
MIT License
14.04k stars 461 forks source link

Runtime error with Intel MKL and FEAST solver #1310

Open paulfloyd opened 1 month ago

paulfloyd commented 1 month ago

I'm testing using mold as a replacement for ld.bfd on a large Linux project. The build speed times look impressive.

However I am getting new failures in some of our tests.

It may be difficult to make a small reproducer. We are using

I had problems with FEAST a while back (see https://stackoverflow.com/questions/76208029/building-libfeast-eigenvalue-solver-with-gfortran) and I used the kludge -fallow-argument-mismatch

Now I'm wondering if that could be causing problems with mold?

I'm a C++ dev and I find it hard to debug fortran.

rui314 commented 1 month ago

I need to reproduce your issue on my machine to debug it. It doesn't have to be a small reproducer. Is there any way to do that?

paulfloyd commented 3 weeks ago

UNFINISHED

I'll slowly write instructions here as I try to make a smallish reproducer. I'm not familiar with thge library in question which doesn't help.

I'm using GCC 14.2 greshly build from source. Next, download FEAST solver from http://feast-solver.org/ Unfortunately you have to fill in a short questionnaire.

Unpack the archive and cd to FEAST/4.0/src

Also unfortunately FEAST no longer compiles cleanly so I had to make the following change:

# gnu fortran
ifeq ($(F90),gfortran)
F90FLAGS= -O3 -fopenmp -ffree-line-length-none -ffixed-line-length-none -cpp #-fPIC
ifeq ($(MKL),yes)
F90FLAGS += -DMKL
endif
# PJF added line below
F90FLAGS += -g -fallow-argument-mismatch
endif

Build with make F90=gfortran feast. FEAST/4.0/lib/x64 should now contain libfeast.a.

Next steps.

  1. dump the input data - it uses vectors of complex double too big to just copy and paste
  2. work out how to initialize FEAST
  3. write a harness