MRST in octave

445 views
Skip to first unread message

Andres Codas

unread,
Dec 16, 2016, 9:07:33 AM12/16/16
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi,

   What is your plan regarding maintaining compatibility between MRST and octave?

   I would like to run the modules 'ad-core', 'ad-blackoil', 'ad-props' and 'deckformat' using Octave.  I know there are limitations with classes but it seems that octave included some support on this direction, see http://wiki.octave.org/Classdef.  Is this possible?

   If classes are not supported, can I still run the module ad-fi ?

   Thanks!,
    Andres

Bård Skaflestad

unread,
Dec 16, 2016, 9:14:40 AM12/16/16
to Andres Codas, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Andres,

We don't really have a plan for maintaining compatibility with Octave. We generally "just" defer to the Octave team to implement the requisite MATLAB language and library features. That said, one of my colleagues did an experiment recently in which he just loaded up one of the AD-based examples from MRST 2016b in Octave 4.0.3 and ran it. Other than visualisation/plotting, I think most of it ran through without issue, but I may be missing some of the details.


Sincerely,
Bård Skaflestad
SINTEF ICT, Applied Mathematics
________________________________________
From: sinte...@googlegroups.com [sinte...@googlegroups.com] on behalf of Andres Codas [andre...@gmail.com]
Sent: 16 December 2016 15:07
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Subject: [MRST Users] MRST in octave
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com<mailto:sintef-mrst...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/dd6c9a6b-6bc7-40ac-a05c-603f3f222d26%40googlegroups.com<https://groups.google.com/d/msgid/sintef-mrst/dd6c9a6b-6bc7-40ac-a05c-603f3f222d26%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

Andres Codas

unread,
Dec 16, 2016, 5:13:19 PM12/16/16
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Bård,

   Thanks for your answer.  Indeed, Octave 4.0.3 works!. I ran a simulation of a TwoPhaseOilWaterModel. I had to do some workarounds though.  For the record:
  • Concatenation of an empty array with a string or a cell does not work.  The proper empty type must be provided (or don't concatenate something with empty in first place).
  • griddedInterpolant does not exist in octave.  I replaced it by interp1.

  • cellfun(@double,{[ADI,ADI]},'UniformOutput',false) must be implemented with a for loop.

  • The 'helpers function' in ADI.m cannot be declared after the object. I included them as static hidden methods.
  • isprop for objects is not supported.  I replaced  isprop(object,prop) by numel(intersect(fieldnames(object),{prop}) ) >= 1;

   I hope it helps for somebody else.

   Cheers,

    Andres

2016-12-16 12:14 GMT-02:00 Bård Skaflestad <Bard.Sk...@sintef.no>:
Hi Andres,

We don't really have a plan for maintaining compatibility with Octave.  We generally "just" defer to the Octave team to implement the requisite MATLAB language and library features.  That said, one of my colleagues did an experiment recently in which he just loaded up one of the AD-based examples from MRST 2016b in Octave 4.0.3 and ran it.  Other than visualisation/plotting, I think most of it ran through without issue, but I may be missing some of the details.


Sincerely,
Bård Skaflestad
SINTEF ICT, Applied Mathematics
________________________________________
From: sinte...@googlegroups.com [sinte...@googlegroups.com] on behalf of Andres Codas [andre...@gmail.com]
Sent: 16 December 2016 15:07
To: MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Subject: [MRST Users] MRST in octave

Hi,

   What is your plan regarding maintaining compatibility between MRST and octave?

   I would like to run the modules 'ad-core', 'ad-blackoil', 'ad-props' and 'deckformat' using Octave.  I know there are limitations with classes but it seems that octave included some support on this direction, see http://wiki.octave.org/Classdef.  Is this possible?

   If classes are not supported, can I still run the module ad-fi ?

   Thanks!,
    Andres

--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst+unsubscribe@googlegroups.com<mailto:sintef-mrst+unsubscribe@googlegroups.com>.
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/12B771AE701C544CB8C32192333A02CD01704DA763%40SINTEFEXMBX04.sintef.no.

Olav Møyner

unread,
Dec 17, 2016, 8:24:00 AM12/17/16
to Andres Codas, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Andres,

Thank you for running this tests. This sounds very encouraging! We will investigate and see if we can make the ad solvers compatible with octave out of the box. Last time we checked, the classdef keyword was very poorly supported, but it seems like the developers of octave has made rapid headway.


Best regards,
Olav
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/CAHxzi3UqCP5Ub21d8k7fkCYN6aDFrjO5sKTZeqtwN1GDS21Udw%40mail.gmail.com.

bacetti.a...@gmail.com

unread,
Apr 14, 2017, 11:25:23 AM4/14/17
to MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Hi Andres,

Would you like share your fixes with more details (m files to be modified and line of code)

Andres Codas

unread,
Apr 22, 2017, 3:21:19 PM4/22/17
to bacetti.a...@gmail.com, MRST-users: The Matlab Reservoir Simulation Toolbox User Group
Dear Bacetti,

   Sorry for my delay.

   Unfortunately I did not compile all of the fixes so you can run it out-of-the-box. Nevertheless, find a patch with some fixes.  You may still need to do some fixes to get your example to work, but it will not be much more than that for the AD modules.

   Moreover, I include some .m files that you will need to change in your octave installation, or put them in higher priority in the path.

   By the way, I encourage the mrst developers to release their code through github.  It will be easier to propose these changes and collaborate with them.

   Good luck,
   Andres

Ps:


--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst+unsubscribe@googlegroups.com.
file.patch
deval.m
fieldnames.m
isprop.m

Olav Møyner

unread,
Apr 24, 2017, 3:44:00 AM4/24/17
to Andres Codas, bacetti.a...@gmail.com, MRST-users: The Matlab Reservoir Simulation Toolbox User Group

Dear Andres,

 

Thank you for the updated patch. We hope to fully support the latest version of Octave for the AD solvers sometime in the future, but we do not currently have funding directly supporting this development. For octave specific files that need to be high in the patch, one option is to place them in the octave module and load it in startup.

 

As for placing MRST on GitHub, MRST is developed in part through contract research. This means that we need to retain dual copyright of the code, as well as making the release process complicated as not all code can be released publicly. Unfortunately, MRST by itself is generally not something we get funding for. If somehow the research funding starts to value software more than it currently does, this could change.

 

Best regards,

Olav

To unsubscribe from this group and stop receiving emails from it, send an email to sintef-mrst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/CAHxzi3XAbtodmMUY3d5X6_gLRfCh0JG3P-t6Un353LwyyUg%2B5Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages