YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   Home Products | Purchase Support | Downloads  
View in English
View in Japanese
View in
참고
View in Français
View in Italiano
View in 中文(繁體)
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
VX++ Cross-Platform C/C++
Overview
Download
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET

Visual Studio 2010 in VC + + Parallel Construction of tuning.
Increase in multi-processor computer, the speed of an excellent way to build the full use of its parallel processing ability, if you have a Visual Studio 2010 C + + project Document, there are two different types of parallel build configuration for your selection.
 
  Advance Solution

 

New HMI & SCADA Graphics Visualization Source Code Solution is ready!

UCanCode HMI-SCADA Graphics Visualization VC++ Source Code Solution -- Industrial Control \Design and Simulation Integrated Development Platform VC + + source code solution, to use E-XD++ source code visualization component library will save you more than 70% of development time.

Use E-XD++ Enterprise Edition visualization, build your own professional industrial control, simulation platform within hours, more...


What are the parameters can be adjusted?

Construction of the project-level parallelism is controlled by the MSBuild, which is a solution in Visual Studio to set the level (actually Visual Studio is saved for each user settings, and you think may be a little different, you might think Bu Tong solutions have different settings, but the UI would not allow you to do so), by default, Visual Studio select the number of processors your machine as the largest number of concurrent construction projects, shown in Figure 1, you can be the number Enlarge the small to find a parallel build the appropriate value of the fastest, some people may prefer to transfer small to construct points, during the other work can be done.

While MSBuild from Visual Studio to take over some functions, but here's settings and Visual Studio 2008 remains the same.

If you are building C + + or C + + / CLI projects, there is a place you can set the parallel build parameters, CL compiler support / MP parameter, which tells the compiler to use their own in a separate instance of the same build its subset, the default parallel few still use the number of CPU's, but you can specify a value, such as / MP5, pay attention to a little change now happening, so I have to tell you how to find this value, and the MSBuild project file format might look like.

Open the project's "Properties" window, go to "C / C ++"*" General" window, I suggest you choose "All configurations" and "all platforms" in the back you have more options.

As usual, through the dump, you can see the kind of project documents, in the "Solution Explorer" right-click the node, select "Edit."

The following figure shows a part of the project document code.

Here, all types for the "ClCompile" items are automatically own metadata MultiProcessor Compilation, the default value is true, unless explicitly specified a different value.

By the way, MSBuild project is usually a file, which is a metadata sub-elements, the following is an example, note that they are placed in a "ItemGroup" in.

Because this is a meta-data, if it is master, can directly modify each file, you need to use the # import the file to disable / MP, because it does not support / MP, other do not support / MP is characterized by the / Gm, / Gm that incremental compilation, more parameters please refer to http://msdn.microsoft.com/en-us/library / bb385193.aspx.

Back to the multi-processor CL, CL, if you want to explicitly tell the compiler how many parallel execution, Visual Studio can / MP implementation, it appears in the global setting.

Visual Studio through a global property CL_MPCount set, which means that outside the building in Visual Studio will not be affected.

If you choose a more fine-grained value, you can not use the graphical interface to set up, because you can not see the settings for it, then open the project file must be modified directly. In CLICompile project is a totally different meta-data blocks, called "Processor Number", you can set a reasonable from 1 to a value you think, and then / MP after a similar additional value, if not <MultiProcessorCompilation >, it will be ignored.

Figure wavy line appears a little bug, ignore it directly.

How to build the command line?

/ MP set from the project file, so set on the command line function is the same, it is part of the MSBuild, build the command line and build in Visual Studio, the same effect? In Visual Studio, set the global setting does not affect parallel to the command line, you must personally deliver to the msbuild.exe / m parameter, this parameter is optional, if you do not set it to use the number of CPU, but, and Visual Studio out of the box not the same characteristics, in the command line if you do not specify the / m parameter, it will only use one CPU, this problem may be in future versions will be corrected.

If you want to / MP arbitrary values selected, you can set an environment variable, or pass like Visual Studio as an attribute CL_MPCount.

In each project are set / MP is very annoying, how can we improve the setting efficiency?

You may want to use multiple projects / MP, but you do not want each project are set again, Visual Studio solution for these problems is to use the property sheet. First from the "View" menu, open the "property manager", according to the settings that you use the exact location may not be the same, the following is a VC + + project settings location.

Right click on a project, select "Add a new attribute table":

I give it a name called "MultiprocCpp.props", you will see all of the configuration of the project will add the attribute table, right click on it and you will see the same with the project properties window, but this When you edit the attribute table again "Multi-processor Compilation" set to "YES". Close the Properties window, select the property manager property sheet, then click "Save."

Can now be opened in the editor MultiprocCpp.props new document, I look as follows:

Closer look at this project file, you can see the table through an Import tag attributes applied to each configuration, and this point and C + + in the # include very similar.

