It is currently Tue Nov 30, 2021 10:53 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: problems in compilation
PostPosted: Mon Apr 20, 2015 9:27 am 
Offline

Joined: Mon May 28, 2012 7:38 pm
Posts: 20
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!


Top
 Profile  
 
PostPosted: Mon Apr 20, 2015 9:30 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
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.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
PostPosted: Mon Apr 20, 2015 9:46 am 
Offline

Joined: Mon May 28, 2012 7:38 pm
Posts: 20
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!


Top
 Profile  
 
PostPosted: Mon Apr 20, 2015 9:49 am 
Offline
Site Admin

Joined: Fri Jul 18, 2008 3:04 pm
Posts: 60
Location: Stanford
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.

_________________
Gudlaugur Johannesson, GALPROP developer


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group