Missing stdlib.h while compiling on hpc


I have installed fenics and doflin from source code using the instructions in the fenics documentation. I am successfully able to run my code on the head node but when I try to run the exact same code on the compute node of the cluster, I get the following error.

In file included from /export/apps/gcc-7.4.0/include/c++/7.4.0/ext/string_conversions.h:41:0,
                 from /export/apps/gcc-7.4.0/include/c++/7.4.0/bits/basic_string.h:6361,
                 from /export/apps/gcc-7.4.0/include/c++/7.4.0/string:52,
                 from /export/apps/gcc-7.4.0/include/c++/7.4.0/stdexcept:39,
                 from /home/kenjakt/anaconda3/envs/fenics2/lib/python3.7/site-packages/ffc/backends/ufc/ufc.h:20,
                 from /home/kenjakt/anaconda3/envs/fenics2/dolfin/include/dolfin/function/Expression.h:25,
                 from /tmp/tmp91xne4pt/dolfin_expression_91009fe811dc440183092772d4dda843.cpp:13:
/export/apps/gcc-7.4.0/include/c++/7.4.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
compilation terminated.

Looking up on what “include_next” does informed me that it removes the directories from the search path to avoid recursively including header files. I am not sure how to fix this issue so the code can run on the compute nodes of hpc too.

Can anyone please point me in the right direction?

Thank you for any help I can get!

The right direction is likely to contact your HPC administrator.

Or use ldd and check your include env vars to find how your compilation is linked to the standard library and why it doesn’t exist on the compute nodes.

1 Like

The HPC administrator is not very responsive which is why I installed it myself in my home directory.

Since the code doesn’t have any issues compiling on the head node, would it be possible to do all the compiling on the head node and then use DIJITSO_CACHE_DIR to use the compiled libraries on the compute nodes? If so how would I go about telling fenics to just do the necessary compilations and stop on the headnode?

Thank you