I’m getting a segfault when creating a string variable of other string variables specifically when using an Intel compiler and the USER-INTEL package. I’ve tracked it down to including libtbbmalloc in the supplied Intel Makefiles, that is, if I remove -ltbbmalloc and add -DLMP_INTEL_NO_TBB to CCFLAGS, the problem goes away. Also, if I compile without the USER-INTEL package, the problem goes away.
The problem comes when I make a new string variable that contains 2 (or more) string variables, which itself is not a problem, but if I try to make this new string part of another string variable, I get the segfault. Here is a basic script that reproduces the problem for me:
variable a string 10
variable b string 300
variable id string “a-{a}-b-{b}”
variable some_directory string “data/${id}” # <-- causes the segfault
The error that gets printed starts with: “*** glibc detected *** ./lmp_intel_cpu: free(): invalid pointer…” Then a backtrace that points to /lib64/libc.so.6. I would copy more of the error message but I’m working on an air-gapped cluster and would have to type it all out by hand. Let me know if there’s something specific you want to see.
I’ve tried a couple different machines with Intel 17.0.1 and 18.0.3 compilers and can reliably reproduce the error on the different configurations. Unfortunately I cannot change the way these compilers were built in case it is a system configuration issue.
I realize I have a couple of outs here: just use pure MPI and don’t worry about threads, or don’t use an intermediate string variable - but I’m just trying to understand the root of this problem. Any ideas?
Thanks.
- Jesse