Now before we can reuse the definition in the project file, so I can select the property manager multiple projects, then right-click, select "Add 现有 attribute table."

OK! All projects are now compiled with the / MP parameter.

In some cases, you may want even more simply, for example, you might want to delete a large number of attributes table, fortunately, MSBuild 4.0 a powerful, complete object model, you can use it, and then write a few lines of code can handle this work.

If you do not want to set through the graphical interface, can manually edit their own, for example, in the VS build their own, we are in the top of each project to set up a property.

Here we define all types of global settings, and import the other set, I will organize a future article describes the method of large build tree.

Not too many good number of parallel

In general, the use of all processors or processor cores End had enough, it may cause slow or even crash the machine, the next chart will show that such an example.

I was in a 8 CPU machine to do this experiment, I put the solution all the projects are all open / MP, and then use msbuild.exe / m to build (I use the command line to build the problem does not occur However, to build in Visual Studio, there will be), can not stop it if the relevant dependent, MSBuild will immediately start eight projects, each CL will be the first to run his own eight instances, so there will be a total of 64 CL running test Our processor core and the disk, do so not only can not increase speed, sculptors make significant performance degradation.

You may hope that one day the system can self-adjust, but if we encounter such a problem, you have to manually adjust. Here are some suggestions:

◆ the global value set smaller

For example, / m: 4 reduced to / m: 3, or using the property sheet will be / MP revised / MP2, if you build there are other issues, if a number of parallel projects, but not parallel the CL, and vice versa However, this time you should be global parameters of the parallel transfer of small build.

◆ for each project and configuration adjustments / MP

Sometimes using the / MP may not be the best way, you can also adjust the configuration, Retail configuration may make the speed more slowly, because the compiler optimization to do more, and for the Retail Open / MP instead of Debug Open / MP may be more meaningful.

◆ access to super custom

In your team, you may have a range of hardware, maybe your developers are using a dual-CPU machines, but the building at night in a Taiwan's Ji Qi Shang for 8 CPU's, both the source of build-time required is the same, you want the speed of the two can not be too slow, in this case, you can use environment variables, or set conditions on the label in MSBuild, MSBuild tag almost all of the conditions can be set.

Here is an example, when the "MultiprocCLCount" has a value greater than zero, you can use this value to enable / MP.

MSBuild starts all environment variables as the initial property value, so I fast machine, I will set the value of MultiprocCLCount 8, and use in my development machine, I set it to 2.

A similar method can also be applied to MSBuild.exe the / m parameter, such as / m:% MultiprocMSBuildCount%,

There are other external conditions in the property may be useful, such as $ (Number_Of_Processors) said the number of logical cores, it comes from an environment variable. $ (MSBuildNodeCount) is passed to the msbuild.exe / m parameter in Visual Studio, this value is through the "Tools" * "option" to set.

Finally, I hope you can use / m and / MP. I hope you can introduce the MSBuild functionality further study, the best configuration yourself first.

Original name: Tuning VC + + build parallelism in VS2010

Powerful, flexible, and easy to use Diagram Components.
Powerful and flexible enough to create diagrams exactly the way you want them to appear. So easy to use that you will be able to prototype your application in just a few minutes.

Feature rich.
With features such as automatic layout, multiple layers, collapsible sub-graphs, snap-to connection points, XML, SVG, and more, E-XD++ Have the power and flexibility you need to create sophisticated diagrams, quickly and easily. Events such as click, double-click, hover, select, rubber-band select, copy, delete, resize and move are supported. Operations such as drag-and-drop, unlimited undo/redo, and clipboard operations are common and complex, and are expected by today's sophisticated users. it full supports importing ArcGis, SVG and DXF File format.

Performance and Scalability.
UCanCode E-XD++ Capable of handling many thousands of nodes and edges, up to hundreds of thousands depending upon the complexity of the nodes you wish to draw and the operations you wish to allow. Our graphical classes are extremely lightweight objects enabling outstanding performance.

Save Time and Money and gain Reliability.
A diagram is worth 1,000 words, and E-XD++ is shipped with more than 500,000 lines of well designed and well tested code! It is used by hundreds of the world's most quality conscious companies. It will saves you thousands of hours of complex coding and years of maintenance.

News:

1 UCanCode Advance E-XD++ CAD Drawing and Printing Solution Source Code Solution for C/C++, .NET V2024 is released!

2 UCanCode Advance E-XD++ HMI & SCADA Source Code Solution for C/C++, .NET V2024 is released!

3 UCanCode Advance E-XD++ GIS SVG Drawing and Printing Solution Source Code Solution for C/C++, .NET V2024 is released!


Contact UCanCode Software

To buy the source code or learn more about with:

 

Ask any questions by MSN: ucancode@hotmail.com Yahoo: ucan_code@yahoo.com


 

Copyright ?1998-2024 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net