LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] undefined reference to scalable_aligned_malloc, scalable_aligned_realloc, and scalable_aligned_free?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] undefined reference to scalable_aligned_malloc, scalable_aligned_realloc, and scalable_aligned_free?


From: Patrick Goetz <pgoetz@...7023...>
Date: Fri, 28 Jul 2017 15:22:44 -0500

Hi -

I'm trying to compile LAMMPS using Makefile_intel_cpu_mpich and have run in to an error with the linker:

memory.o: In function `LAMMPS_NS::Memory::smalloc(long, char const*)':
/root/lammps-31Mar17/src/Obj_intel_cpu_mpich/../memory.cpp:51: undefined reference to `scalable_aligned_malloc' memory.o: In function `LAMMPS_NS::Memory::srealloc(void*, long, char const*)': /root/lammps-31Mar17/src/Obj_intel_cpu_mpich/../memory.cpp:81: undefined reference to `scalable_aligned_realloc'
memory.o: In function `LAMMPS_NS::Memory::sfree(void*)':
/root/lammps-31Mar17/src/Obj_intel_cpu_mpich/../memory.cpp:111: undefined reference to `scalable_aligned_free' /root/lammps-31Mar17/src/Obj_intel_cpu_mpich/../memory.cpp:111: undefined reference to `scalable_aligned_free'
make[1]: *** [../lmp_intel_cpu_mpich] Error 1
make[1]: Leaving directory `/root/lammps-31Mar17/src/Obj_intel_cpu_mpich'
make: *** [intel_cpu_mpich] Error 2


Some details. This is a cluster environment with modules, so I loaded both the intel and mpich modules before initiating `make intel_cpu_mpich`:

[root@...7024... src]# module list

Currently Loaded Modules:
  1) intel/17.0.1.132   2) mpich/3.2


I did make a minor edit to the Makefile. On an earlier run I got hundreds of warning messages about -no-offload being deprecated and that I should use -qno-offload instead, so I changed this in the CCFLAGS entry in the Makefile:

-
CCFLAGS =   -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \
                -fno-alias -ansi-alias -restrict $(OPTFLAGS)
+
CCFLAGS =   -g -qopenmp -DLAMMPS_MEMALIGN=64 -qno-offload \
                -fno-alias -ansi-alias -restrict $(OPTFLAGS)


Also, the users requested quite a number of add on packages, although I don't think this is related to this issue.

Looking at memory.cpp, it looks like the problem comes from some improperly defined identifiers?

#if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER)
#ifndef LMP_INTEL_NO_TBB
#define LMP_USE_TBB_ALLOCATOR
#include "tbb/scalable_allocator.h"
#else
#include <malloc.h>
#endif
#endif

We have a floating license for the Intel Parallel Studio XE Composer Edition, which does NOT include Intel's MPI implementation, but this is why I explicitly selected the intel_cpu_mpich Makefile.

Any help with this would be appreciated.

Thanks.