ComputationalRadiationPhysics / clara2

Clara2 - a parallel classical radiation calculator based on Liénard-Wiechert potentials
GNU General Public License v3.0
13 stars 9 forks source link

Warnings when compiling with icpc #94

Open PrometheusPi opened 6 years ago

PrometheusPi commented 6 years ago

As @QJohn2017 mentioned in #89 there are several warnings when icpc is used instead of open mpi. This should be resolved for future use.

The warnings for

mpic++ -Wall -O3 -lfftw3 -lm -D__PARALLEL_SETTING__=1 -c -fopenmp -lz main.cpp

were:

parallel_jobs.h(54): remark #1418: external function definition with no prior declaration int start_array(int* numtasks, ^

parallel_jobs.h(107): remark #1418: external function definition with no prior declaration int end_array(void) ^

parallel_jobs.h(130): remark #1418: external function definition with no prior declaration int check_break(void) ^

all_directions.hpp(21): remark #1782: #pragma once is obsolete. Use #ifndef guard instead.

pragma once

          ^

main.cpp(71): remark #181: argument is incompatible with corresponding format string conversion printf("this is job %5d of %5d jobs in the array (on %s = rank: %d)\n", i, N_max, pHost, rank); ^

main.cpp(71): remark #181: argument is incompatible with corresponding format string conversion printf("this is job %5d of %5d jobs in the array (on %s = rank: %d)\n", i, N_max, pHost, rank); ^


and (as in all versions) in during:

g++ -Wall -O3 -lfftw3 -lm -c -fopenmp -I./include/ single_direction.cpp

the warning:

In file included from single_direction.cpp:35: run_through_data.hpp: In function ‘void run_through_data(const one_line, unsigned int, DET) [with DET = Detector_fft]’: run_through_data.hpp:56: warning: ‘time_fill.Discrete::future’ may be used uninitialized in this function run_through_data.hpp:56: warning: ‘time_fill.Discrete::now’ may be used uninitialized in this function run_through_data.hpp:56: warning: ‘time_fill.Discrete::old’ may be used uninitialized in this function

PrometheusPi commented 6 years ago

@QJohn2017 What is the version of icp you are using and what version is behind mpic++?

QJohn2017 commented 6 years ago

@PrometheusPi My icpc version is icpc (ICC) 11.1 20091012

PrometheusPi commented 6 years ago

@belfhi Could you tell me why you needed to include the

-L${HOME}/.local/lib/

in the makefile when using the ICC?

PrometheusPi commented 6 years ago

I assume your fftw is located there, is this correct?

belfhi commented 6 years ago

Yes, that was for the fftw library, but I didn't realize it was already installed on the cluster, so it itsn't neccessary.

belfhi commented 6 years ago

ldconfig -p | grep libfftw libfftw3l_threads.so.3 (libc6,x86-64) => /lib64/libfftw3l_threads.so.3 libfftw3l_threads.so (libc6,x86-64) => /lib64/libfftw3l_threads.so libfftw3l_omp.so.3 (libc6,x86-64) => /lib64/libfftw3l_omp.so.3 libfftw3l_omp.so (libc6,x86-64) => /lib64/libfftw3l_omp.so libfftw3l.so.3 (libc6,x86-64) => /lib64/libfftw3l.so.3 libfftw3l.so (libc6,x86-64) => /lib64/libfftw3l.so libfftw3f_threads.so.3 (libc6,x86-64) => /lib64/libfftw3f_threads.so.3 libfftw3f_threads.so (libc6,x86-64) => /lib64/libfftw3f_threads.so libfftw3f_omp.so.3 (libc6,x86-64) => /lib64/libfftw3f_omp.so.3 libfftw3f_omp.so (libc6,x86-64) => /lib64/libfftw3f_omp.so libfftw3f.so.3 (libc6,x86-64) => /lib64/libfftw3f.so.3 libfftw3f.so (libc6,x86-64) => /lib64/libfftw3f.so libfftw3_threads.so.3 (libc6,x86-64) => /lib64/libfftw3_threads.so.3 libfftw3_threads.so (libc6,x86-64) => /lib64/libfftw3_threads.so libfftw3_omp.so.3 (libc6,x86-64) => /lib64/libfftw3_omp.so.3 libfftw3_omp.so (libc6,x86-64) => /lib64/libfftw3_omp.so libfftw3.so.3 (libc6,x86-64) => /lib64/libfftw3.so.3 libfftw3.so (libc6,x86-64) => /lib64/libfftw3.so libfftw_threads.so.2 (libc6,x86-64) => /lib64/libfftw_threads.so.2 libfftw.so.2 (libc6,x86-64) => /lib64/libfftw.so.2

PrometheusPi commented 6 years ago

I got clara2 to compile with the icc and openMPI. I will test this further to get ride of warnings in as many versions as possible.

PrometheusPi commented 6 years ago

@QJohn2017 we have an Intel 11.1 compiler available at our cluster, I will check whether I can reproduce your warnings.

QJohn2017 commented 6 years ago

@PrometheusPi Okay, thank you very much! I would really like to eliminate the warnings when compiling the code and hope to hear your good news.

PrometheusPi commented 6 years ago

Sadly, the intel compiler version 11.1 and 12.1 we had were outdated. I informed our admins and they removed them. So I will have to find a new way to test these warnings. I will ask the admins to reinstall these compilers, go to an older cluster here on campus, or perhaps try it with a virtual machine on my own local computer.

@QJohn2017 I will keep you updated with my progress.

QJohn2017 commented 6 years ago

@PrometheusPi Okay, thank you ! Hope to hear your good news.