R: QL latests with OpenMP 2.0 and MSVS 2012 (and CMake)

Posted by Ballabio Gerardo-4 on
URL: http://quantlib.414.s1.nabble.com/QL-latests-with-OpenMP-2-0-and-MSVS-2012-and-CMake-tp15025p15029.html

So it’s an OpenMP restriction indeed. I’m amazed.

There must be a reason why they did that, but I cannot imagine what it may be.

 

Gerardo

 

 

 

Gerardo Ballabio

Risk Management

 

Banca Profilo S.p.A.

Via Cerva 28 - 20122 Milano

Tel. +39 02 58408.463

www.bancaprofilo.it

 

Descrizione: http://www.bancaprofilo.it/~/media/Images/B/Banca-Profilo/logo/logo.jpg

 

 

Da: Joost Geerdink [mailto:[hidden email]]
Inviato: mercoledì 26 febbraio 2014 16.24
A: Luigi Ballabio
Cc: QuantLib users
Oggetto: Re: [Quantlib-users] QL latests with OpenMP 2.0 and MSVS 2012 (and CMake)

 

The MSVS compiler version 17 for x64 returns this error:

 

methods\finitedifferences\operators\ninepointlinearop.cpp(148): error C3016: 'i' : index variable in OpenMP 'for' statement must have signed integral type

 

The culprit:

        #pragma omp parallel for

        for (Size i=0; i < retVal.size(); ++i) {

 

The new version of openmp does allow unsigned indices, but even the newest MSVS doesn't support that yet.

 

Kind regards,

 

Joost

 

On Wed, Feb 26, 2014 at 4:16 PM, Luigi Ballabio <[hidden email]> wrote:

Hi,
    strange that openmp should prohibit unsigned indexes in loops. It
has no such limitation in either gcc or clang. What error are you
getting?

Luigi



On Wed, Feb 26, 2014 at 4:08 PM, Joost Geerdink <[hidden email]> wrote:
> Hi,
>
> When I create my MSVS 2012 project via CMake and turn on compilation for
> OpenMP, compilation fails because a few implementations in QuantLib
> (lattice.hpp, ninepointlinearop.cpp, triplebandlinearop.cpp), use for loops
> with indices being of type Size, which is defined as size_t, which is
> unsigned. In the supplied project files the flag to compile for OpenMP is
> however not set, so this problem will not show up.
>
> Surely this can easily be fixed by changing the types to int? Shall I change
> and commit a patch? Or am I doing something wrong here?
>
> Kind regards,
>
> Joost B.W. Geerdink
>

> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

 




Banca Profilo S.p.A. Via Cerva, 28 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057 Capitale Sociale Euro 136.794.106,00 i.v. Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 - [hidden email] Iscritta all’Albo delle Banche e dei Gruppi bancari Aderente al Fondo Interbancario di Tutela dei depositi Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A. DISCLAIMER: The information transmitted may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users