EzDevInfo.com

Petrel

Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python

Communication between Petrel and standalone app packaged as plugin

We (our team) saw that it's possible to include standalone app to a plugin. The app is used to modify Petrel's data in the specific way. See for example these plugins:

http://www.ocean.slb.com/Pages/Product.aspx?category=petrelgeophysics%28Petrel%29&cat=Petrel&pid=PCPT-B1%28Base%29&view=grid

http://www.ocean.slb.com/Pages/Product.aspx?category=petrelgeophysics%28Petrel%29&cat=Petrel&pid=PRPW-B1%28Base%29&view=grid


We want to do the same thing so there are questions:

How the plugin perform editing Petrel's data?

Does Petrel (Ocean) provide any mechanisms for IPC or should we develop our own architecture for communications between managed plugin code and native app process?


Source: (StackOverflow)

PluginPackager in Petrel 2014 - Could not load file or assembly

I'm migrating an Plugin from 2013.1 to 2014.1 Petrel Ocean version. When I try to generate the PIP file through PluginPackager.exe in version 2013.1, its functions normally. However, in version 2014.1 the following problem:

Plug-in DID NOT PASS validation.
        The path of external libraries (e.g. assemblies that are shared between plug-ins) has to be added to the probing paths defined in PluginPackager(-32).exe.config.
        Could not load file or assembly 'PluginModule.dll, Version=2012.6.1.1618,Culture=neutral, PublicKeyToken=f95240d2d568401b' or one of its dependencies. The system can not find the file specified.
        Source: mscorlib

Unlike what happened in version 2013.1, everything indicates that the execution of PluginPackager.exe (2014.1) is doing a pre-validation and loading of all assemblies and their references present in the output directory.

Some plugins I could perform the migration, but adding and removing references like I was blindfolded.

Please, how do I find out references that are missing? Is recorded somewhere LOG? I want to reaffirm that the project compiles normally. The error occurs only in the generation of PIP file.


Source: (StackOverflow)

Advertisements

Prohibited from accessing other seismic data in attribute generator (2011)

We have several seismic attribute generators which require data from seismic volumes which are not among the input volumes.

In Petrel 2010 this worked fine as long as the generator ran in the UI thread.

Petrel 2011 goes to great lengths to prohibit this: First of all, generators no longer run on the main thread at all. Secondly, an IAsyncSubCube fetched in the UI thread throws an InvalidOperationException if accessed from an attribute worker thread. Here's the exception message:

[ArrayBufferAccessorLink] Error accessing array data: [RequestBroker] The current thread, an internal worker thread, does not have permission to initiate new data access. (This situation may be originating from an external computation e.g. an async. seismic attribute computation.) Exception type: class Slb::Salmon::Adt::Exceptions::InsufficientPermissionsException

Is there any way I can make such an access work? (Providing these volumes as regular attribute inputs is not an option.)


Source: (StackOverflow)

Why can't I see my ocean plugin

I am stuck trying to figure why my module is not loading but I don't see any obvious error message. It is a very basic setup (nothing fancy yet) Here is my module definition :

 public class MyModule : IModule
 {
    public void Disintegrate()
    {
    }

    public void Initialize()
    {
        CoreLogger.Info("Starting my module ");
    }

    public void Integrate()
    {
        // Register MyModuleProcess
        MyModuleProcess mymoduleprocessInstance = new MyModuleProcess();
        PetrelSystem.ProcessDiagram.Add(mymoduleprocessInstance , "Plug-ins");

    }

    public void IntegratePresentation()
    {

    }

    public void Dispose()
    {

    }
}

And my process is also very simple :

  class MyModuleProcess: Process
{
    /// <summary>
    /// Constructor.
    /// </summary>
    public MyModuleProcess() : base("MyModuleProcess")
    {
    }

    #region Process overrides

    /// <summary>
    /// Creates the UI of the process.
    /// </summary>
    /// <returns>the UI contol</returns>
    protected override System.Windows.Forms.Control CreateUICore()
    {
        return new MyModuleProcessUI(this);
    }

    /// <summary>
    /// Runs when the process is activated in Petrel.
    /// </summary>
    protected override sealed void OnActivateCore()
    {
        base.OnActivateCore();
    }
    /// <summary>
    /// Runs when the process is deactivated in Petrel.
    /// </summary>
    protected override sealed void OnDeactivateCore()
    {
        base.OnDeactivateCore();
    }

    #endregion
}

and my config file entry is :

<add moduleType="MyModulePlugin.MyModule, MyModulePlugin,Version=1.0.0.0,Culture=neutral, PublicKeyToken=xxxxxxxxxxx"/>

Petrel loads ok, I don't get any error message, but I don't see my process under the plug-ins folder, any ideas?

Thanks


Source: (StackOverflow)

Petrel & Ocean licensing [closed]

I am trying to understand how licensing works for Petrel & Ocean. If a company needs to develop its own custom plugins/modules, does it need to buy explicit Ocean SDK license or just with Petrel runtime license, they can do development? I do understand that Ocean SDK brings along with it help CHMs, few samples plus VS project wizards for Ocean but in my understanding, that's something which is not mandatorily 'needed' to do plugin development as SLB Ocean assemblies are part of Petrel installation. So if one has only Petrel runtime license, can they legally do development, deployment, runtime etc for their plugin?

Or is it that Petrel runtime license cost inherently contains the cost of Ocean SDK license as well? If that's the case, then for a plugin development company to do full plugin lifecycle (development, deployment, testing), can they only buy Ocean SDK license and still be able to do it all without core Petrel license? Assuming tainting of projects is not an issue....

Thanks, M


Source: (StackOverflow)

Starting Petrel 2014 via the command line cannot find licence

With previous versions of Petrel with a basic developer licence, the application could be started from the command line with

petrel.exe -licensePackage Package1

That works just fine for Petrel 2011, 12 and 13. However with Petrel 2014, this approach fails with a message that the licence doesn't exist or has expired.

Starting Petrel without parameters results in a new licence dialogue appearing, which lists the package as Bundle 1. specifying Bundle 1 and Bundle1 after -licensePackage makes no difference when trying to start from the command line though.

Does anyone know what I'm doing wrong or how licence packages are now specified for Petrel 2014?


Source: (StackOverflow)

Convert Index To UI in Ocean

What is the difference between the index in Ocean environment and index in User environment? Why should one use Convert Index To/From UI?


Source: (StackOverflow)

How to generate a surface from other surfaces in Petrel

I have a task to create a new surface in Petrel. I am supposed to generate the average of two surfaces and create a new surface from it (like a mid surface) using Ocean for Petrel software.

Is this possible? and where do i start from? I would also appreciate links to resources that would be helpful to me.


Source: (StackOverflow)

Create new seismic collection Ocean framework

I'm trying to create a new empty seismic collection with the following snippet of code.

Collection is created and added to the input pane, but trying to create NewSeismicCollection throws up a

A plug-in has triggered error: Slb.Ocean.Core.TransactionLockException; Transaction lock failure.

if(seismicProj.SeismicCollectionCount == 0)
{
    PetrelLogger.InfoOutputWindow("No seismic collections in current project");
    using (ITransaction trans2 = DataManager.NewTransaction())
    {
        trans2.Lock(proj);
        Collection col2 = proj.CreateCollection("Collection"); 
    }

    using (ITransaction txn = DataManager.NewTransaction())
    {
        try
        {
            txn.Lock(seismicProj);
            SeismicCollection seisColl = seismicProj.CreateSeismicCollection(
                "NewSeismicCollection");
        }
        catch (InvalidOperationException e)
        {
            PetrelLogger.InfoOutputWindow(e.Message);
        }
        finally
        {
            txn.Commit();
        }
    }
}
else
{
    // do something else
}

Source: (StackOverflow)

How to get coordinates in Petrel 2d Mapwindow through mouse click event?

How to get coordinates dynamically in Petrel 2d Mapwindow through mouse click event?


Source: (StackOverflow)

reading a ptd/zgy file

Is there a way to read the ptd or zgy file outside of Petrel? I have an application that would like to read the 3d seismic data that petrel holds in these formats without opening petrel to export the data into ASCII or something else. Obviously its a better user experience to just read it from my own application.


Source: (StackOverflow)

Refactoring/renaming Ocean Workstep derivative classes

It seems that once an Ocean Workstep derivative class has been released to production (and is used by clients), its name, namespace and assembly name are effectively locked for future updates (in order to ensure backwards compatibility).

When a Petrel project is saved, workstep references are saved as a full type name (namespace, class, strong assembly name) inside the binary file Classes.ptd. During loading, if the exact type name (assembly version seems to be ignored) can't be resolved, the workstep appears as "workstep not available" in the workflow editor.

In other instances of binary serialization we've encountered, Petrel makes use of the SerializationBinder registered with PetrelSystem.ProjectSerializationService - not so for Workstep instances.

Is there any other way to facilitate Workstep class/namespace/assembly renames?

Why is this behaviour so poorly documented (if at all)? Have we misunderstood something?


Source: (StackOverflow)

How to find Index3 of all the fine grid cells associated with a corresponding coarse grid cell?

How to find Index3 of all the fine grid cells associated with a corresponding coarse grid cell?

Terminology used:

Fine Grid : Assume there is a grid with dimensions 10 x 10 x 2

Coarse Grid : This is the coarser version of fine grid which could be of dimensions 5 x 5 x 1.

So for a given grid cell in Coarse Grid, can we find the corresponding fine grid cells associated with it. Is there a ready-made method available or if we need to make our own method, which service should i be using.

For any given Coarse grid cell, we can find the 8 corner points, and now my goal is to find all the fine grid cells which are within the volume made up by those 8 corner points.

PS: Here we are talking about a single grid cell, not entire grid, just to avoid confusion i am mentioning it. This question is for developers who work with Ocean API, so others please bare with me if i couldn't explain the question well for you.Thank you.


Source: (StackOverflow)

Building Ocean 2011 plugins with Visual Studio 11 Beta - issue with InventorNet.dll

I've started testing VS11 beta for building Ocean 2011 plugins. It seems to work very well, and has enough advantages that I'm considering using it for daily work. (We will, of course, not make production builds with VS11 before Schlumberger recommends it.)

However, there is one blocking issue:

Projects which depend on InventorNet.dll fail to build, with the following messages:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1546,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "InventorNet", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

CSC : fatal error CS0008: Unexpected error reading metadata from file 'c:\Program Files\Schlumberger\Petrel 2011\InventorNet.dll' -- 'Index not found.'*

I think the first warning is harmless, as similar warnings are emitted from other dependencies, but I can't get past the error message (in bold). Both probably originate from stricter assembly verification in .NET 4.5 (also in beta) used by MSBuild. Our projects target .NET 3.5.

Does anyone know if the error can be fixed with some setting or other trick, or do we need updated assemblies from Schlumberger? (A Google search yields a few similar cases relating to VS2010, and indicates that the assembly provider does, indeed, need to rebuild the assembly to correct the issue.)

Alternatively, can someone indicate whether the issue will be remedied by Ocean 2012?


Source: (StackOverflow)

Why I can't see my Window on the plug in area?

I'm not able to see my Window in the plug in area. I know that some code must be added in the Integrate section. However i don't know which.

public void Integrate() { }

public void IntegratePresentation() {}

How can I make it visible? Is it really possible?, if not How can I display a window in Petrel?


Source: (StackOverflow)