Re: [AMBER-Developers] problems in buildling pbsa.cuda

From: Brent Krueger <kruegerb.hope.edu>
Date: Fri, 7 Apr 2017 22:56:53 -0400

Indeed, we can make other things work. (And I think that Intel 12.0 is
more than 5 years old.)



On Fri, Apr 7, 2017 at 10:15 PM, Ruxi Qi <ruxiq.uci.edu> wrote:

> Hi Brent,
>
> Thank you for the messages. Now this new error is most likely due to a
> bug in your intel compiler (v12.0?), which could not handle compiling
> c++ file with <math.h> included after preprocessing. It was documented
> in this intel page,
> https://software.intel.com/en-us/articles/use-intel-cc-
> compilers-v1201107-or-higher-version-to-resolve-error-when-
> preprocessing-and
> . This bug, more precisely is discrepancy between gnu and intel.
> Unfortunately pbsa.cuda uses <math.h> in c++ file, and we recommend use
> gnu or higher version intel. So right now, you can just comment out the
> pbsa.cuda compile in AmberTools Makefile as suggested by Dave to work
> this out.
>
> Best,
>
> Ruxi
>
>
>
> On 4/7/17 18:18, Brent Krueger wrote:
> > Ruxi and I have been trying a few ways to try to work around my old Intel
> > 12.0 compiler and I'm afraid that we are unable to get anything simple to
> > work (Ruxi -- latest error messages below). I think that for things to
> > work on my system I'm going to need some kind of no-cuda-AT option.
> > Preferably this would skip all of the cuda-related things that are in
> > AmberTools but still build pmemd.cuda in amber16 the same way it did
> > previously.
> >
> > This may mean that we can no longer support older compilers with cuda?
> > Something we can worry about more with amber18.
> >
> >
> > Thanks,
> > Brent
> >
> >
> >
> > /usr/local/cuda/bin/nvcc -gencode arch=compute_20,code=sm_20 -gencode
> > arch=compute_30,code=sm_30 -gencode arch=compute_50,code=sm_50 -gencode
> > arch=compute_52,code=sm_52 -gencode arch=compute_53,code=sm_53
> > -use_fast_math -O3 -ccbin icpc -I../cusplibrary-0.6.0-rc -o
> > cuda_cg_wrapper.o -c cuda_cg_wrapper.cu -DCUSP -DPCG -DJacobi -DDIA
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(235): error:
> > allowing all exceptions is incompatible with previous function "__isinff"
> > /usr/local/cuda/bin/..//include/math_functions.h(7279): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(236): error:
> > allowing all exceptions is incompatible with previous function "__isinf"
> > /usr/local/cuda/bin/..//include/math_functions.h(7294): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(238): error:
> > allowing all exceptions is incompatible with previous function "__isinfl"
> > /usr/local/cuda/bin/..//include/math_functions.h(7632): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(245): error:
> > allowing all exceptions is incompatible with previous function "__isnanf"
> > /usr/local/cuda/bin/..//include/math_functions.h(7280): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(246): error:
> > allowing all exceptions is incompatible with previous function "__isnan"
> > /usr/local/cuda/bin/..//include/math_functions.h(7293): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(248): error:
> > allowing all exceptions is incompatible with previous function "__isnanl"
> > /usr/local/cuda/bin/..//include/math_functions.h(7633): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(275): error:
> > allowing all exceptions is incompatible with previous function
> "__finitef"
> > /usr/local/cuda/bin/..//include/math_functions.h(7291): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(276): error:
> > allowing all exceptions is incompatible with previous function "__finite"
> > /usr/local/cuda/bin/..//include/math_functions.h(7290): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(278): error:
> > allowing all exceptions is incompatible with previous function
> "__finitel"
> > /usr/local/cuda/bin/..//include/math_functions.h(7631): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(285): error:
> > allowing all exceptions is incompatible with previous function
> "__signbitf"
> > /usr/local/cuda/bin/..//include/math_functions.h(7297): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(286): error:
> > allowing all exceptions is incompatible with previous function
> "__signbit"
> > /usr/local/cuda/bin/..//include/math_functions.h(7292): here
> >
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(288): error:
> > allowing all exceptions is incompatible with previous function
> "__signbitl"
> > /usr/local/cuda/bin/..//include/math_functions.h(7625): here
> >
> > /usr/local/cuda/bin/..//include/math_functions.h(8862): warning:
> exception
> > specification is incompatible with that of previous function
> > "signbit(double)"
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(281): here
> >
> > /usr/local/cuda/bin/..//include/math_functions.h(8870): warning:
> exception
> > specification is incompatible with that of previous function
> > "isfinite(double)"
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(261): here
> >
> > /usr/local/cuda/bin/..//include/math_functions.h(8880): warning:
> exception
> > specification is incompatible with that of previous function
> "isnan(double)"
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(241): here
> >
> > /usr/local/cuda/bin/..//include/math_functions.h(8888): warning:
> exception
> > specification is incompatible with that of previous function
> "isinf(double)"
> > /opt/intel/composerxe-2011.0.084/compiler/include/math.h(231): here
> >
> > 12 errors detected in the compilation of
> > "/tmp/tmpxft_00002718_00000000-19_cuda_cg_wrapper.compute_53.cpp1.ii".
> > make[2]: *** [cuda_cg_wrapper.o] Error 2
> > make[2]: Leaving directory
> > `/extra/krieg/source/amber16_AT17_rc2/AmberTools/src/pbsa'
> > make[1]: *** [cuda_serial] Error 2
> > make[1]: Leaving directory
> > `/extra/krieg/source/amber16_AT17_rc2/AmberTools/src'
> > make: *** [install] Error 2
> >
> >
> >
> > On Fri, Apr 7, 2017 at 3:03 PM, Ruxi Qi <ruxiq.uci.edu> wrote:
> >
> >> Hi Brent,
> >>
> >> Commenting out just #error line in "#if defined(__ICC)" block should do
> >> the trick. Or you can remove the whole block from "#if defined(__ICC)"
> >> to "#endif /*__ICC */".
> >>
> >> Thanks!
> >>
> >> Ruxi
> >>
> >>
> >> On 4/7/17 10:41, Brent Krueger wrote:
> >>> Ruxi,
> >>>
> >>> Sorry, but our cluster is having some issues right now so I can't
> >> actually
> >>> do anything at the moment from the command line. And class is starting
> >> in
> >>> a few minutes, so I probably won't be able to actually look around for
> >>> quite awhlie.
> >>>
> >>> I was able to find the file you are talking about. Are you suggesting
> >> that
> >>> I comment out just the #error line? I'm afraid I have not used this
> >> kind
> >>> of #if compiler directive -- can I just remove that line -- or does
> that
> >>> screw up the logic of the if above and/or below as well. Should I
> change
> >>> the if statement that goes along with it instead?
> >>>
> >>>
> >>> Thanks,
> >>> Brent
> >>>
> >>>
> >>> On Fri, Apr 7, 2017 at 1:33 PM, Ruxi Qi <ruxiq.uci.edu> wrote:
> >>>
> >>>> Hi Brent,
> >>>>
> >>>> Sorry for my jumping to the conclusion. I just realized it's
> impossible
> >>>> to fully remove <cuda_runtime.h>. As we used other libraries cublas
> and
> >>>> cusparse which also include that header file. I am afraid this option
> >>>> doesn't work, and we have to go back tweaking the configure to fix
> this
> >>>> issue.
> >>>>
> >>>> Right now If you want, you can comment out the #error line in you
> >>>> cuda/include/host_config.h to see whether it gets fixed. Thanks!
> >>>>
> >>>> Best,
> >>>>
> >>>> Ruxi
> >>>>
> >>>> On 04/07/2017 05:32 AM, Brent Krueger wrote:
> >>>>> Thank you Ruxi for identifying the source of this issue.
> >>>>>
> >>>>> I've commented out the cuda_rutime.h line from the file
> >>>> cuda_cg_wrapper.cu
> >>>>> in AmberTools/src/pbsa, did a make clean, reran configure -cuda intel
> >> and
> >>>>> that build also seemed to fail in the same spot. I've done a make
> >>>>> uninstall and am now building again.
> >>>>>
> >>>>> I'm afraid I've got to run to a meeting now and I've got
> meetings/class
> >>>>> pretty much all day so I'm not sure when I'll be able to get to
> >> testing,
> >>>>> but I should at least be able to verify whether this build worked for
> >> me
> >>>> or
> >>>>> not in a couple hours...
> >>>>>
> >>>>>
> >>>>> Cheers,
> >>>>> Brent
> >>>>>
> >>>>>
> >>>>> On Fri, Apr 7, 2017 at 2:42 AM, Ruxi Qi <ruxiq.uci.edu> wrote:
> >>>>>
> >>>>>> Just found a similar story with GCC in pmemd.cuda of Amber12. See
> >>>>>> http://archive.ambermd.org/201307/0456.html
> >>>>>>
> >>>>>> Best,
> >>>>>>
> >>>>>> Ruxi
> >>>>>>
> >>>>>> On 04/06/2017 11:38 PM, Ruxi Qi wrote:
> >>>>>>> Hi All,
> >>>>>>>
> >>>>>>> I found the real cause. It is the <cuda_runtime.h> included in our
> >>>>>>> cuda wrapper code (not cusp) that triggered the ICC version
> checking
> >>>>>>> in host_config.h. In contrast, pmemd.cuda doesn't use this header,
> >>>>>>> thus won't trigger the runtime compiler checking. A quick "fix" is
> >>>>>>> just removing the <cuda_runtime.h> inclusion in our code as long as
> >> we
> >>>>>>> use nvcc to compile.
> >>>>>>>
> >>>>>>> Two concerns:
> >>>>>>>
> >>>>>>> 1) As shown by those OS/Compiler/CUDA compatibility matrices from
> >>>>>>> Nvidia, allowing the use of the compiler not officially supported
> >>>>>>> (tested) by CUDA is of risk. I don't know to what extent this
> effect
> >>>>>>> will be, maybe not a big deal?
> >>>>>>>
> >>>>>>> 2) For now, we can fix this compiler error either through a) Add a
> >>>>>>> logic checking on the icc version to configure as suggested
> >>>>>>> previously, or b) I remove the <cuda_rutime.h> inclusion in our
> code
> >> -
> >>>>>>> this will need another round combination tests. Also just mention
> >>>>>>> again, user manually commenting out the #error line in
> host_config.h
> >>>>>>> will also be a workaround (not recommended?).
> >>>>>>>
> >>>>>>> Thanks!
> >>>>>>>
> >>>>>>> Ruxi
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On 04/06/2017 07:55 PM, Daniel Roe wrote:
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> On Thu, Apr 6, 2017 at 6:59 PM, Ruxi Qi <ruxiq.uci.edu> wrote:
> >>>>>>>>> 1. I once encountered the same error. Indeed, this error is not
> >>>> because
> >>>>>>>>> of linking CUSP library. It's nvcc that complains the outdated
> ICC
> >>>>>>>>> version. Per the Nvidia official documents, CUDA 7.5 only
> supports
> >>>> ICC
> >>>>>>>>> 15.0.0, as shown bellow:
> >>>>>>>> This is not really the case, at least for Intel compilers version
> >> 14.
> >>>>>>>> I was just able to compile pmemd.cuda from Amber 16 and
> >>>>>>>> cpptraj/pmemd.cuda from amber17-with-patches with Intel V 14
> >> compilers
> >>>>>>>> and CUDA 7.5. I think this issue is really CUSP-related since as
> >> Brent
> >>>>>>>> stated he was previously able to compile pmemd.cuda from Amber 16
> >> with
> >>>>>>>> Intel V12 compilers and CUDA 7.5.
> >>>>>>>>
> >>>>>>>>> 3. Adding a --no-pbsa.cuda option is good for safety's sake in
> this
> >>>>>>>>> release. I agree with Hai that we may put it built as default,
> >> since
> >>>> it
> >>>>>>>>> generally follows the Nvidia CUDA installation rule.
> >>>>>>>> Probably the best solution would be to add logic to 'configure'
> that
> >>>>>>>> will disable pbsa.cuda if the Intel compiler version is not high
> >>>>>>>> enough. May need to do the same thing for GNU compilers if there
> is
> >> a
> >>>>>>>> similar issue.
> >>>>>>>>
> >>>>>>>> -Dan
> >>>>>>>>
> >>>>>> _______________________________________________
> >>>>>> AMBER-Developers mailing list
> >>>>>> AMBER-Developers.ambermd.org
> >>>>>> http://lists.ambermd.org/mailman/listinfo/amber-developers
> >>>>>>
> >>>> _______________________________________________
> >>>> AMBER-Developers mailing list
> >>>> AMBER-Developers.ambermd.org
> >>>> http://lists.ambermd.org/mailman/listinfo/amber-developers
> >>>>
> >>>
> >>
> >> _______________________________________________
> >> AMBER-Developers mailing list
> >> AMBER-Developers.ambermd.org
> >> http://lists.ambermd.org/mailman/listinfo/amber-developers
> >>
> >
> >
>
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>



-- 
_______________________________________________
Brent P. Krueger.....................phone:   616 395 7629
Professor.................................fax:       616 395 7118
Hope College..........................Schaap Hall 2120
Department of Chemistry
Holland, MI     49423
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Apr 07 2017 - 20:00:02 PDT
Custom Search