GALPROP
https://galprop.stanford.edu/forum/

problems in compilation
https://galprop.stanford.edu/forum/viewtopic.php?f=6&t=205
Page 1 of 1

Author:  lw840305 [ Mon Apr 20, 2015 9:27 am ]
Post subject:  problems in compilation

Hi,
I met a following problem when I make compilation.
I want to open debug so that I can track the program.
It seems I have to open openmp, so the problem appears.

The shell script is

./configure F77=ifort CXX=g++ LIBS=-llins CXXFLAGS='-Wall -fopenmp' CFLAGS=-openmp FFLAGS=-fopenmp --with-cfitsio=/home/strickland/galprop/package/cfitsio --with-ccfits=/home/strickland/galprop/package/ccfits --with-healpix=/home/strickland/galprop/package/Healpix_2.20a/src/cxx/generic_gcc --with-clhep=/home/strickland/galprop/package/clhep --with-gsl=/home/strickland/gsl --with-galdef=/home/strickland/MCGAL/GALDEF --prefix=/home/strickland/MCGAL/galp --with-fitsdata=/home/strickland/MCGAL/FITS --datadir=/home/strickland/MCGAL/galpdata --enable-debug --enable-openmp

make

make install

But it stops when proceeding to

/home/strickland/MCGAL/MCgalp/source/antiproton.f:6: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/antiproton.f:6: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(antiproton.o): In function `tan_ng':
/home/strickland/MCGAL/MCgalp/source/antiproton.f:82: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/antiproton.f:82: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(bremss_spec.o): In function `bremss_spec':
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:6: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:6: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(bremss_spec.o): In function `fphi1':
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:165: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:165: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(bremss_spec.o): In function `fphi2':
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:188: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/bremss_spec.f:188: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(cfactor.o): In function `aic':
/home/strickland/MCGAL/MCgalp/source/cfactor.f:85: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:85: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:85: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:85: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(cfactor.o): In function `ftheta':
/home/strickland/MCGAL/MCgalp/source/cfactor.f:186: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:186: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:186: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:186: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(cfactor.o): In function `ffi':
/home/strickland/MCGAL/MCgalp/source/cfactor.f:327: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:327: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:327: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/cfactor.f:327: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `pp_meson':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:6: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:6: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:6: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `muon':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:163: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:163: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:163: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `fmu':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:277: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:277: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `cs_tot':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:359: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:359: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:359: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `d_pion':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:506: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:506: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:506: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `sb_epi':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:543: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:543: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:543: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `sb_meson':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:569: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:569: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:569: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `sb':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:614: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:614: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:614: undefined reference to `__kmpc_threadprivate_cached'
libgalprop.a(pp_meson.o): In function `stecker':
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:700: undefined reference to `__kmpc_global_thread_num'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:700: undefined reference to `__kmpc_threadprivate_cached'
/home/strickland/MCGAL/MCgalp/source/pp_meson.f:700: undefined reference to `__kmpc_threadprivate_cached'

Do you know what is the problem?

Thank you very much for your kind help!

Author:  gudlaugu [ Mon Apr 20, 2015 9:30 am ]
Post subject:  Re: problems in compilation

lw840305 wrote:
Hi,
./configure F77=ifort CXX=g++


You are mixing gcc and intel compilers. This mode has not been tested but the code should compile with either the intel or the gcc compilers as long as they are not mixed.

Author:  lw840305 [ Mon Apr 20, 2015 9:46 am ]
Post subject:  Re: problems in compilation

Thank you very much for timing answer!
Do you know how to turn off the openmp, because
when I don't add --enable-openmp, and only included
--enable-debug, there is an error:

In function `openmp_max_threads':
/home/linsj/MCGAL/package/Healpix_2.20a/src/cxx/cxxsupport/openmp_support.h:51: undefined reference to `omp_get_max_threads'

How can I fully close openmp in Healpix?

Thank you very much!

Author:  gudlaugu [ Mon Apr 20, 2015 9:49 am ]
Post subject:  Re: problems in compilation

When you compile HEALPix you have the option to select a configuration file. Select one that does not contain the -fopenmp or -openmp switches. Or you can edit one of the existing configuration files if none exists without that option.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/