Processor dependent math results

We are having issues getting math results (in this case the matrix multiplication) that differ based on the intel processor used. We have seen differences between the core 2 duo T7700, Xeon X5460 and a pentium 4 Xeon based processor. The OS did not seem to make a difference (we tried XP x32, XP x64, Vista x64 and windows 7 x64).
See also the source code with an executable here:
http://www.boschjes.com/LV2009ISSUE
We implemented our own (10x slower) matrix multiplication and that gave the same results on all platform (OS / Processor) combinations.
Did anyone experience similar issues? And did you see it in which math function? As we have only investigated the matrix multiplication function.
These tests were done using labview 2009, f2. We are still considering comparison tests with labview 7.1.1 and labview 8.6.1.
Anyone any ideas?
Oskar 
Solved!
Go to Solution.

Hi Oskar,
LabVIEW 2009 SP1 still uses MKL 10.1 because we find some other issues with MKL 10.2.  So LabVIEW 2009 SP1 does not fix this.
On http://software.intel.com/en-us/intel-mkl,  there is an evaluate option.   You can download the evaluation version of MKL for 30 days usage.
I create a revised matrix multiply VI which divides matrix A into submatrices and multiplies B block by block.
I hope this could fix your problem.  Could you please test it on your Xeon X5460 PC?
Best Regards,
Michael
Attachments:
Matrix Multiply.vi ‏5 KB
A x B (DBL, revised).vi ‏20 KB
A x B (CDB, revised).vi ‏20 KB

