Dears,
I have installed openmpi-4.0.5, when I compile Quantum espresso-6.7.0 with to use all my threads in my calculations, with this command: " ./configure --enable-openmp ; make -j 12 " ,it seems to be all ok, when I run test ~/q-e-qe-6.7.0/PW/examples/example01/run_example , the following appears in terminal:
#########################################################################################
/home/youca/Softwares/q-e-qe-6.7.0/PW/examples/example01 : starting
This example shows how to use pw.x to calculate the total energy and
the band structure of four simple systems: Si, Al, Cu, Ni.
executables directory: /home/youca/Softwares/q-e-qe-6.7.0/bin
pseudo directory: /home/youca/Softwares/q-e-qe-6.7.0/pseudo
temporary directory: /home/youca/Softwares/q-e-qe-6.7.0/tempdir
checking that needed directories and files exist... done
running pw.x as: mpirun -np 4 /home/youca/Softwares/q-e-qe-6.7.0/bin/pw.x -nk 1 -nd 1 -nb 1 -nt 1
running the scf calculation for Si...Abort(1094543) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(639)......:
MPID_Init(860).............:
MPIDI_NM_mpi_init_hook(689): OFI addrinfo() failed (ofi_init.h:689:MPIDI_NM_mpi_init_hook:No data available)
Abort(1094543) on node 1 (rank 1 in comm 0): Fatal error in PMPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(639)......:
MPID_Init(860).............:
MPIDI_NM_mpi_init_hook(689): OFI addrinfo() failed (ofi_init.h:689:MPIDI_NM_mpi_init_hook:No data available)
Abort(1094543) on node 2 (rank 2 in comm 0): Fatal error in PMPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(639)......:
MPID_Init(860).............:
MPIDI_NM_mpi_init_hook(689): OFI addrinfo() failed (ofi_init.h:689:MPIDI_NM_mpi_init_hook:No data available)
Abort(1094543) on node 3 (rank 3 in comm 0): Fatal error in PMPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(639)......:
MPID_Init(860).............:
MPIDI_NM_mpi_init_hook(689): OFI addrinfo() failed (ofi_init.h:689:MPIDI_NM_mpi_init_hook:No data available)
forrtl: error (78): process killed (SIGTERM)
Image PC Routine Line Source
pw.x 0000000000DF35D4 Unknown Unknown Unknown
libpthread-2.31.s 00001512446D13C0 Unknown Unknown Unknown
libpthread-2.31.s 00001512446D0330 read Unknown Unknown
libmpi.so.12.0.0 0000151246A1199F Unknown Unknown Unknown
libmpi.so.12.0.0 0000151246A10D32 Unknown Unknown Unknown
libmpi.so.12.0.0 00001512450538D0 Unknown Unknown Unknown
libmpi.so.12.0.0 0000151245104613 MPIR_Err_return_c Unknown Unknown
libmpi.so.12.0.0 0000151245CF2D95 PMPI_Init_thread Unknown Unknown
libmpifort.so.12. 0000151247A895DC MPI_INIT_THREAD Unknown Unknown
pw.x 0000000000895521 mp_world_mp_mp_wo 65 mp_world.f90
pw.x 0000000000894FC6 mp_global_mp_mp_s 71 mp_global.f90
pw.x 0000000000407390 MAIN__ 64 pwscf.f90
pw.x 0000000000407322 Unknown Unknown Unknown
libc-2.31.so 0000151243FB80B3 __libc_start_main Unknown Unknown
pw.x 000000000040722E Unknown Unknown Unknown
forrtl: error (78): process killed (SIGTERM)
Image PC Routine Line Source
pw.x 0000000000DF35D4 Unknown Unknown Unknown
libpthread-2.31.s 000014EC37DFD3C0 Unknown Unknown Unknown
libpthread-2.31.s 000014EC37DFC330 read Unknown Unknown
libmpi.so.12.0.0 000014EC3A13D99F Unknown Unknown Unknown
libmpi.so.12.0.0 000014EC3A13CD32 Unknown Unknown Unknown
libmpi.so.12.0.0 000014EC3877F8D0 Unknown Unknown Unknown
libmpi.so.12.0.0 000014EC38830613 MPIR_Err_return_c Unknown Unknown
libmpi.so.12.0.0 000014EC3941ED95 PMPI_Init_thread Unknown Unknown
libmpifort.so.12. 000014EC3B1B55DC MPI_INIT_THREAD Unknown Unknown
pw.x 0000000000895521 mp_world_mp_mp_wo 65 mp_world.f90
pw.x 0000000000894FC6 mp_global_mp_mp_s 71 mp_global.f90
pw.x 0000000000407390 MAIN__ 64 pwscf.f90
pw.x 0000000000407322 Unknown Unknown Unknown
libc-2.31.so 000014EC376E40B3 __libc_start_main Unknown Unknown
pw.x 000000000040722E Unknown Unknown Unknown
forrtl: error (78): process killed (SIGTERM)
Image PC Routine Line Source
pw.x 0000000000DF35D4 Unknown Unknown Unknown
libpthread-2.31.s 00001502753273C0 Unknown Unknown Unknown
libpthread-2.31.s 0000150275326330 read Unknown Unknown
libmpi.so.12.0.0 000015027766799F Unknown Unknown Unknown
libmpi.so.12.0.0 0000150277666D32 Unknown Unknown Unknown
libmpi.so.12.0.0 0000150275CA98D0 Unknown Unknown Unknown
libmpi.so.12.0.0 0000150275D5A613 MPIR_Err_return_c Unknown Unknown
libmpi.so.12.0.0 0000150276948D95 PMPI_Init_thread Unknown Unknown
libmpifort.so.12. 00001502786DF5DC MPI_INIT_THREAD Unknown Unknown
pw.x 0000000000895521 mp_world_mp_mp_wo 65 mp_world.f90
pw.x 0000000000894FC6 mp_global_mp_mp_s 71 mp_global.f90
pw.x 0000000000407390 MAIN__ 64 pwscf.f90
pw.x 0000000000407322 Unknown Unknown Unknown
libc-2.31.so 0000150274C0E0B3 __libc_start_main Unknown Unknown
pw.x 000000000040722E Unknown Unknown Unknown
forrtl: error (78): process killed (SIGTERM)
Image PC Routine Line Source
pw.x 0000000000DF35D4 Unknown Unknown Unknown
libpthread-2.31.s 000014FD8472A3C0 Unknown Unknown Unknown
libpthread-2.31.s 000014FD84729330 read Unknown Unknown
libmpi.so.12.0.0 000014FD86A6A99F Unknown Unknown Unknown
libmpi.so.12.0.0 000014FD86A69D32 Unknown Unknown Unknown
libmpi.so.12.0.0 000014FD850AC8D0 Unknown Unknown Unknown
libmpi.so.12.0.0 000014FD8515D613 MPIR_Err_return_c Unknown Unknown
libmpi.so.12.0.0 000014FD85D4BD95 PMPI_Init_thread Unknown Unknown
libmpifort.so.12. 000014FD87AE25DC MPI_INIT_THREAD Unknown Unknown
pw.x 0000000000895521 mp_world_mp_mp_wo 65 mp_world.f90
pw.x 0000000000894FC6 mp_global_mp_mp_s 71 mp_global.f90
pw.x 0000000000407390 MAIN__ 64 pwscf.f90
pw.x 0000000000407322 Unknown Unknown Unknown
libc-2.31.so 000014FD840110B3 __libc_start_main Unknown Unknown
pw.x 000000000040722E Unknown Unknown Unknown
Error condition encountered during test: exit status = 179
Aborting
#########################################################################################
My make.inc file contain following:
###############################################################
# make.inc. Generated from make.inc.in by configure.
# compilation rules
.SUFFIXES :
.SUFFIXES : .o .c .f90 .h .fh
# most fortran compilers can directly preprocess c-like directives: use
# $(MPIF90) $(F90FLAGS) -c $<
# if explicit preprocessing by the C preprocessor is needed, use:
# $(CPP) $(CPPFLAGS) $< -o $*.F90
# $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o
# remember the tabulator in the first column !!!
.f90.o:
$(MPIF90) $(F90FLAGS) -c $<
.c.o:
$(CC) $(CFLAGS) -c $<
.h.fh:
$(CPP) $(CPPFLAGS) $< -o $*.fh
# Top QE directory, useful for locating libraries, linking QE with plugins
# The following syntax should always point to TOPDIR:
TOPDIR = $(dir $(abspath $(filter %make.inc,$(MAKEFILE_LIST))))
# if it doesn't work, uncomment the following line (edit if needed):
# TOPDIR = /home/youca/Softwares/q-e-qe-6.7.0
# DFLAGS = precompilation options (possible arguments to -D and -U)
# used by the C compiler and preprocessor
# To use libxc (v>=3.0.1), add -D__LIBXC to DFLAGS
# See include/defs.h.README for a list of options and their meaning
# With the exception of IBM xlf, FDFLAGS = $(DFLAGS)
# For IBM xlf, FDFLAGS is the same as DFLAGS with separating commas
# MANUAL_DFLAGS = additional precompilation option(s), if desired
# BEWARE: it does not work for IBM xlf! Manually edit FDFLAGS
MANUAL_DFLAGS =
DFLAGS = -D__DFTI -D__MPI
FDFLAGS = $(DFLAGS) $(MANUAL_DFLAGS)
# IFLAGS = how to locate directories with *.h or *.f90 file to be included
# typically -I$(TOPDIR)/include -I/some/other/directory/
# the latter contains .e.g. files needed by FFT libraries
# for libxc add -I/path/to/libxc/include/
IFLAGS = -I$(TOPDIR)/include -I$(TOPDIR)/FoX/finclude -I/opt/intel/compilers_and_libraries_2019.1.144/linux/mkl:/opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/include
# MOD_FLAG = flag used by f90 compiler to locate modules
MOD_FLAG = -I
# BASEMOD_FLAGS points to directories containing basic modules,
# while BASEMODS points to the corresponding module libraries
# Each Makefile can add directories to MODFLAGS and libraries to QEMODS
BASEMOD_FLAGS= $(MOD_FLAG)$(TOPDIR)/upflib \
$(MOD_FLAG)$(TOPDIR)/Modules \
$(MOD_FLAG)$(TOPDIR)/FFTXlib \
$(MOD_FLAG)$(TOPDIR)/LAXlib \
$(MOD_FLAG)$(TOPDIR)/UtilXlib \
$(MOD_FLAG)$(TOPDIR)/FoX/finclude
# Compilers: fortran-90, fortran-77, C
# If a parallel compilation is desired, MPIF90 should be a fortran-90
# compiler that produces executables for parallel execution using MPI
# (such as for instance mpif90, mpf90, mpxlf90,...);
# otherwise, an ordinary fortran-90 compiler (f90, g95, xlf90, ifort,...)
# If you have a parallel machine but no suitable candidate for MPIF90,
# try to specify the directory containing "mpif.h" in IFLAGS
# and to specify the location of MPI libraries in MPI_LIBS
MPIF90 = mpiifort
F90 = ifort
CC = icc
# CUDA Toolkit path
CUDA_PATH=
# GPU architecture (Kepler: 35, Pascal: 60, Volta: 70 )
GPU_ARCH=
# CUDA runtime (Pascal: 8.0, Volta: 9.0)
CUDA_RUNTIME=
# CUDA F90 Flags
CUDA_F90FLAGS=
# C preprocessor and preprocessing flags - for explicit preprocessing,
# if needed (see the compilation rules above)
# preprocessing flags must include DFLAGS and IFLAGS
CPP = cpp
CPPFLAGS = -P -traditional -Uvector $(DFLAGS) $(IFLAGS)
# compiler flags: C, F90
# C flags must include DFLAGS and IFLAGS
# F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax
CFLAGS = -O3 $(DFLAGS) $(IFLAGS)
F90FLAGS = $(FFLAGS) -nomodule -qopenmp -fpp $(FDFLAGS) $(CUDA_F90FLAGS) $(IFLAGS) $(MODFLAGS)
# compiler flags with and without optimization for fortran-77
# the latter is NEEDED to properly compile dlamch.f, used by lapack
FFLAGS = -O2 -assume byterecl -g -traceback -qopenmp
FFLAGS_NOOPT = -O0 -assume byterecl -g -traceback
# compiler flag needed by some compilers when the main program is not fortran
# Currently used for Yambo
FFLAGS_NOMAIN = -nofor_main
# Linker, linker-specific flags (if any)
# Typically LD coincides with F90 or MPIF90, LD_LIBS is empty
# for libxc, set LD_LIBS=-L/path/to/libxc/lib/ -lxcf90 -lxc
# If libxc is older than v5.0.0 replace -lxcf90 with -lxcf03
LD = mpiifort
LDFLAGS = -qopenmp
LD_LIBS =
# External Libraries (if any) : blas, lapack, fft, MPI
# If you have nothing better, use the local copy
# BLAS_LIBS = $(TOPDIR)/LAPACK/libblas.a
BLAS_LIBS = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
# If you have nothing better, use the local copy
# LAPACK_LIBS_SWITCH = internal
# LAPACK_LIBS = $(TOPDIR)/LAPACK/liblapack.a
LAPACK_LIBS =
LAPACK_LIBS_SWITCH = external
SCALAPACK_LIBS =
# nothing needed here if the the internal copy of FFTW is compiled
# (needs -D__FFTW in DFLAGS)
FFT_LIBS =
# HDF5
HDF5_LIBS =
FOX_LIB = -L$(TOPDIR)/FoX/lib -lFoX_dom -lFoX_sax -lFoX_wxml -lFoX_common\
-lFoX_utils -lFoX_fsys
FOX_FLAGS =
# For parallel execution, the correct path to MPI libraries must
# be specified in MPI_LIBS (except for IBM if you use mpxlf)
MPI_LIBS =
# IBM-specific: MASS libraries, if available and if -D__MASS is defined in FDFLAGS
MASS_LIBS =
# library for bayesian error estimate functionals
BEEF_LIBS = $(TOPDIR)/LIBBEEF/libbeef.a
BEEF_LIBS_SWITCH = internal
# CUDA libraries
CUDA_LIBS=
CUDA_EXTLIBS =
# ar command and flags - for most architectures: AR = ar, ARFLAGS = ruv
AR = ar
ARFLAGS = ruv
# ranlib command. If ranlib is not needed (it isn't in most cases) use
# RANLIB = echo
RANLIB = ranlib
# all internal and external libraries - do not modify
FLIB_TARGETS = all
LIBOBJS = $(TOPDIR)/clib/clib.a
LIBXC_LIBS =
QELIBS = $(BEEF_LIBS) $(LIBXC_LIBS) $(CUDA_LIBS) $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FOX_LIB) $(FFT_LIBS) $(BLAS_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(HDF5_LIBS) $(LD_LIBS)
# wget or curl - useful to download from network
WGET = wget -O
# Install directory - "make install" copies *.x executables there
PREFIX = /usr/local
########################################################
Than you in advance
It does not seem that you are actually using Open MPI at all. Your make.inc file sets
MPIF90 = mpiifort
which is the Intel MPI Fortran compiler wrapper. The error messages also seem like coming from Intel MPI. If this is so, you may be simply running into a classical issue with Intel MPI (or more specifically libfrabric) not knowing of any default interface that can be used for parallel communication. Try specifying one prior to running any program using Intel MPI, for instance
export FI_PROVIDER=tcp
or
export FI_PROVIDER=sockets
Related
I'm trying to package a driver. However, when I compile the driver I don't get the output file CorXtiumCLMX4k.ko as expected, while the Makefile does contain the lines:
obj-m := CorXtiumCLMX4k.o
CorXtiumCLMX4k-objs := $(GDRV_OBJS) $(TARGETLIB)
(Btw any idea what this -objs is for? In the kernel documentation they mention the prefix -y… but I also tried it without success)
The compilation does not give any error at that step… just no .ko file is produced:
salsera_xtium> make: Entering directory '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux'
salsera_xtium> make -C /nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build M=/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux IROOT=/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/../../../../.. modules
salsera_xtium> make[1]: Entering directory '/nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build'
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_Linux.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_LinuxUtil.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/GDrv_Util.o
salsera_xtium> CC [M] /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/memmanag.o
salsera_xtium> make[1]: Leaving directory '/nix/store/n862ppa5sy8bmnhs801cskcisd6z7fd0-linux-5.4.225-dev/lib/modules/5.4.225/build'
salsera_xtium> make: Leaving directory '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux'
salsera_xtium> cp: cannot stat '/build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/src/xtium/xtium_cl_mx4/driver/kernel/linux/CorXtiumCLMX4k.ko': No such file or directory
(note that make takes /nix/…/lib instead of /lib because I'm using Nix so I patched the path accordingly… also I do compile before other libraries that are not shown in this log, see below)
Any idea what could go wrong? I tried to compile with kernel 5.4 (supposed to be supported according to the doc…) and a more recent kernel, none of them work.
Debug informations
If it can be of any help, here is the list of files in the current folder before the compilation starts:
copysources corenv.h CorXtiumCLMX4k26_x86_64_a gdrv.h GDrv_kernel.h GDrv_KernelThread.h GDrv_Linux.c GDrv_LinuxUtil.c GDrv_LinuxUtil.h GDrv_OS.h GDrv_Util.c Makefile sdrv.h sources
At the end, I have:
copysources cormgrlibk.c gdrv.h GDrv_KernelThread.h GDrv_LinuxUtil.c GDrv_OS.h Makefile Module.symvers serialk.c
corenv.h CorXtiumCLMX4k26_x86_64_a GDrv_kernel.h GDrv_Linux.c GDrv_LinuxUtil.h GDrv_Util.c memmanag.c sdrv.h sources
The file CorXtiumCLMX4k26_x86_64_a seems to be some sort of static binary blob:
$ file CorXtiumCLMX4k26_x86_64_a
CorXtiumCLMX4k26_x86_64_a: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped
$ ldd CorXtiumCLMX4k26_x86_64_a
ldd: warning: you do not have execution permission for `./CorXtiumCLMX4k26_x86_64_a'
not a dynamic executable
(note that I also tried to rename it as CorXtiumCLMX4k.o_shipped with 'TARGETLIB = CorXtiumCLMX4k.o' without success)
Note that latter in the build process (yeah, it continues even after errors), I also get an error:
salsera_xtium> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: warning: /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/Xtium-CL_MX4/lib/libXtiumCLMX4L_1_0_a has a section extending past end of file
salsera_xtium> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: error: /build/va8hwnknyg6cgzqydl3gm64j8z0vyq2i-source/DALSA/Xtium-CL_MX4/lib/libXtiumCLMX4L_1_0_a: ELF section name out of range
but I'm not sure if this error is because I'm missing some compilation flags like pic, if the file is just bad, or if it's just that I first need to compile the .ko file properly…
the Makefile looks like:
#-----------------------------------------------------------------------------
# MAKEFILE
# Copyright(C) Teledyne DALSA Inc 2015
# All rights reserved.
#
# Description:
# Makefile for distributed version of the CorXtiumCLMX4 kernel module for Linux
#
#-----------------------------------------------------------------------------
#
# Determine the kernel version being compiled for.
CORKERNEL_MAJOR:=$(shell uname -r | cut -d '.' -f 1)
CORKERNEL_MINOR:=$(shell uname -r | cut -d '.' -f 2)
#
# Kernel version-specific dependencies
# (mainly needed for 2.4 kernel support).
#
ifeq ($(CORKERNEL_MAJOR), 2)
ifeq ($(CORKERNEL_MINOR), 6)
# 2.6 kernel
TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB
#TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB -DDEBUG_PRINT
SAPSRCROOT := $(IROOT)/sapera
else
# Not 2.6 kernel - not supported (PCIe hardware).
$(error $(shell echo "Kernel version must be 2.6 or higher to support PCIe hardware"))
endif
else ifeq ($(CORKERNEL_MAJOR), 3)
# 2.6 (or higher kernel)
TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB
#TARGET_OPTIONS = -DHOSTPC -DPOSIX_HOSTPC -DNEW_CXM_INTERFACE -DEXPORT_SYMTAB -DDEBUG_PRINT
SAPSRCROOT := $(IROOT)/sapera
endif
#
# API Version control information to be embedded.
#
ifndef CORARCH
CORARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/x86_64/x86_64/ )
endif
TARGETNAME = CorXtiumCLMX4k
TARGET = $(TARGETNAME).ko
ifeq ($(CORARCH), x86_64)
TARGETLIB = $(TARGETNAME)26_x86_64_a
CORARCH_OPTIONS= -Dx86_64
else
TARGETLIB = $(TARGETNAME)26_i386_a
CORARCH_OPTIONS= -D__i386__
endif
#
# Include Path for the kernel module.
#
I_CORSERIALCOMMON= $(SAPSRCROOT)/driver/corserial/linux/common
CORSERIALDEV= $(SAPSRCROOT)/driver/corserial/linux/kernel
CORMGRK= $(SAPSRCROOT)/driver/cormanager/kernel
XCELERA_HS_PX8_INC= $(IROOT)/xtium/xtium_cl_mx4/include
CURDIR = $(IROOT)/xtium/xtium_cl_mx4/driver/kernel/linux
INC_COMMON_PATH = -I$(CURDIR) -I$(KERNEL_INCLUDEDIR) -I$(CURDIR) -I$(SAPSRCROOT)/include \
-I$(XCELERA_HS_PX8_INC) -I$(CORMGRK) -I$(I_CORSERIALCOMMON) -I$(CORSERIALDEV)
DISTINSTALLDIR=$(IROOT)/../Xtium-CL_MX4/bin
RUNNINGKERNEL=$(shell uname -r)
INSTALLDIR= /lib/modules/$(RUNNINGKERNEL)/misc
#
# Source Path for the kernel module.
#
#
# Object definitions: Specific files for this library.
# GDrv objects.
GDRV_OBJS = GDrv_Linux.o \
GDrv_LinuxUtil.o \
GDrv_Util.o \
memmanag.o \
cormgrlibk.o \
serialk.o
#
# 2.6 kernel build section
#
INC_PATH = -I$(CURDIR) $(INC_COMMON_PATH)
CFLAGS_MODULE += $(INC_PATH) $(TARGET_OPTIONS) $(CORKERNEL_CONFIG_OPTIONS) \
$(CORARCH_OPTIONS)
EXTRA_CFLAGS += -Wno-parentheses -Wno-missing-braces -Wno-unknown-pragmas \
-Wno-cast-qual -Wno-unused-function -Wno-unused-label
#
# As of kernel 2.6.28 (and later) - versioned module symbol dependencies need to be specified
# explicitly - using absolute paths - to the Module.symvers files for the modules whose
# symbols we depend on.
# (Actually broken in an early 2.6.28 but later fixed).
#
# Prior to 2.6.28 - the kernel build system and module loader would resolve all symbols automatically
#
CORKVER := $(shell uname -r | cut -d '.' -f 3)
CORKTEMP := 28
COMPAREKVER := $(shell echo ${CORKVER}\>=${CORKTEMP} | bc )
ifeq ($(COMPAREKVER),1)
KBUILD_EXTRA_SYMBOLS= $(CORMGRK)/Module.symvers $(CORSERIALDEV)/Module.symvers
else
$(shell cat $(CORMGRK)/Module.symvers > $(CURDIR)/Module.symvers)
$(shell cat $(CORSERIALDEV)/Module.symvers >> $(CURDIR)/Module.symvers)
endif
#
# 2.6 kernel build section
#
ifneq ($(KERNELRELEASE),)
obj-m := CorXtiumCLMX4k.o
CorXtiumCLMX4k-objs := $(GDRV_OBJS) $(TARGETLIB)
#
# Perform any specific kernel configuration difference checks.
#
CORKERNEL_INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include
ifeq ($(shell $(SAPSRCROOT)/corcfgtest.sh remap_pfn_range $(CORKERNEL_INCLUDEDIR)),1)
CORKERNEL_CONFIG_OPTIONS += -DUSE_REMAP_PFN_RANGE
endif
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
RES := $(shell ./copysources)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) IROOT=$(PWD)/../../../../.. modules
endif
all: $(TARGET)
clean:
-$(RM) $(OBJS) $(GDRV_OBJS) $(TARGET)
distclean:
-$(RM) $(OBJS) $(GDRV_OBJS)
install: all
cp $(TARGET) $(INSTALLDIR)
distinstall: all
cp $(TARGET) $(DISTINSTALLDIR)
(note that I also tried to turn else ifeq ($(CORKERNEL_MAJOR), 3) in else since kernel 5 is bigger than kernel 3… still no success).
If you want the full compilation log (including the sub libraries), see here.
I was able to compiled the gateway but I got the error below running the make command.
gcc -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/mysql -o gwlib/dbpool.o -c gwlib/dbpool.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdlib.h:25,
from gwlib/gwlib.h:70,
from gwlib/dbpool.c:70:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
In file included from gwlib/gwlib.h:83,
from gwlib/dbpool.c:70:
gwlib/dbpool_mysql.c: In function ‘mysql_select’:
gwlib/dbpool_mysql.c:224:48: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘xr_bool’?
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))|
gwlib/dbpool_mysql.c:224:48: note: each undeclared identifier is reported only once for each function it appears in
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))
make: *** [Makefile:230: gwlib/dbpool.o] Error 1`
This error comes when you're compiling with mysql 8
To fix this, add these lines to gwlib/dbpool_mysql.c
/* define my_bool for newer versions because they use the bool or int C type instead */
#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_BASE_VERSION)
typedef bool my_bool;
#endif
I am currently setting up a new PC with Omnet++, Veins and Artery for simulating ITS-G5 protocol. After calling make inet in the root directory of Artery I get the following Error Message:
$ make inet
cd extern/inet; python inet_featuretool disable packetdrill SCTP SCTP_examples
Disabling feature(s): packetdrill, SCTP_examples, SCTP
opp_featuretool: .oppfeaturestate file updated.
opp_featuretool: .nedexclusions file updated.
make -C extern/inet makefiles
make[1]: Entering directory '/home/wiconlab/Car2x/artery-master/extern/inet'
Creating Makefile in /home/wiconlab/Car2x/artery-master/extern/inet/src...
make[1]: Leaving directory '/home/wiconlab/Car2x/artery-master/extern/inet'
make -C extern/inet/src
make[1]: Entering directory '/home/wiconlab/Car2x/artery-master/extern/inet/src'
*** COMPILING with:
g++ -c -std=c++11 -O3 -march=native -mtune=native -DNDEBUG=1 -MMD -MP -MF .d -fPIC -fno-stack-protector -DHAVE_SWAPCONTEXT -DWITH_MPI -DXMLPARSER=libxml -DPREFER_QTENV -DWITH_QTENV -DWITH_TKENV -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_OSG -DWITH_OSGEARTH -Wno-overloaded-virtual -include inet/common/precompiled.h -I. -I/home/wiconlab/Car2x/omnetpp-5.2/include
*** LINKING with:
g++ -shared -fPIC -o ../out/gcc-release/src/libINET.so -Wl,--no-as-needed -Wl,--whole-archive -Wl,--no-whole-archive -loppenvir -loppsim -ldl -lstdc++ -lOpenThreads -losg -losgText -losgDB -losgEarth -losgEarthUtil -Wl,-rpath,/home/wiconlab/Car2x/omnetpp-5.2/lib -Wl,-rpath,/lib -Wl,-rpath,. -L/home/wiconlab/Car2x/omnetpp-5.2/lib
Building...
Creating precompiled header for gcc...
MSGC: inet/applications/base/ApplicationPacket.msg
... *ABBREVIATED FOR CLARITY*
inet/networklayer/ipv4/RoutingTableRecorder.cc
inet/networklayer/ipv4/RoutingTableRecorder.cc: In member function ‘virtual void inet::RoutingTableRecorder::recordInterfaceChange(omnetpp::cModule*, const inet::InterfaceEntry*, omnetpp::simsignal_t)’:
inet/networklayer/ipv4/RoutingTableRecorder.cc:207:15: error: expected ‘)’ before ‘INT64_PRINTF_FORMAT’
#define LL INT64_PRINTF_FORMAT // for eventnumber_t
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:296:37: note: in expansion of macro ‘LL’
fprintf(routingLogFile, "%s %" LL "d %s %d %s %s\n",
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:303:13: warning: spurious trailing ‘%’ in format [-Wformat=]
);
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:303:13: warning: too many arguments for format [-Wformat-extra-args]
inet/networklayer/ipv4/RoutingTableRecorder.cc: In member function ‘virtual void inet::RoutingTableRecorder::recordRouteChange(omnetpp::cModule*, const inet::IRoute*, omnetpp::simsignal_t)’:
inet/networklayer/ipv4/RoutingTableRecorder.cc:207:15: error: expected ‘)’ before ‘INT64_PRINTF_FORMAT’
#define LL INT64_PRINTF_FORMAT // for eventnumber_t
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:323:36: note: in expansion of macro ‘LL’
fprintf(routingLogFile, "%s %" LL "d %s %d %s %s %d %s\n",
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:332:13: warning: spurious trailing ‘%’ in format [-Wformat=]
);
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:332:13: warning: too many arguments for format [-Wformat-extra-args]
Makefile:1134: recipe for target '../out/gcc-release/src/inet/networklayer/ipv4/RoutingTableRecorder.o' failed
make[1]: *** [../out/gcc-release/src/inet/networklayer/ipv4/RoutingTableRecorder.o] Error 1
make[1]: Leaving directory '/home/wiconlab/Car2x/artery-master/extern/inet/src'
Makefile:21: recipe for target 'inet' failed
make: *** [inet] Error 2
I am using an up to date Ubuntu 16.04 LTS, compiling with cmake 3.9.6, building Veins and Vanetza worked without issue. Omnet++ Version is 5.2. The code lines, the Error is referring to are:
203 namespace inet {
204
205 Define_Module(RoutingTableRecorder);
206
207 #define LL INT64_PRINTF_FORMAT // for eventnumber_t
However expecting a ")" before line 207 makes no sense to me.
Also, this Error did not appear when building Artery on a different System (Same OS) a few weeks earlier. Using an earlier revision of the source had no effect either.
You are using OMNeT++ 5.2.
This seems to be the problem because the API has changed slightly.
INT64_PRINTF_FORMAT isn't available anymore in OMNeT++ 5.2.
Changing back to OMNeT++ Version 5.1 should resolve your error!
fprintf(routingLogFile, "%s %" LL "d %s %d %s %s %d %s\n",
^
inet/networklayer/ipv4/RoutingTableRecorder.cc:332:13: warning: spurious trailing ‘%’ in format [-Wformat=]
);
This is just a simple syntax error. Go through the path Inet/src/inet/networlayer/ipv4/ and open the RoutingTableRecord.cc file and edit at "fprintf(routingLogFile, "%s %" LL "d %s %d %s %s %d %s\n", " line and remove LL including the double quotes that is around the LL. There are two of them with in this C code. So make sure they are both corrected like the following line: fprintf(routingLogFile, "%s %d %s %d %s %s %d %s\n", .
You might also need to comment out #define LL INT64_PRINTF_FORMAT // for eventnumber_t at line number around 270.
Then save and Clean only the inet project. Then Build also only the inet project.
I am a newbie in CUDA and want to compile my first programms on a Jetson TK1.
I have searched the Internet and also this Site but dont found something, that was helpful for me.
I have found this example
http://bikulov.org/blog/2013/12/24/example-of-cmake-file-for-cuda-plus-cpp-code/
and tried to compile the CUDA example oceanFFT which runs with the sample Makefile.
http://developer.download.nvidia.com/compute/cuda/1.1-Beta/x86_website/samples.html#oceanFFT
I have changed this CMakeLists.txt a little bit, but I dont know if I did this correct.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(lbmslv)
FIND_PACKAGE(CUDA REQUIRED)
FIND_PACKAGE(MPI REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE(FindCUDA)
INCLUDE_DIRECTORIES(/usr/local/cuda/include ${MPI_INCLUDE_PATH})
INCLUDE_DIRECTORIES(/usr/local/cuda-6.5/samples/common/inc ${CUS_INCLUDE_PATH})
INCLUDE_DIRECTORIES(/usr/local/cuda-6.5/samples/common/lib/linux/armv7l ${GLEW_INCLUDE_PATH})
FILE(GLOB SOURCES "*.cu" "*.cpp" "*.c" "*.h")
CUDA_ADD_EXECUTABLE(lbmslv ${SOURCES})
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++0x -O3 -ffast-math -Wall")
LIST(APPEND CUDA_NVCC_FLAGS --compiler-options -fno-strict-aliasing -lineinfo -use_fast_math -Xptxas -dlcm=cg)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
TARGET_LINK_LIBRARIES(lbmslv /usr/local/cuda/lib/libcudart.so ${MPI_LIBRARIES})
When I run this I get a lot errors with :
undefined reference to .. gl.., glew.., glut..
so, not linked to this Libraries.
What did I wrong?
My problem with the sample Makefiles is, that they are to complicate for my.
I have also tried to make the sample Makefile easier.
# Location of the CUDA Toolkit
CUDA_PATH ?= /usr/local/cuda-6.5
OSUPPER = $(shell uname -s 2>/dev/null | tr "[:lower:]" "[:upper:]")
OSLOWER = $(shell uname -s 2>/dev/null | tr "[:upper:]" "[:lower:]")
OS_SIZE = $(shell uname -m | sed -e "s/x86_64/64/" -e "s/armv7l/32/" -e "s/aarch64/64/")
OS_ARCH = $(shell uname -m)
ARCH_FLAGS =
DARWIN = $(strip $(findstring DARWIN, $(OSUPPER)))
ifneq ($(DARWIN),)
XCODE_GE_5 = $(shell expr `xcodebuild -version | grep -i xcode | awk '{print $$2}' | cut -d'.' -f1` \>= 5)
endif
# Take command line flags that override any of these settings
# ARCH == ARMv7
OS_SIZE = 32
OS_ARCH = armv7l
ARCH_FLAGS = -target-cpu-arch ARM
# Common binaries
GCC := arm-linux-gnueabihf-g++
NVCC := $(CUDA_PATH)/bin/nvcc -ccbin $(GCC)
# internal flags
NVCCFLAGS := -m${OS_SIZE} ${ARCH_FLAGS}
CCFLAGS :=
LDFLAGS :=
# Extra user flags
EXTRA_NVCCFLAGS ?=
EXTRA_LDFLAGS ?=
EXTRA_CCFLAGS ?=
# OS-specific build flags
ifeq ($(abi),gnueabi)
CCFLAGS += -mfloat-abi=softfp
else
# default to gnueabihf
override abi := gnueabihf
LDFLAGS += --dynamic-linker=/lib/ld-linux-armhf.so.3
CCFLAGS += -mfloat-abi=hard
endif
ifneq ($(TARGET_FS),)
GCCVERSIONLTEQ46 := $(shell expr `$(GCC) -dumpversion` \<= 4.6)
ifeq ($(GCCVERSIONLTEQ46),1)
CCFLAGS += --sysroot=$(TARGET_FS)
endif
LDFLAGS += --sysroot=$(TARGET_FS)
LDFLAGS += -rpath-link=$(TARGET_FS)/lib
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib
LDFLAGS += -rpath-link=$(TARGET_FS)/usr/lib/arm-linux-$(abi)
endif
# Debug build flags
ifeq ($(dbg),1)
NVCCFLAGS += -g -G
TARGET := debug
else
TARGET := release
endif
ALL_CCFLAGS :=
ALL_CCFLAGS += $(NVCCFLAGS)
ALL_CCFLAGS += $(EXTRA_NVCCFLAGS)
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(CCFLAGS))
ALL_CCFLAGS += $(addprefix -Xcompiler ,$(EXTRA_CCFLAGS))
ALL_LDFLAGS :=
ALL_LDFLAGS += $(ALL_CCFLAGS)
ALL_LDFLAGS += $(addprefix -Xlinker ,$(LDFLAGS))
ALL_LDFLAGS += $(addprefix -Xlinker ,$(EXTRA_LDFLAGS))
# Common includes and paths for CUDA
INCLUDES := -I ~/NVIDIA_CUDA-6.5_Samples/common/inc
LIBRARIES :=
################################################################################
SAMPLE_ENABLED := 1
# Makefile include to help find GL Libraries
include ./findgllib.mk
# OpenGL specific libraries
ifneq ($(DARWIN),)
# Mac OSX specific libraries and paths to include
LIBRARIES += -L/System/Library/Frameworks/OpenGL.framework/Libraries
LIBRARIES += -lGL -lGLU ../../common/lib/darwin/libGLEW.a
ALL_LDFLAGS += -Xlinker -framework -Xlinker GLUT
else
LIBRARIES += -L ~/NVIDIA_CUDA-6.5_Samples/common/lib/$(OSLOWER)/$(OS_ARCH) $(GLLINK)
LIBRARIES += -lGL -lGLU -lX11 -lXi -lXmu -lglut -lGLEW
endif
# Gencode arguments
ifeq ($(OS_ARCH),armv7l)
SMS ?= 20 30 32 35 37 50 52
else
SMS ?= 11 20 30 35 37 50 52
endif
ifeq ($(SMS),)
$(info >>> WARNING - no SM architectures have been specified - waiving sample <<<)
SAMPLE_ENABLED := 0
endif
ifeq ($(GENCODE_FLAGS),)
# Generate SASS code for each SM architecture listed in $(SMS)
$(foreach sm,$(SMS),$(eval GENCODE_FLAGS += -gencode arch=compute_$(sm),code=sm_$(sm)))
# Generate PTX code from the highest SM architecture in $(SMS) to guarantee forward-compatibility
HIGHEST_SM := $(lastword $(sort $(SMS)))
ifneq ($(HIGHEST_SM),)
GENCODE_FLAGS += -gencode arch=compute_$(HIGHEST_SM),code=compute_$(HIGHEST_SM)
endif
endif
LIBRARIES += -lcufft
ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= #echo "[#]"
endif
################################################################################
# Target rules
all: build
build: dat
check.deps:
ifeq ($(SAMPLE_ENABLED),0)
#echo "Sample will be waived due to the above missing dependencies"
else
#echo "Sample is ready - all dependencies have been met"
endif
dat.o:oceanFFT.cpp
$(EXEC) $(NVCC) $(INCLUDES) $(ALL_CCFLAGS) $(GENCODE_FLAGS) -o $# -c $<
dat_kernel.o:oceanFFT_kernel.cu
$(EXEC) $(NVCC) $(INCLUDES) $(ALL_CCFLAGS) $(GENCODE_FLAGS) -o $# -c $<
dat: dat.o dat_kernel.o
$(EXEC) $(NVCC) $(ALL_LDFLAGS) $(GENCODE_FLAGS) -o $# $+ $(LIBRARIES)
$(EXEC) mkdir -p ../bin
$(EXEC) cp $# ../bin
run: build
$(EXEC) ./dat
clean:
rm -f dat dat.o dat_kernel.o
rm -rf ../bin/dat
clobber: clean
Is their anything else, I can make easier or shorter?
I have less experience in creating makefiles and looking for a general way to create some for CUDA. I hope you can help me.
EDIT:
The new cmake file is:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(lbmslv)
FIND_PACKAGE(CUDA REQUIRED)
FIND_PACKAGE(MPI REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE(FindCUDA)
# include every include directory
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS} ${MPI_INCLUDE_PATH} ${GLEW_INCLUDE_PATH})
INCLUDE_DIRECTORIES(/usr/local/cuda-6.5/samples/common/inc ${SAMPLE_INCLUDE_PATH})
FILE(GLOB SOURCES "*.cu" "*.cpp" "*.c" "*.h")
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++0x -O3 -ffast-math -Wall")
LIST(APPEND CUDA_NVCC_FLAGS --compiler-options -fno-strict-aliasing -lineinfo -use_fast_math -Xptxas -dlcm=cg)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
CUDA_ADD_EXECUTABLE(lbmslv ${SOURCES})
# add every dependency to lbmslv
TARGET_LINK_LIBRARIES(lbmslv ${CUDA_LIBRARIES} ${MPI_LIBRARIES} ${OPENGL_LIBRARIES} ${SAMPLE_LIBRARIES})
I get the following terminal outputs:
ubuntu#tegra-ubuntu:~/Documents/CUDA/bin$ cmake ../myOzean/
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found CUDA: /usr/local/cuda-6.5 (found version "6.5")
-- Found MPI_C: /usr/lib/libmpi.so;/usr/lib/arm-linux-gnueabihf/libdl.so;/usr/lib/arm-linux-gnueabihf/libhwloc.so
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so;/usr/lib/libmpi.so;/usr/lib/arm-linux-gnueabihf/libdl.so;/usr/lib/arm-linux-gnueabihf/libhwloc.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabihf/libX11.so
-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/Documents/CUDA/bin
ubuntu#tegra-ubuntu:~/Documents/CUDA/bin$ make
[ 50%] Building NVCC (Device) object CMakeFiles/lbmslv.dir//./lbmslv_generated_oceanFFT_kernel.cu.o
/usr/lib/gcc/arm-linux-gnueabihf/4.8/include/stddef.h(432): error: identifier "nullptr" is undefined
/usr/lib/gcc/arm-linux-gnueabihf/4.8/include/stddef.h(432): error: expected a ";"
/usr/include/arm-linux-gnueabihf/c++/4.8/bits/c++config.h(190): error: expected a ";"
/usr/include/c++/4.8/exception(63): error: expected a ";"
/usr/include/c++/4.8/exception(68): error: expected a ";"
/usr/include/c++/4.8/exception(76): error: expected a ";"
/usr/include/c++/4.8/exception(83): error: expected a ";"
/usr/include/c++/4.8/exception(93): error: expected a "{"
/usr/include/c++/4.8/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"
/usr/include/c++/4.8/bits/exception_ptr.h(64): error: expected a "{"
/usr/include/c++/4.8/bits/exception_ptr.h(79): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(81): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(82): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(84): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(86): error: declaration is incompatible with previous "std::current_exception"
(64): here
/usr/include/c++/4.8/bits/exception_ptr.h(86): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(86): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(87): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(90): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(92): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(95): error: incomplete type is not allowed
/usr/include/c++/4.8/bits/exception_ptr.h(95): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(116): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(126): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(143): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(144): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(147): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(152): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(153): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(156): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(157): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(160): error: use of a local type to declare a function
/usr/include/c++/4.8/bits/exception_ptr.h(161): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(169): error: expected a ";"
/usr/include/c++/4.8/bits/nested_exception.h(57): error: incomplete type is not allowed
/usr/include/c++/4.8/bits/nested_exception.h(60): error: expected a ";"
/usr/include/c++/4.8/bits/nested_exception.h(66): error: expected a ";"
/usr/include/c++/4.8/bits/nested_exception.h(70): error: identifier "rethrow_exception" is undefined
/usr/include/c++/4.8/bits/nested_exception.h(73): error: function "std::nested_exception::nested_ptr" returns incomplete type "std::__exception_ptr::exception_ptr"
/usr/include/c++/4.8/new(95): error: expected a "{"
/usr/include/c++/4.8/new(110): error: identifier "__p" is undefined
/usr/include/c++/4.8/new(111): error: expected a "{"
/usr/include/c++/4.8/new(115): error: expected a "{"
/usr/include/c++/4.8/new(116): error: expected a "{"
/usr/local/cuda-6.5/include/common_functions.h(92): warning: exception specification is incompatible with that of previous function "operator new[](std::size_t, void *)"
/usr/include/c++/4.8/new(111): here
/usr/local/cuda-6.5/include/common_functions.h(93): warning: exception specification is incompatible with that of previous function "operator delete(void *, void *)"
/usr/include/c++/4.8/new(115): here
/usr/local/cuda-6.5/include/common_functions.h(94): warning: exception specification is incompatible with that of previous function "operator delete[](void *, void *)"
/usr/include/c++/4.8/new(116): here
/usr/include/c++/4.8/bits/cpp_type_traits.h(184): error: identifier "char16_t" is undefined
/usr/include/c++/4.8/bits/cpp_type_traits.h(191): error: identifier "char32_t" is undefined
/usr/include/c++/4.8/bits/cpp_type_traits.h(191): error: class "std::__is_integer<<error-type>>" has already been defined
/usr/include/c++/4.8/bits/cpp_type_traits.h(314): error: namespace "std::__gnu_cxx" has no member "__normal_iterator"
/usr/include/c++/4.8/bits/cpp_type_traits.h(314): error: expected a ">"
/usr/include/c++/4.8/cmath(80): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(80): error: expected a ";"
/usr/include/c++/4.8/cmath(105): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(105): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(105): error: expected a ";"
/usr/include/c++/4.8/cmath(124): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(124): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(124): error: expected a ";"
/usr/include/c++/4.8/cmath(143): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(143): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(143): error: expected a ";"
/usr/include/c++/4.8/cmath(162): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(162): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(162): error: expected a ";"
/usr/include/c++/4.8/cmath(183): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(183): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(183): error: expected a ";"
/usr/include/c++/4.8/cmath(202): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(202): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(202): error: expected a ";"
/usr/include/c++/4.8/cmath(221): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(221): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(221): error: expected a ";"
/usr/include/c++/4.8/cmath(240): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(240): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(240): error: expected a ";"
/usr/include/c++/4.8/cmath(259): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(259): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(259): error: expected a ";"
/usr/include/c++/4.8/cmath(278): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(278): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(278): error: expected a ";"
/usr/include/c++/4.8/cmath(297): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(297): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(297): error: expected a ";"
/usr/include/c++/4.8/cmath(328): error: "constexpr" is not a function or static data member
/usr/include/c++/4.8/cmath(337): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(337): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(337): error: expected a ";"
/usr/include/c++/4.8/cmath(356): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(356): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(356): error: expected a ";"
/usr/include/c++/4.8/cmath(375): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(375): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(375): error: expected a ";"
/usr/include/c++/4.8/cmath(406): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(406): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(406): error: expected a ";"
/usr/include/c++/4.8/cmath(443): error: inline specifier allowed on function declarations only
/usr/include/c++/4.8/cmath(443): error: variable "std::constexpr" has already been defined
/usr/include/c++/4.8/cmath(443): error: expected a ";"
Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00004dfc_00000000-12_oceanFFT_kernel.compute_35.cpp1.ii".
Compilation terminated.
CMake Error at lbmslv_generated_oceanFFT_kernel.cu.o.cmake:264 (message):
Error generating file
/home/ubuntu/Documents/CUDA/bin/CMakeFiles/lbmslv.dir//./lbmslv_generated_oceanFFT_kernel.cu.o
make[2]: *** [CMakeFiles/lbmslv.dir/./lbmslv_generated_oceanFFT_kernel.cu.o] Error 1
make[1]: *** [CMakeFiles/lbmslv.dir/all] Error 2
make: *** [all] Error 2
ubuntu#tegra-ubuntu:~/Documents/CUDA/bin$
I've changed your CMakeLists.txt a little bit:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(lbmslv)
FIND_PACKAGE(CUDA REQUIRED)
FIND_PACKAGE(MPI REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE(FindCUDA)
# include every include directory
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS} ${MPI_INCLUDE_PATH} ${MPI_INCLUDE_PATH} ${GLEW_INCLUDE_PATH})
FILE(GLOB SOURCES "*.cu" "*.cpp" "*.c" "*.h")
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++0x -O3 -ffast-math -Wall")
LIST(APPEND CUDA_NVCC_FLAGS --compiler-options -fno-strict-aliasing -lineinfo -use_fast_math -Xptxas -dlcm=cg)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
CUDA_ADD_EXECUTABLE(lbmslv ${SOURCES})
# add every dependency to lbmslv
TARGET_LINK_LIBRARIES(lbmslv ${CUDA_LIBRARIES} ${MPI_LIBRARIES} ${OPENGL_LIBRARIES})
Tried to install Florist on this video but the installation process after ./Configure --prefix=/usr/gnat
I have not gone
checking how to run the C preprocessor ... /lib/cpp
checking for aio.h. .. no
checking for dirent.h ... no
checking for errno.h ... no
checking for fcntl.h ... no
checking for grp.h. .. no
checking for locale.h ... no
checking for mqueue.h ... no
...
Socket interface Looks like BSD 4.3
checking for getaddrinfo ... no
configure: WARNING: No getaddrinfo provided by the OS. Will use our own version.
checking for pthread_self in-lpthread ... yes
checking for aio_read in-laio ... no
checking for clock_gettime in-lposix4 ... no
checking for clock_gettime in-lrt ... yes
checking for gethostbyname in-lnsl ... yes
checking for t_bind in-lnsl ... no
checking for t_bind in-lnsl_s ... no
checking for accept in-lsocket ... no
checking for h_errno in-lresolv ... no
using LIBS =-lnsl-lrt-lpthread
checking for egrep ... grep-E
In general, all 'no'
what's the catch?
GNAT and florist ( 2013 )
if you continue, then take off the following errors
ebanat#ebanat:~/Program/florist$ make -j 4
gcc -c -O2 posix-macros.c
gcc -c -O2 posix-macros-sockets.c
gcc -O2 -DVERSION="\"Florist-2013 (20130319)\"" -DLIBS="\"-lnsl -lrt -lpthread \"" -o c-posix c-posix.c -lnsl -lrt -lpthread
gnatprep posix-implementation.gpb posix-implementation.adb gnatprep.config -c -r
In file included from pconfig.h:10:0,
from posix-macros-sockets.c:13:
addrinfo.h:18:3: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
In file included from pconfig.h:10:0,
from c-posix.c:56:
addrinfo.h:18:3: error: unknown type name 'size_t'
In file included from pconfig.h:10:0,
from posix-macros.c:45:
addrinfo.h:18:3: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
In file included from /usr/include/errno.h:29:0,
from c-posix.c:57:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
In file included from /usr/include/unistd.h:26:0,
from posix-macros.c:46:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [posix-macros-sockets.o] Ошибка 1
make: *** Ожидание завершения заданий...
make: *** [c-posix] Ошибка 1
make: *** [posix-macros.o] Ошибка 1