mold icon indicating copy to clipboard operation
mold copied to clipboard

Runtime error with Intel MKL and FEAST solver

Open paulfloyd opened this issue 1 year ago • 2 comments
trafficstars

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

  • GCC 5.3 (also tried GCC 13.2)
  • MKL 2017
  • FEAST 4.0 (the latest version, built with gfortran and MKL)
  • Intel OpenMP

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.

paulfloyd avatar Jul 19 '24 13:07 paulfloyd

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?

rui314 avatar Jul 20 '24 02:07 rui314

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

paulfloyd avatar Aug 15 '24 08:08 paulfloyd