Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Linux Parallel can’t compile UDF › Reply To: Linux Parallel can’t compile UDF
for d in lnamd64/[23]*; do
 (
  cd $d;
rm -rf *.{c,h,cpp,hpp};
  for f in ../../src/*.{c,h,cpp,hpp} ../../src/makefile ../../src/user.udf; do
   if [ -f $f -a ! -f `basename $f` ]; then
    echo "# linking to" $f "in" $d;
    ln -s $f .;
   fi;
  done;
  echo "";
  echo "# building library in" $d;
  if [ "" = "1" ]; then
echo "# using gcc64";
make ARCHC=gcc64 -k>makelog 2>&1;
  else
if [ "" = "1" ]; then
echo "# using gcc";
make ARCHC=gcc -k>makelog 2>&1;
else
make -k>makelog 2>&1;
fi;
  fi;
  cat makelog;
 )
done
# linking to ../../src/Sloshing.c in lnamd64/3ddp_host
Â
# building library in lnamd64/3ddp_host
make[1]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
# Generating udf_names.c because of makefile Sloshing.c
make[2]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
make[3]: Warning: File `udf_names.c' has modification time 0.42 s in the future
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/`expr "`pwd`" : '.*/(.*)/[23].*'`/`basename "`pwd`"` -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/main -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/addon-wrapper -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/io -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/species -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/pbns -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/numerics -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/sphysics -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/storage -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/mphase -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/bc -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/models -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/material -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/amg -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/util -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/mesh -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/udf -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/ht -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dx -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/turbulence -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/parallel -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/etc -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/ue -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dpm -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dbns -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/cortex/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/client/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/tgrid/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/mpi_wrapper/include -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/mpi_wrapper/src -I. -c udf_names.c
In file included from /data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/udf/udf.h:22:0,
         from udf_names.c:
/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/main/global.h:9:20: fatal error: stdio.h: No such file or directory
 # include
          ^
compilation terminated.
make[3]: *** [udf_names.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: warning: Â Clock skew detected. Â Your build may be incomplete.
make[3]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
make[2]: *** [lnamd64] Error 2
make[2]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_host'
# linking to ../../src/Sloshing.c in lnamd64/3ddp_node
Â
# building library in lnamd64/3ddp_node
make[1]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
# Generating udf_names.c because of makefile Sloshing.c
make[2]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
make[3]: Warning: File `udf_names.c' has modification time 0.42 s in the future
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/`expr "`pwd`" : '.*/(.*)/[23].*'`/`basename "`pwd`"` -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/main -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/addon-wrapper -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/io -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/species -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/pbns -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/numerics -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/sphysics -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/storage -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/mphase -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/bc -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/models -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/material -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/amg -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/util -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/mesh -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/udf -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/ht -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dx -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/turbulence -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/parallel -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/etc -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/ue -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dpm -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/dbns -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/cortex/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/client/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/tgrid/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/src -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/mpi_wrapper/include -I/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/multiport/mpi_wrapper/src -I. -c udf_names.c
In file included from /data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/udf/udf.h:22:0,
         from udf_names.c:
/data/software/Fluent/ansys_inc/v181/fluent/fluent18.1.0/src/main/global.h:9:20: fatal error: stdio.h: No such file or directory
 # include
          ^
compilation terminated.
make[3]: *** [udf_names.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: warning: Â Clock skew detected. Â Your build may be incomplete.
make[3]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
make[2]: *** [lnamd64] Error 2
make[2]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/data/home/xwang3/workspace/libudf/lnamd64/3ddp_node'
Â