Similar Messages

  • Oracle is Processor Dependent?

    hi all
    whether Oracle(10 g) software is processor dependent
    ie for AMD separate software
    for IBM separate etc...

    Sorry to be pedantic, but Oracle software is processor dependent i.e. each particular distribution you download will work on one and only one processor family. The Oracle software is compiled into the machine code of the target processor, which is clearly processor specific. There is no such thing as a Universal Computer Processor Instruction Set, which all processors understand. (Java works at a much higher level than individual processor instructions).
    However, Oracle makes its software available on many platforms i.e. compiles its source code for each of many combinations of operating system and processor. You need to establish the processor and operating system combination you have, and get the distribution of Oracle for that combination.
    So you cannot run a copy of the Sun Solaris SPARC processor distribution of the Oracle software, on a Windows system with Intel processors, or on an IBM AIX system with Power processors. But you can get a copy of the Oracle software ported to each of these systems, that will work on it.
    As suggested, check Metalink for your specific combination of processor and operating system. And be aware that some processors are compatible with others, so AMD processors are Intel compatible. Which means that anything that runs on an Intel Pentium Xeon type processor will run on an AMD processor too.
    John

  • In the closure of Adobe, the process remains active and takes too much resource processor.   Expected results:The process AdobRd32.exe has to be correctly closed.

    In the closure of Adobe, the process remains active and takes too much resource processor.
    Expected results:The process AdobRd32.exe has to be correctly closed.

    I'm not sure on a Mac, but when I have this issue, I simply kill the thread (task-manager/processes/select the process, kill thread)
    I have had no ill effects doing this.
    It is my belief, it is the cloud, since they have a dcc connection, you can disconnect from the cloud, close everything, and the cloud is still connected to you. This is a feature of their update process I suppose.(speculation)  Additionally, I remember reading somewhere this issue was due to applying administrative permission at the instigation of the installation. (which I do allow *some* trusted companies to have this so updates can be applied during my downtime. ) 
    I have never had any overt issues after killing the thread and I have done that many times.
    Hope this helps

  • Process order Release COR1/COR2 depending on result of derivation

    Hi All,
    I have a requirement , where in Transaction COR1/COR2, I enter all the details and go to Release using the FLAG button at the time of doing Release i get one pop-up called Result of Derivation with Error/Warning/Information with either OK/Cancel.
    If i do OK , i can still release the Process order though i have Error in the result of derivation pop-up.
    My requirement is , if there is any error in this result of derivation i should not be allowed to Release the process order .So either the OK button should be disabled or i should display a error message at the time of saying OK ,if there is any error and don't allow release.
    Please guide some enhancements.
    Thanks,
    Rajendra

    With help of workorder_update badi

  • Grideview Bind Event - Place data in column depending on result

    Hi,
    I wonder if anyone can help?
    I need to bind a Gridview to an SQL query (easily done) but when I bind the data, I need the data to appear in a specific column depending on the date field.
    So essentially the Gridview will hold a financial report, and the value can be a past value received or a future value to be processed, this value is held in the same column in the SQL database and there is nothing to determine whether it is past or future
    value other than the date the report was generated on (I didn't design the database)
    So in case that doesn't make sense, when I run a report in July, I need all fields pre-July to appear in Column A but all fields for July to appear in Column B.
    Thanks in advance for any help
    G

    Hello GRJ28,
    GridView can stands for the following:
    1.ASP.NET GridView(System.Web.UI.WebControls.WebControl GridView)
    https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
    2. WPF GridView(System.Windows.Controls.GridView GridView)
    https://msdn.microsoft.com/en-us/library/system.windows.controls.gridview(v=vs.110).aspx
    Can you specific your project?
    If it is ASP.NET project, you have to post on ASP.NET forum as "CoolDadTx " mentioned.
    If it is WPF project, here is
    WPF forum and please consider whether you need a button or something to refresh the data. The two-way binding in WPF seems will not trigger when in your scenario. What's more, since you want your GridView change when data changed, you may need to change
    your property of GridView with that button or any event.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Javascript Confirm box dependent on results of query

    Hi
    I'm using Apex version 3.2.1 and I'm looking for a way to do the following, any help much appreciated:
    A javascript confirm box will appear when the user submits a page if the result of a query returns anything, the query would look something like this....
    SELECT * FROM LINKEDPROJECTS
    WHERE ENV_ID = :P18_ENV_ID
    AND COMP_ID = :P18_COMP_ID
    AND DATE_FROM <= to_date(:P18_DATE_TO, 'DD-MON-YY')
    AND DATE_TO >= to_date(:P18_DATE_FROM, 'DD-MON-YY')
    If it doesnt return any data the page will submit as normal, if it does return any data the confirm box will appear, and the message will also be driven by the result of a query.
    So the message would be something like....
    Project(s) +"Select NAME FROM PROJECTS WHERE ID IN (SELECT PROJ_ID FROM LINKEDPROJECTS WHERE ENV_ID = :P18_ENV_ID+
    +AND COMP_ID = :P18_COMP_ID+
    +AND DATE_FROM <= to_date(:P18_DATE_TO, 'DD-MON-YY')+
    +AND DATE_TO >= to_date(:P18_DATE_FROM, 'DD-MON-YY')"+ have this environment booked on the dates you selected.  Do you want to continue with the booking?
    Selecting yes submits the page, selecting no returns them to the page.

    In a nutshell (and some pseudo code):
    The button URL would look something like "javascript:beforeSubmit()" without quotes and where beforeSubmit is the name of your function.
    The function would look something like:
    function beforeSubmit() {
      var runQuery = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=RunTheQuery',1);
      var result = runQuery.get();
      if (result = 0) {
        if (!apex.confirm('Submit page?")
          return;
      doSubmit('SUBMIT');
    {code}
    The application process, called "RunTheQuery" in this example, is a PL/SQL block that runs the query and return the value using the htp.prn function.
    There are probably errors in the above as I just did this off the top of my head, and you will probably need to tweak it somewhat.  But hopefully you get the idea.
    Mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Select from different tables depending on results

    how to do this in one select
    4 tables
    t3 and t4 are identical in structure but different data
    select id from t1
    If exists in select id from t2
    then select data from t3
    else
    select data from t4
    create table t1 (id number);
    create table t2 (id number);
    create table t3 (col1 varchar2(10), col2 varchar2(10));
    create table t4 (col1 varchar2(10), col2 varchar2(10));
    insert into t1 values(1);
    insert into t1 values(2);
    insert into t2 values(1);
    insert into t3 values('DATA1','DATA2');
    insert into t4 values('DATA3','DATA4');
    commit;
    Ive put values 1 and 2 into t1. as id=1 exists in t2, for that record I want the values from t3 but where id=2, I want the values from t4.
    Possible in one select?   Ive been playing with case statement but not getting anywhere near it

    Having multiple table with same structure looks like a design flaw. What benefit that does bring. So please explain the reason to have 2 table with same structure.
    Said that here are few more ways.
    SQL> select id
      2       , col1
      3       , col2
      4    from (
      5            select t1.id
      6                 , decode(t2.id, null, 'T4', 'T3') table_handle
      7              from t1
      8              left
      9              join t2
    10                on t1.id = t2.id
    11         ) a
    12    join (
    13            select 'T3' table_handle, col1, col2 from t3
    14            union all
    15            select 'T4' table_handle, col1, col2 from t4
    16         ) b
    17      on a.table_handle = b.table_handle;
            ID COL1       COL2
             1 DATA1      DATA2
             2 DATA3      DATA4
    SQL> select id
      2       , col1
      3       , col2
      4    from (
      5            select t1.id
      6                 , dbms_xmlgen.getxmltype('select col1, col2 from ' || decode(t2.id, null, 'T4', 'T3')) xml_data
      7              from t1
      8              left
      9              join t2
    10                on t1.id = t2.id
    11         )
    12       , xmltable
    13         (
    14            '/ROWSET/ROW' passing xml_data
    15            columns col1 varchar2(10) path 'COL1',
    16                    col2 varchar2(10) path 'COL2'
    17         );
            ID COL1       COL2
             1 DATA1      DATA2
             2 DATA3      DATA4
    SQL>

  • How much Number of virtual processors for VMs

    Hi,
    there is lots more information about logical processors, cores and CPU and their definitions, on the internet. also here in this forum.
    In order to make sure i am not lost on internet, it is better to take experts advice like you.
    I have simple question read on:
    I have a Hyper-v cluster host with 4 sockets (4 CPU's) with 6 cores each. so total are 24 cores.
    I can see in hyper-v host Logical processors are 48. (which may be 1 proc = 12 logical processors, so 4 proc x 12 = 48 logical processors)
    now how much virtual processors I can assign to each VM. I know I can assign more logical processor depending on application requirement. and it affects application performance. For each VM, it is showing maximum i can select 48 virtual
    processors.
    is it true I can select any number of virtual processors in each VM? is there any limitation?
    is it that if i have 8 VMs if i set virtual processors to 6 then it will occupy all logical processors (48 in my case) and i  will not be able to allocate logical processor to new VMs?
    is it that if i have 10 VMs and all set to 10 virtual processors? 
    thank you

    Quite honestly - this math really does not matter that much with modern processors. (a combination of speed and core count, and advances in CPU scheduling in the hypervisor)
    You have to have a VM with many vCPU to get into any point of contention. 
    In practice, It is very difficult to over-subscribe your CPU resources without hitting some other bottleneck first.
    Set the vCPU count where it is appropriate for your workload.  That means testing your workload to see where adding additional vCPU to a VM provides no benefit in throughput or speed or capacity for your application.
    A select few applications are written in a way that there is a linear correlation between CPU count and throughput.
    There is an old point about not assigning so many vCPU to a VM that the VM could end up with more than one execution thread on the same processor (core).
    You have 24 cores.  and each has 12 logical processors (execution threads).  So, with zero CPU over-subscription you could have 288 vCPU assigned to any number of VMs.  To expand my point in the previous paragraph - you can easily / safely go
    over this count of 288 - what I am referring to above is an old guideline that would guide you to not assigning more than 288 vCPU to a single VM - ensuring that no single execution thread is trying to service more than one vCPU of the same VM.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • Codec stops the processor from realizing

    Hi, I am trying to build a solution which transmits a webcam stream to two computers simultaneously but with a different overlay on each. The idea being that each computer ends up with the same stream but with different watermarks on top of it. I have created two processors which run as threads and set an overlay codec to the data flow path of each processor. However when I set the codec to the data flow path the processor will not realize and I get the following error.
    Failed to build a graph for the given custom options.
    Failed to realize: com.sun.media.ProcessEngine@c21495
    Cannot build a flow graph with the customized options:
    Unable to transcode format: RGB, 320x240, FrameRate=15.0, Length=230400, 24-
    bit, Masks=3:2:1, PixelStride=3, LineStride=960, Flipped
    to: JPEG/RTP, 320x240, FrameRate=15.0
    outputting to: RAW/RTP
    Unable to add customed codecs:
    videowallfinal.Transmit2$OverlayCodec@8814e9
    Error: Unable to realize com.sun.media.ProcessEngine@c21495
    The processor works fine if I take out the setCodecChain part so I'm guessing it has something to do with the codec. Any help would be much appreciated. I will post the code below.

    Here is the code for the processor, a cloneable dataSource is created from the medialocator (webcam) in another class but I havn't added it becuase it would be too long. Thanks again.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBufferByte;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import java.io.*;
    public class Transmit1 extends Panel implements Runnable{
        // Input MediaLocator
        // Can be a file or http or capture source
        private String ipAddress1;
        private String port1;
        private Processor processor = null;
        private DataSink  rtptransmitter = null;
        private DataSource dataOutput = null;
        private DataSource processorOutput = null;
        public static Player player = null;
        public Transmit1(DataSource ds) {
         this.processorOutput = ds;
            this.ipAddress1 = "192.168.5.3";
         this.port1 = "55556";
        public void start(){
            Thread thread = new Thread(this);
         thread.start();
        public void run() {
            run2();
         * Starts the transmission. Returns null if transmission started ok.
         * Otherwise it returns a string with the reason why the setup failed.
        public synchronized String run2() {
         String result;
         // Create a processor for the specified media locator
         // and program it to output JPEG/RTP
         result = createProcessor();
         if (result != null)
             return result;
            //createTransmitter();
            //createTransmitter2();
            //Create an RTP session to transmit the output of the
         //processor to the specified IP address and port no.
         result = createTransmitter();
         if (result != null) {
             processor.close();
             processor = null;
             return result;
            //result = createTransmitter2();
         //if (result != null) {
         //    processor.close();
         //    processor = null;
         //    return result;
         // Start the transmission
         processor.start();
         return null;
         * Stops the transmission if already started
        public void stop() {
         synchronized (this) {
             if (processor != null) {
              processor.stop();
              processor.close();
              processor = null;
              rtptransmitter.close();
              rtptransmitter = null;
                    //t1.stop();
                    //t2.stop();
                    //rtptransmitter2.close();
              //rtptransmitter2 = null;
        private String createProcessor() {
    //     if (locator == null)
    //         return "Locator is null";
    //     DataSource ds;
    //     try {
    //         ds = Manager.createDataSource(locator);
    //     } catch (Exception e) {
    //         return "Couldn't create DataSource";
            //ds = Manager.createCloneableDataSource(ds);
         //if (ds == null) {
          //   System.err.println("Cannot clone the given DataSource");
          //   System.exit(0);
         // Try to create a processor to handle the input media locator
         try {
             processor = Manager.createProcessor(processorOutput);
         } catch (NoProcessorException npe) {
             return "Couldn't create processor";
         } catch (IOException ioe) {
             return "IOException creating processor";
         // Wait for it to configure
         boolean result = waitForState(processor, Processor.Configured);
         if (result == false)
             return "Couldn't configure processor";
         // Get the tracks from the processor
         TrackControl [] tracks = processor.getTrackControls();
         // Do we have atleast one track?
         if (tracks == null || tracks.length < 1)
             return "Couldn't find tracks in processor";
         boolean programmed = false;
         // Search through the tracks for a video track
            TrackControl videoTrack = null;
         for (int i = 0; i < tracks.length; i++) {
             Format format = tracks.getFormat();
         if ( tracks[i].isEnabled() &&
              format instanceof VideoFormat &&
              !programmed) {
    // Found a video track. Try to program it to output JPEG/RTP
              // Make sure the sizes are multiple of 8's.
              Dimension size = ((VideoFormat)format).getSize();
              float frameRate = ((VideoFormat)format).getFrameRate();
              int w = (size.width % 8 == 0 ? size.width :
                        (int)(size.width / 8) * 8);
              int h = (size.height % 8 == 0 ? size.height :
                        (int)(size.height / 8) * 8);
              VideoFormat jpegFormat = new VideoFormat(VideoFormat.JPEG_RTP,
                                       new Dimension(w, h),
                                       Format.NOT_SPECIFIED,
                                       Format.byteArray,
                                       frameRate);
              tracks[i].setFormat(jpegFormat);
    videoTrack = tracks[i];
              System.err.println("Video transmitted as:");
              System.err.println(" " + jpegFormat);
              // Assume succesful
              programmed = true;
         } else
              tracks[i].setEnabled(false);
         if (!programmed)
         return "Couldn't find video track";
    // Instantiate and set the overlay codec to the data flow path.
         try {
         Codec codec[] = { new OverlayCodec()};
         videoTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e) {
         System.err.println("The process does not support effects.");
         // Set the output content descriptor to RAW_RTP
         ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
         processor.setContentDescriptor(cd);
         // Realize the processor. This will internally create a flow
         // graph and attempt to create an output datasource for JPEG/RTP
         // video frames.
    result = waitForState(processor, Controller.Realized);
         if (result == false)
         return "Couldn't realize processor";
    // Set the JPEG quality to .5.
         setJPEGQuality(processor, 0.5f);
    // Get the output data source of the processor
         dataOutput = processor.getDataOutput();
         return null;
    // Creates an RTP transmit data sink. This is the easiest way to create
    // an RTP transmitter. The other way is to use the RTPSessionManager API.
    // Using an RTP session manager gives you more control if you wish to
    // fine tune your transmission and set other parameters.
    private String createTransmitter() {
         // Create a media locator for the RTP data sink.
         // For example:
         // rtp://129.130.131.132:42050/video
         String rtpURL = "rtp://" + ipAddress1 + ":" + port1 + "/video";
         MediaLocator outputLocator = new MediaLocator(rtpURL);
         // Create a data sink, open it and start transmission. It will wait
         // for the processor to start sending data. So we need to start the
         // output data source of the processor. We also need to start the
         // processor itself, which is done after this method returns.
         try {
         rtptransmitter = Manager.createDataSink(dataOutput, outputLocator);
         rtptransmitter.open();
         rtptransmitter.start();
         dataOutput.start();
         } catch (MediaException me) {
         return "Couldn't create RTP data sink";
         } catch (IOException ioe) {
         return "Couldn't create RTP data sink";
         return null;
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    void setJPEGQuality(Player p, float val) {
         Control cs[] = p.getControls();
         QualityControl qc = null;
         VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);
         // Loop through the controls to find the Quality control for
         // the JPEG encoder.
         for (int i = 0; i < cs.length; i++) {
         if (cs[i] instanceof QualityControl &&
              cs[i] instanceof Owned) {
              Object owner = ((Owned)cs[i]).getOwner();
              // Check to see if the owner is a Codec.
              // Then check for the output format.
              if (owner instanceof Codec) {
              Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
              for (int j = 0; j < fmts.length; j++) {
                   if (fmts[j].matches(jpegFmt)) {
                   qc = (QualityControl)cs[i];
                   qc.setQuality(val);
                   System.err.println("- Setting quality to " + val + " on " + qc);
                   break;
              if (qc != null)
              break;
    * Convenience methods to handle processor's state changes.
    private Integer stateLock = new Integer(0);
    private boolean failed = false;
    Integer getStateLock() {
         return stateLock;
    void setFailed() {
         failed = true;
    private synchronized boolean waitForState(Processor p, int state) {
         p.addControllerListener(new StateListener());
         failed = false;
         // Call the required method on the processor
         if (state == Processor.Configured) {
         p.configure();
         }else if (state ==Processor.Prefetched){
    p.prefetch();
    }else if (state == Processor.Realized) {
         p.realize();
         // Wait until we get an event that confirms the
         // success of the method, or a failure event.
         // See StateListener inner class
         while (p.getState() < state && !failed) {
         synchronized (getStateLock()) {
              try {
              getStateLock().wait();
              } catch (InterruptedException ie) {
              return false;
         if (failed)
         return false;
         else
         return true;
    * Inner Classes
    class StateListener implements ControllerListener {
         public void controllerUpdate(ControllerEvent ce) {
         // If there was an error during configure or
         // realize, the processor will be closed
         if (ce instanceof ControllerClosedEvent)
              setFailed();
         // All controller events, send a notification
         // to the waiting thread in waitForState method.
         if (ce instanceof ControllerEvent) {
              synchronized (getStateLock()) {
              getStateLock().notifyAll();
    public class PreAccessCodec implements Codec {
    * Callback to access individual video frames.
         void accessFrame(Buffer frame) {
         // For demo, we'll just print out the frame #, time &
         // data length.
         long t = (long)(frame.getTimeStamp()/10000000f);
         System.err.println("Pre: frame #: " + frame.getSequenceNumber() +
                   ", time: " + ((float)t)/100f +
                   ", len: " + frame.getLength());
         * The code for a pass through codec.
         // We'll advertize as supporting all video formats.
         protected Format supportedIns[] = new Format [] {
         new VideoFormat(null)
         // We'll advertize as supporting all video formats.
         protected Format supportedOuts[] = new Format [] {
         new VideoFormat(null)
         Format input = null, output = null;
         public String getName() {
         return "Pre-Access Codec";
         // No op.
    public void open() {
         // No op.
         public void close() {
         // No op.
         public void reset() {
         public Format [] getSupportedInputFormats() {
         return supportedIns;
         public Format [] getSupportedOutputFormats(Format in) {
         if (in == null)
              return supportedOuts;
         else {
              // If an input format is given, we use that input format
              // as the output since we are not modifying the bit stream
              // at all.
              Format outs[] = new Format[1];
              outs[0] = in;
              return outs;
         public Format setInputFormat(Format format) {
         input = format;
         return input;
         public Format setOutputFormat(Format format) {
         output = format;
         return output;
         public int process(Buffer in, Buffer out) {
         // This is the "Callback" to access individual frames.
         accessFrame(in);
         // Swap the data between the input & output.
         Object data = in.getData();
         in.setData(out.getData());
         out.setData(data);
         // Copy the input attributes to the output
         out.setFormat(in.getFormat());
         out.setLength(in.getLength());
         out.setOffset(in.getOffset());
         return BUFFER_PROCESSED_OK;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    public class PostAccessCodec extends PreAccessCodec {
         // We'll advertize as supporting all video formats.
         public PostAccessCodec() {
         supportedIns = new Format [] {
              new RGBFormat()
    * Callback to access individual video frames.
         void accessFrame(Buffer frame) {
         // For demo, we'll just print out the frame #, time &
         // data length.
         long t = (long)(frame.getTimeStamp()/10000000f);
         System.err.println("Post: frame #: " + frame.getSequenceNumber() +
                   ", time: " + ((float)t)/100f +
                   ", len: " + frame.getLength());
         public String getName() {
         return "Post-Access Codec";
    public class OverlayCodec extends PostAccessCodec {
    BufferedImage work;
    byte[] workData;
    int width;
    int height;
    int dataLen;
    // input format set to match BufferedImage format
    RGBFormat supportedRGB = new RGBFormat(null, // size
    Format.NOT_SPECIFIED, // maxDataLength
    Format.byteArray, // dataType
    Format.NOT_SPECIFIED, // frameRate
    24, // bitsPerPixel
    3, 2, 1, // red/green/blue masks
    3, // pixelStride
    Format.NOT_SPECIFIED, // lineStride
    Format.FALSE, // flipped
    Format.NOT_SPECIFIED); // endian
    public OverlayCodec() {
    // force specific input format
    supportedIns = new Format [] {
    supportedRGB
    public Format setInputFormat(Format format) {
    if ((format != null) && (format instanceof RGBFormat) &&
    format.matches(supportedRGB)) {
    // set up working image if valid type
    // (it should be since we insisted!)
    Dimension size = ((RGBFormat)format).getSize();
    width = size.width;
    height = size.height;
    dataLen = width * height * 3;
    if ((dataLen > 0) &&
    ((work == null) || (work.getWidth() != width) || (work.getHeight() != height))) {
    // working image - same 3-byte format as buffer
    work = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
    // reference to pixel data
    workData = ((DataBufferByte) work.getRaster().getDataBuffer()).getData();
    return super.setInputFormat(format);
    void drawGraphics(Graphics2D g) {
    // replace or override to draw on frame contents
    g.clearRect(0, 0, 100, 100);
    //g.clearRect(176, 120, 176, 120);
    void accessFrame(Buffer frame) {
    if ((work != null) && (frame.getData().getClass() == byte[].class)) {
    // Create new graphics context for image
    // (could be created only once if drawGraphics manages state)
    Graphics2D g = work.createGraphics();
    // transfer buffer contents into image
    byte[] bufData = (byte[]) frame.getData();
    int n = Math.min(dataLen, bufData.length);
    System.arraycopy(bufData, 0, workData, 0, n);
    // perform desired graphics operations
    drawGraphics(g);
    // copy changed image data back to buffer
    System.arraycopy(workData, 0, bufData, 0, n);
    g.dispose();
    super.accessFrame(frame); // if you care
    public String getName() {
    return "Frame Overlay Codec";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

  • Inconsistent Floating Point Math and NaNs on Windows Laptops?

    All -
    I am seeing some very strange inconsistent floating point calculations on Windows Laptops, and I am wondering if anyone has any ideas. Read on, as (to me!) it's very interesting....
    I have attached a segment of our code, along with some sample output. Looking at the code and the output, it seems like it's totally impossible.
    With supposedly non-NaN and non-infinite double values, I am seeing unrepeatable and inconsistent math - the below example only illustrates one such case where we're seeing this behavior.
    If you look at the code below, you will see that I do things like:
    double rhoYo = ...  // some math
    double rho = ...  // exact same mathStrangely enough, I might get rhoYo = 1.51231231 etc and rho = NaN.
    If I reverse those lines (vertically), then again, rhoYo comes out good and rho comes out NaN; however, this is unpredictable and inconsistent. If I project a source point, get a destination point with NaNs as a result, and project the source again, the second destination point may be just fine. Matter of fact, i can put a loop in the code such as:
          double rho = Double.NaN;
          for( int i = 0; i < 10; i++ )
            rho = my_earthRad * my_F / Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n);
            if( ! Double.isNaN( rho ) )
              break;
            System.out.println("NaN'ed rho");
          }and rho will eventually become non-NaN (random # of iterations)!!
    How's that possible? Our code might be tromping on memory somewhere, but this sure seems crazy to me, especially considering that
    we're only using local variables. Anyone know of floating point errors on Windows Laptops?
    With the exact same codebase, this behavior ONLY happens on Windows Laptops, including brand new Dells, old Dells, IBM, Intel and AMD chips (I've tried several ;-). It does NOT happen on Mac or Linux, including the Linux side of a Linux/Windows dual-boot (where it does happen with the Windows side). Even more strangely, it does NOT happen with Windows desktops. I have tried several 1.5.x JVMs, webstart vs no webstart, etc, to no avail. Always and only on Windows Laptops.
    Please help.... ;-) and thanks in advance.
    Sample code:
    public class Projection
      protected Point2D.Double _project(Point2D.Double srcPt, Point2D.Double dstPt) {
        final double my_degToRad = Math.PI / 180.0;
        final double my_originLon = -95.0;
        final double my_originLonRad = my_originLon * my_degToRad;
        final double my_originLat = 25.0;
        final double my_originLatRad = my_originLat * my_degToRad;;
        final double my_stdLat1 = 25.0;
        final double my_stdLat1Rad = my_stdLat1 * my_degToRad;
        final double my_earthRad = 6371.2;
        final double my_n = Math.sin( my_stdLat1Rad );
        final double my_F = Math.cos( my_stdLat1Rad ) * Math.pow( Math.tan( Math.PI / 4.0 + my_stdLat1Rad / 2.0 ), my_n ) / my_n;
        final double my_rhoZero = my_earthRad * my_F / Math.pow( Math.tan( Math.PI / 4.0 + my_originLatRad / 2.0 ), my_n );
        if ( Double.isNaN( my_n ) || Double.isNaN( my_F ) || Double.isNaN( my_rhoZero )) {
          return new Point2D.Double(Double.NaN, Double.NaN);
        if( Double.isNaN( srcPt.x ) || Double.isNaN( srcPt.y ) )
            System.out.println("======= _project received a srcPt with NaNs. Returning NaN point.");
            Point2D.Double nanPoint = new Point2D.Double();
            nanPoint.x = nanPoint.y = Double.NaN;
            return nanPoint;
        if( Double.isInfinite( srcPt.x ) || Double.isInfinite( srcPt.y ) )
            System.out.println("======= _project received a srcPt with isInfinite. Returning NaN point.");
            Point2D.Double nanPoint = new Point2D.Double();
            nanPoint.x = nanPoint.y = Double.NaN;
            return nanPoint;
        //  Inputs are lon, lat degrees.
        final double lonRad = srcPt.x * my_degToRad;
        final double latRad = srcPt.y * my_degToRad;
        final double theta = my_n * (lonRad - my_originLonRad);
        // One Std lat -- tangential cone.
        final double rhoYo = my_earthRad * my_F / Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n);
        final double rho   = my_earthRad * my_F / Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n);
        // Computes kilometers in lambert space.
        dstPt.x = rho * Math.sin(theta);
        dstPt.y = my_rhoZero - (rho * Math.cos(theta));
        // WANK - Here's the problem!  These values shouldnt be NaN!
        if( Double.isNaN( dstPt.x ) || Double.isNaN( dstPt.y ) )
            System.out.println("======= A _projected dstPt has NaNs. Dumping...vvvvvvvvvvvvvvvvvvvvvvvvvvvv");
            if( Double.isNaN( dstPt.x ) )
                System.out.println("======= dstPt.x is NaN");
            if( Double.isNaN( dstPt.y ) )
                System.out.println("======= dstPt.y is NaN");
            System.out.println("======= my_stdLat1 = " + my_stdLat1 );
            System.out.println("======= my_n = " + my_n );
            System.out.println("======= my_originLonRad = " + my_originLonRad );
            System.out.println("======= my_F = " + my_F );
            System.out.println("======= my_earthRad = " + my_earthRad );
            System.out.println("======= lonRad = " + lonRad );
            System.out.println("======= latRad = " + latRad );
            System.out.println("======= theta = " + theta );
            System.out.println("======= Math.tan(Math.PI/4.0 + latRad/2.0) = " + Math.tan(Math.PI/4.0 + latRad/2.0) );
            System.out.println("======= Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n) = " + Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n) );
            System.out.println("======= rho = " + rho );
            System.out.println("======= rhoYo = " + rhoYo );
            System.out.println("======= Math.sin(theta) = " + Math.sin(theta) );
            System.out.println("======= dstPt.x = " + dstPt.x );
            System.out.println("======= Math.cos(theta) = " + Math.cos(theta) );
            System.out.println("======= my_rhoZero = " + my_rhoZero );
            System.out.println("======= (rhoYo * Math.cos(theta)) = " + (rho * Math.cos(theta)) );
            System.out.println("======= my_rhoZero - (rhoYo * Math.cos(theta)) = " + (my_rhoZero - (rho * Math.cos(theta)) ));
            System.out.println("======= dstPt.y = " + dstPt.y );
            System.out.println("======= A _projected dstPt had NaNs. Done dumping. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
        return dstPt;
    }And here's the sample output:
    ======= A _projected dstPt has NaNs. Dumping...vvvvvvvvvvvvvvvvvvvvvvvvvvvv
    ======= dstPt.x is NaN
    ======= dstPt.y is NaN
    ======= my_stdLat1 = 25.0
    ======= my_n = 0.42261826174069944
    ======= my_originLonRad = -1.6580627893946132
    ======= my_F = 2.5946660025799146
    ======= my_earthRad = 6371.2
    ======= lonRad = -2.7564670759053924
    ======= latRad = 0.3730758324037379
    ======= theta = -0.4642057102537187
    ======= Math.tan(Math.PI/4.0 + latRad/2.0) = 1.4652768116539785
    ======= Math.pow(Math.tan(Math.PI/4.0 + latRad/2.0), my_n) = 1.175224090766834
    ======= rho = NaN
    ======= rhoYo = 14066.369269924155
    ======= Math.sin(theta) = -0.44771270676160557
    ======= dstPt.x = NaN
    ======= Math.cos(theta) = 0.8941774612481554
    ======= my_rhoZero = 13663.082491950498
    ======= (rhoYo * Math.cos(theta)) = NaN
    ======= my_rhoZero - (rhoYo * Math.cos(theta)) = NaN
    ======= dstPt.y = NaN
    ======= A _projected dstPt had NaNs. Done dumping. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    HI JSchell (and others?) -
    I have created a simple example attached below, that when run repeatedly, does indeed generate spurious NaNs. I have made it as simple as possible. In the code, I use my own lon/lat binary data file, though I am sure any will do. Let me know if anyone wants that file.
    So the deal is that (with my data at least) this program should never generate NaN results. And if one runs it 25432 (eg: random #) times, it wont, but then the 25433th time, it will create NaNs, etc. ie: inconsistent NaN math results.
    As I said before, I have run this on old and new Dell laptops under Windows XP, using java 1.5_02, 1.5_04 and 1.5_08. The latest run was on a brand new Dell with a Intel Core Duo T2600 processor, running XP. If this is a result of the Pentium bug, one would think that would be fixed by now. I have NOT yet tested on AMD, though I will do that this afternoon.
    Remember, this ONLY happens with Windows Laptops.
    Any ideas anyone? Thanks in advance ;-)
    Here's the code that produces spurious NaNs:
    import java.awt.geom.Point2D;
    import java.io.DataInputStream;
    import java.io.EOFException;
    import java.io.File;
    import java.io.FileInputStream;
    public class FloatingPointTest2 implements Runnable
      private static final int NUM_ITERATIONS = 100000;
      private double _degToRad = Math.PI / 180.0;
      private double _originLon = -95.0;
      private double _originLat = 25.0;
      private double _originLonRad = _originLon * _degToRad;
      private double _originLatRad = _originLat * _degToRad;;
      private double _stdLat1 = 25.0;
      private double _stdLat1Rad = _stdLat1 * _degToRad;
      private double _earthRad = 6371.2;
      private double _n = _n = Math.sin( _stdLat1Rad );
      private double _F = Math.cos( _stdLat1Rad ) * Math.pow( Math.tan( Math.PI / 4.0 + _stdLat1Rad / 2.0 ), _n ) / _n;
      private double _rhoZero = _earthRad * _F / Math.pow( Math.tan( Math.PI / 4.0 + _originLatRad / 2.0 ), _n );
      private Point2D.Double _project( Point2D.Double srcPt, Point2D.Double dstPt )
        if( Double.isNaN( srcPt.x ) || Double.isNaN( srcPt.y ) )
          System.out.println( "FloatingPointTest2: received a NaN srcPt.  Skipping." );
          return new Point2D.Double( Double.NaN, Double.NaN );
        //  Inputs are lon, lat degrees.
        final double lonRad = srcPt.x * _degToRad;
        final double latRad = srcPt.y * _degToRad;
        final double theta = _n * ( lonRad - _originLonRad );
        double rho = _earthRad * _F / Math.pow( Math.tan( Math.PI / 4.0 + latRad / 2.0 ), _n );
        dstPt.x = rho * Math.sin( theta );
        dstPt.y = _rhoZero - ( rho * Math.cos( theta ) );
        return dstPt;
      public void doTest()
        DataInputStream instream = null;
        int thisRunNaNCount = 0;
        Point2D.Double tempPt = new Point2D.Double();
        Point2D.Double dstPt = new Point2D.Double();
        try
          instream = new DataInputStream( new FileInputStream( System.getProperty(
            "user.home" ) + File.separatorChar + "lonLatBinaryData.bin" ) );
          try
            while( true )
              double lon = instream.readDouble();
              double lat = instream.readDouble();
              if( Double.isNaN( lon ) || Double.isNaN( lat ) )
                continue;
              tempPt.x = lon;
              tempPt.y = lat;
              dstPt = _project( tempPt, dstPt );
              if( Double.isNaN( dstPt.x ) || Double.isNaN( dstPt.y ) )
                thisRunNaNCount++;
          catch( EOFException e )
    //        System.out.println( "End of file" );
          if( thisRunNaNCount > 0 )
            System.out.println( "thisRunNaNCount = " + thisRunNaNCount );
          instream.close();
        catch( Exception e )
          e.printStackTrace();
          System.exit( 1 );
      public void run()
        doTest();
      public static void main( String args[] )
        System.out.println( "Executing FloatingPointTest2." );
        for( int i = 0; i < NUM_ITERATIONS; i++ )
          FloatingPointTest2 test = new FloatingPointTest2();
          test.doTest();
    }

  • Windows 2008 r2 guests blue screen on Windows 2012 R2 Hyper-V Cluster with e5 2670-v2 processors

    Hello all,
    We have a new hyper-v infrastructure deployed in two brand new Dell R720 Servers with 384GB of Memory and dual Intel e5 2670-v2 processors. This infrastructure is replacing an existing hyper-v 2008 R2 and all the guests are being migrated to this new cluster.
    The issue we are seeing is our 2008 r2 guests blue screening ocasionally with 0x0000001a,0x0000004e or 0x00000050 bugchecks.
    All this guests are configured with dynamic memory and with the integration components up to date. These same guests were running with no problems in the hyper-v 2008r2 cluster.
    When searching i found this article from vmware that pretty much describes what we are facing:
    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2073791
    Are you aware of the same problem with this kindd of hardware on windows 2012 r2 hyper-v?
    Thanks!
    Nuno Carvalho

    Meanwhile i found this May 2014 update on the intel specification of the CPU we are using:
    CA135 Incorrect Page Translation when EPT is enabled
    Problem:
    If EPT (Extended Page Tables) is enabled, then a complex sequence of internal processor events may result in unexpected page faults or use of incorrect page translations.
    Implication:
    Due to this erratum a guest may crash or experience unpredictable system behavior.
    Workaround:
    It is possible for the BIOS to contain a workaround for this erratum.
    Status:
    For the affected steppings, see the
    Summary Tables of Changes.
    This affects VMware as of the today update of the article i referenced in the first post, what about hyper-v?
    http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e5-v2-spec-update.pdf
    Nuno Carvalho

  • Default Sold To Party and Message Processor on a Message

    Hi All,
    I have 2 questions on here regarding Service Desk.
    I have set a BP as Sold To Party in tcode BP and maintain its address. In IB52 transaction I already set the respective BP as sold party to all satellite system. Somehow when I create the message, and open the created message from service desk, the Sold To party field is still blank. What did I miss here ?
    Second, with PFAC_RESPO I've assigned an users as default support team for based on message component. But this setting only for set the default Support Team in the message, not the message processor. How do I set the default message processor ?
    Thanks & Regards

    hi,
    this is depending on what you want to set-up (every company has his own strategy)
    in big company you want to assign the support team only and let the agents pick-up message for their team, in smaller you might want to assign the processor also
    if you want to assign support team based in IBASE component you need to continue like you need
    but you need to add the SLFN0003 in your IBASE profile
    1. For doing this you need to go in CRM customizing by following this path
    Master data
    Installed base
    Assign partner determination procedure
    go and check the line for the IBASE category 01, in standard should be 0000032, you need to define your own profile (keeping the standard like it is)
    2. Go now in partner profile change follwoing this path
    Basic function
    Partner processing
    Define partner determination procedure ZIBASEXX (name you want) by copy of 000032
    Add the support team SLFN0003
    3. and go back to change the IBASE category 01 changing 0000032 into ZIBASEXX
    that's it !
    If you want to let the processor depend on IBASE, you can do the same or usually you define your own action for this
    I hope it helps
    br Xavier

  • How can we define no of processors for a server

    How can we define no of processors for a server.on what factor that No of Processors depends? Is it based on
    1.Application type,
    2.No of transaction perday,
    3.No Of users connected simulatneoulsy

    You can also add the quality of the application to your list. A poorly writtern application cangobble up resources faster than you can spend.
    Also, the size of the database. Bigger size means increased memory, disk, and CPU.

  • Processor up grade

    I want to upgrade my processor from a intell G630 2.70 GHz to an i3 duel core.
    MY motherboard is a H- Cupertino2-H61-uA TX {Cupertino2}
    What part number i3 duel core processor do i need and what is the max on GHz i can go?
                                                                                                                                       Thanks paul
    Please feel free to supply answer to my email address [Personal Information Removed]
    This question was solved.
    View Solution.

    The following Intel CPUs are supported on your computer;
    Socket type: LGA 1155
    TDP: 35W up to 95W (processor dependent)
    Core i3-2xxx/T dual core
    Core i3-2xxx dual core
    Core i5-2xxx quad core
    Core i7-2xxx quad core
    Core G6xx/T dual core
    Please see 2nd Generation Intel® Core™ i3 Processors for model numbers and processor clock speeds.
    If you have any further questions, please don't hesitate to ask.
    Please click the white KUDOS star to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • Newer iMac with better processor, but lower GHz?

    I am thinking of buying an iMac. The new iMacs have i5 and i7 processors, both between 2.7 and 2.8 GHz. I have done a little research on youtube and wikipedia and i found out that the older imac (with an i3), had way more GHz (over 3.1). Why does the newer one have a newer/better processor but a lower/slower GHz?
    Could somebody explain that to me?
    Thanks in advance.

    Clock cycles for processes have become less advantageous than processing over multiple cores since Apple started using G4s.  When it switched to Intel processors, it focussed more and more on cores, as it had to maintain the processor temperature cool enough for notebooks, while speed gaining speed through other means.  Very few programs these days are completely processor dependent.  Many are GPU dependent, RAM dependent, hard drive speed dependent, and disk space dependent.  If upgrading to a newer machine means compatibility with software that you don't already have, but need, or software that is able to take advantage of a newer machine better, then by all means get it.  Otherwise all you  might be buying into is longer life of a machine under warranty once AppleCare is bought.  And don't forget, no Mac can run an older Mac OS X than shipped with it.

Maybe you are looking for