Ok, so the test does exhibit different errors when run through the config script, compared to my attempts to isolate it:
----------------------------
Executing: [compilation command]
successful compile:
Source:
#include "confdefs.h"
#include "conffix.h"
/* Override any gcc2 internal prototype to avoid an error. */
char HYPRE_IJMatrixCreate();
static void _check_HYPRE_IJMatrixCreate() { HYPRE_IJMatrixCreate(); }
int main() {
_check_HYPRE_IJMatrixCreate();;
return 0;
}
Executing: [linker command]
stdout:
LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(dtrmm.c.obj)'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(dtrmv.c.obj)'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(lsame.c.obj)'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(xerbla.c.obj)'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(lsame.c.obj)'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'HYPRE.lib(dtrti2.c.obj)'
[etc...]
HYPRE.lib(par_vector.c.obj) : error LNK2019: unresolved external symbol __imp__wassert referenced in function hypre_ParVectorDestroy
HYPRE.lib(vector.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(par_csr_matop.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(par_csr_communication.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(csr_matop.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(merge_sort.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(memory.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(IJMatrix_parcsr.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(par_csr_matrix.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(csr_matrix.c.obj) : error LNK2001: unresolved external symbol __imp__wassert
HYPRE.lib(memory.c.obj) : error LNK2019: unresolved external symbol __imp_realloc referenced in function hypre_ReAlloc
HYPRE.lib(par_vector.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(vector.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(IJMatrix.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(par_csr_matrix.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(csr_matrix.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(new_commpkg.c.obj) : error LNK2001: unresolved external symbol __imp_fopen
HYPRE.lib(printf.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vfscanf referenced in function _vfscanf_l
HYPRE.lib(printf.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function _vsscanf_l
HYPRE.lib(mmio.c.obj) : error LNK2001: unresolved external symbol __imp___stdio_common_vsscanf
HYPRE.lib(mmio.c.obj) : error LNK2019: unresolved external symbol __imp_fgets referenced in function hypre_mm_read_banner
HYPRE.lib(mmio.c.obj) : error LNK2019: unresolved external symbol __imp_tolower referenced in function hypre_mm_read_banner
C:\cygwin64\tmp\PE0681~1\CONFIG~1.LIB\conftest.exe : fatal error LNK1120: 7 unresolved externals
icx: error: linker command failed with exit code 1120 (use -v to see invocation)
Possible ERROR while running linker: exit code 96
[more warnings etc]
-------------------------
I've looked at the oneapi compiler documentation, and it seems like "nodefaultlib", "nostdlib", etc, options only work for linux versions of the compiler,
so I'm not sure what to do about the first warning. From the errors, it looks like some core c or c++ library that hypre depends on isn't visible. I had some similar
issues with ptscotch - but in that case I didn't have the warnings, and the errors gave me the names of libraries that were missing, which I lilnked in using the --cflags
option (maybe --cc-linker-flags would have been neater, but it worked. I've tried both in order to try to get the above working).
I can go into detail about the compile and linker commands if needed; I'd have to explain more about my choices for --cflags, etc too. I wonder if any of the above output
shines any light on the hypre-is-shared-library hypothesis.
Thanks,
Daniel