Forum: User Requirements Not Logged In (login)
Show subscribers

This is a discussion of the defined capabilities of the G4 toolkit.

The email gateway for this forum is: userreqs-g4hn@slac.stanford.edu


Inline Depth:
 0 0
 1 1
Add message: (add)

Question Parallelism in G4 on video-cards  by Dmitry Naumov <Dmitry Naumov>,   Sep 17, 22:45
Dear G4 developers and users. I would like to learn from you if anyone tried to run g4 simulations in parallel jobs using processors of video-cards? The point is that such kind of unusual use of video-cards becomes very powerfull in recent years and people get factors tens-hundreds of performance increase using this approach (see http://www.nvidia.com/object/cuda_home.html#)

I would like to know first of all from the developers if G4 design allows such a splitting, and which parts of g4 could be used for parallel jobs and where it is better not to spend time on this kind of developments.

Some of my colleagues are involved in doing physics simulation using nvidia cards parallelism and they volunteer to work in this direction for g4 if this was not done already, and if g4 design is suitable for this. Thank you, Dmitry

None Re: Parallelism in G4 on video-cards  by Paul Nicholas Colin Gloster <Paul Nicholas Colin Gloster>,   Sep 18, 02:24
Re: Question Parallelism in G4 on video-cards (Dmitry Naumov)
On September 17th, 2009, Dmitry Naumov submitted:

|-----------------------------------------------------------------------|
|"Dear G4 developers and users. I would like to learn from you if anyone|
|tried to run g4 simulations in parallel jobs using processors of       |
|video-cards? The point is that such kind of unusual use of video-cards |
|becomes very powerfull in recent years and people get factors          |
|tens-hundreds of performance increase using this approach (see         |
|http://www.nvidia.com/object/cuda_home.html# )                         |
|                                                                       |
|I would like to know first of all from the developers if G4 design     |
|allows such a splitting, and which parts of g4 could be used for       |
|parallel jobs and where it is better not to spend time on this kind of |
|developments.                                                          |
|                                                                       |
|Some of my colleagues are involved in doing physics simulation using   |
|nvidia cards parallelism and they volunteer to work in this direction  |
|for g4 if this was not done already, and if g4 design is suitable for  |
|this. Thank you, Dmitry"                                               |
|-----------------------------------------------------------------------|

Dear Dmitry Naumov,

I am not aware of an attempt to utilize G.P.U.s with Geant. Your
colleagues would be welcome to try.

I appreciate the motivation for requesting information regarding which
parts of Geant to consider for parallelism and which parts to dismiss,
but given the misinformation re the architecture of Geant4 in
publications, it would be beneficial for your colleagues to analyze
the codebase for themselves.

I wish this project success.

Yours sincerely,
Colin Paul Gloster
None Re: Parallelism in G4 on video-cards  by Joseph Perl <Joseph Perl>,   Sep 18, 15:00
Re: None Re: Parallelism in G4 on video-cards (Paul Nicholas Colin Gloster)
There was a short thread on this at:

http://hypernews.slac.stanford.edu/HyperNews/geant4/get/installconfig/1142.html

Lucas Clemente there said he was going to do research in this area.

There was an abstract on this at last year's ASTRO conference: http://astro2008.abstractsnet.com/pdfs/3021.pdf

If you google Geant4 and GPU you will find some others moving in this direction.

None Simulation requirement  by Davinder Siwal <Davinder Siwal>,   20 Apr, 2009
Hello experts

i am using geant4 to simulate the detector pulses and trying to write a very simple programme of 1"X1"x1" of Ge crystal so i have contructes the file test1DetectorConstruction.cc,test1PrimaryGeneratorAction.cc and test1PhysicsList.cc and their corresponding header files now it runs without error but when i am running the executable which is "test1" it is showing the segmentation fault so what else should i have to create.....

did anybody know the answer

Question About mott scattering  by LOKI <LOKI>,   03 Jul, 2008
Hi I'm a newcomer ^_^. Can Geant4 be used to simulate the mott scattering process? In the polarization related physical processes, only multiple scattering is available in elastic scattering. It's said the comgeant can simulate the mott scattering, but i can't get the source code. If Geant4 can't work the mott scattering very well, can anyone give me some advise in mott scattering simulation?

Thanks in advance! :-)

None Geant4 in a MFC application?  Keywords: MFC
by Markus Wagner <markus.wagner@tu-bs.de>,   27 May, 2008

Hi!

Has anobody experience in using geant4 in a MFC application? I was able to compile and run most of the geant4 examples in Visual Studio 2005 (not over cygwin, directly as project in Visual Studio). But these examples are all configured as console applications. I tried to extend a simple MFC programm with the geant4 capabilities. Compilation was done with no errors but the program crashes. always in:

inline void __CLR_OR_THIS_CALL _Container_base::_Orphan_all() const
	{	// orphan all iterators
	_Lockit _Lock(_LOCK_DEBUG);
	if (_Myfirstiter != _IGNORE_MYITERLIST)
		{
		for (_Iterator_base **_Pnext = (_Iterator_base **)&_Myfirstiter;
			*_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter)
-->			(*_Pnext)->_Mycont = 0;
		*(_Iterator_base **)&_Myfirstiter = 0;
		}
	}

Any ideas or experiences?

Thanks in advance

Markus

None Geant4 build system  by Benjamin Bannier <bbannier@bnl.gov>,   09 Apr, 2008
Hello,

we are currently trying to package Geant4 for the gentoo distribution
(http://www.gentoo.org). Since gentoo allows/requires users to compile
tailored versions of any software used, the role of the our package
system is to provide instructions on how to build software with various
features and optimizations enabled.

We are having a quite hard time figuring out how to write these fully 
automated scripts with the ./Configure provided with the Geant4 release.

Since I did miss the item 'Improve build experience' on the planned
developments list, I was wondering if the Geant4 developers have any
plans move to a different buildsystem (like e.g. autoconf available
on many platforms) or at least release more information on how
./Configure is generated and can be regenerated by users -- i.e. the
input files and software used.

But of course everybody, not just distributors and gentoo users, would
love Geant4 to use a more standard build system.


Benjamin Bannier
Feedback command based scoring  by ludovic Ferrer <ludovic Ferrer>,   03 Mar, 2008

Hi, you asked user's feeling about your new scoring approach based on command. I have just tried it with Gate ... That's pretty cool. I have just test on a simple example. But, I get very easily a deposited dose map ...great great. some questions : Is it possible via scorer to flag particules passing threw a particular volume ? is t possible to extend scoring geometry to fit cylinder or sphere ? that could be convenient in some cases...

Once again ... great job

None RE: command based scoring  by Makoto Asai <Makoto Asai>,   03 Mar, 2008
Re: Feedback command based scoring (ludovic Ferrer)
Thanks for your feed back.

> Is it possible via scorer to flag particules passing
>  threw a particular volume ?

You may define a scoring mesh as such that a surface
of the mesh is the same as the volume you want to score 
the flux. Then, use one of the flux scorer we offer with a
particle filter.

>  is t possible to extend
> scoring geometry to fit cylinder or sphere ? 

Cylindrical mesh is under development. It should be 
released at the next public release, we expect. Spherical
mesh takes a bit more time, since we currently do not
have replica functionality for sphere. 

Makoto

> -----Original Message-----
> From: ludovic Ferrer [mailto:ferrer.ludovic@neuf.fr] 
> Sent: Monday, March 03, 2008 3:36 PM
> To: publichypernews
> Subject: command based scoring
> 
> *** Discussion title: User Requirements
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/userreqs/31"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi, you asked user's feeling about your new scoring approach based on
> command. I have just tried it with Gate ... That's pretty cool. I have
> just test on a simple example. But, I get very easily a deposited dose
> map ...great great. some questions : Is it possible via scorer to flag
> particules passing threw a particular volume ? is t possible to extend
> scoring geometry to fit cylinder or sphere ? that could be 
> convenient in
> some cases...
> 
> Once again ... great job
> 

None RE: command based scoring  by ludovic Ferrer <ludovic Ferrer>,   04 Mar, 2008
Re: None RE: command based scoring (Makoto Asai)
Thanks Makoto,
Just to be sure I have understood ...
I create a mesh box placed at the exact location of my volume of interest. Then, I define a flux scorer
for the particule I am interested in via filters. Is that right ? 
At present time, via command, there is no way to "attach" a mesh box to a logical or physical volume ?


But, let's take an example :
I have a plate in lead with hundred holes (air). I want to know how many photons are passing through my plate
without interation. If I use your approach, I will score all photons passing through the faces of the mesh.
So photons  that pass through the holes will also be scored ... which is not the result I expected ...

what's your feeling ?

Cheers,
Ludovic
None RE: command based scoring  by Makoto Asai <Makoto Asai>,   04 Mar, 2008
Re: None RE: command based scoring (ludovic Ferrer)
Let's assume the lead plate is thick enough so that you don't 
worry about photons passing through "real" lead plate. Then, 
use the passage scorer. And, yes, use the particle filter as 
you wrote.

Makoto

> -----Original Message-----
> From: ferrer.ludovic@neuf.fr [mailto:ferrer.ludovic@neuf.fr] 
> Sent: Tuesday, March 04, 2008 12:16 PM
> To: publichypernews
> Subject: RE: command based scoring
> 
> *** Discussion title: User Requirements
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/userreqs/31/1/1"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Thanks Makoto,
> Just to be sure I have understood ...
> I create a mesh box placed at the exact location of my volume 
> of interest. Then, I define a flux scorer
> for the particule I am interested in via filters. Is that right ? 
> At present time, via command, there is no way to "attach" a 
> mesh box to a logical or physical volume ?
> 
> But, let's take an example :
> I have a plate in lead with hundred holes (air). I want to 
> know how many photons are passing through my plate
> without interation. If I use your approach, I will score all 
> photons passing through the faces of the mesh.
> So photons  that pass through the holes will also be scored 
> ... which is not the result I expected ...
> 
> what's your feeling ?
> 
> Cheers,
> Ludovic
> 
> 

None Convergence between "standard" and "Low Energy"  Keywords: physics list
by Alain Ferragut <Alain Ferragut>,   03 Jan, 2007

Hello, Now that the physics lists are integrated in the G4 source tree, I have a dream which seems more achievable (I hope !) It would be a great opportunity to allow the user to select either "standard Em" or "Low Energy Em", in a physics list messenger.By "low energy", I mean all the gamma, e+,e-, physics as it is now in the low energy modules, but also low energy ionisation process for hadrons (and ions). By the way, it would be also nice to include radioactive physics. This would be a very powerful tool for a wide range of various physics applications. Best wishes for everyone,

Alain

Question add to Geant4 HyperNews Forums ability to download   by Victor Golovko <vgolovko@cern.ch>,   05 Oct, 2006

Hi,

Is it possible to ? Sometimes it is much easier to show your problem on a graph than to explain it by text message.

Best wishes,

Victor.

October 5, 2006

None Re: add to Geant4 HyperNews Forums ability to download   by Makoto Asai <Makoto Asai>,   05 Oct, 2006
Re: Question add to Geant4 HyperNews Forums ability to download (Victor Golovko)
You can post a URL of your graphical object. Please upload it to your
own Web server and post the URL.
Question unit testing  Keywords: unit testing
by ludovic Ferrer <ludovic Ferrer>,   16 Dec, 2005

Hi all, I previously asked my question in "installation forum" wiithout any answers. Maybe it was not the right place to ask for. So I make a try here ;-). In the last geant4 release, I saw some empty directories relative to debug testing, suggesting that G4 development team is using some unit testing framework. I would like to use this approach (I mean unit testing ) for my future planned development with G4. But, I am not pretty sure that MC simulation is a good candidate (ramdom numbers, mock objects ) for using such a framework. So, I would like to know your filling about such a development aspect and what is the framework commonly used in the G4 community.

Many thanks

Ludovic

Question Re: unit testing  by David McKee <David McKee>,   20 Jun, 2008
Re: Question unit testing (ludovic Ferrer)
While I am not interested in running test to validate Geant's code, I do want to be able to run unit test on code of my own that relies on some of Geant.

Is there a tool or scaffold for building unit tests that link to Geant? Some automagical maefile fragment that lets me use xUnit, or a custom unit test framework for Geant?

None Re: unit testing  Keywords: unit testing
by Makoto Asai <Makoto Asai>,   16 Dec, 2005
Re: Question unit testing (ludovic Ferrer)
We do not release local/unit test code, but you can fine some test
codes in extended examples.
Question Geant vs EGS  Keywords: geant egs comparison capabilities
by Gary Agnew <Gary Agnew>,   29 Apr, 2005

I apologise if this is too basic a question for this forum - as a new user I'm not sure whether I should be using GEANT or EGS. Does anyone know of a documented comparison of their capabilities and if they can be used in a combined way? Which would be more appropriate for me? My research interest is simulating and modelling nucleonic densitometers which use Cs-137 and Co-60. The ability to easily make geometrical changes is important. Simple models for materials would suffice, and I'm only interested in gamma particles arriving at the detector. Any pointers would be greatly appreciated.

None Re: Geant vs EGS  Keywords: geant egs comparison capabilities
by Alain Ferragut <Alain Ferragut>,   04 Sep, 2006
Re: Question Geant vs EGS (Gary Agnew)

Hello, I am not aware of a comparison between Geant4 and EGS4. Anyway, G4 is a "toolkit" and is not a program in the same way as EGS4. It means the user has to write its own application using the class libraries of Geant4. Now there are a lot of already prepared physics list which could certainly fit your specific need. I used EGS4 in the past. It is a nice program as long as you are just looking at the physics involved. But, at least a few years ago, it was really hard to compute the geometry in EGS4. This is one of the main reason why I switched to G4.

None Geant4 version information available from inside the sim  by Vlasios Vasileiou <Vlasios Vasileiou>,   01 Apr, 2005

Hi,

In our simulation we're saving the Geant4 version in the output files.

We now manually change the number to be saved. Is it possible that the version information be available from inside the simulation?

Thanks, Vlasios Vasileiou

None geant4 version related macros  by Jacek M. Holeczek <holeczek@us.edu.pl>,   25 Mar, 2005
Hi,
would it be possible that you provide users with the geant4 version
information automatically generated by installer?

In one of the include files (G4RunManagerKernel.hh, for example) put:

#define GEANT4_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#define GEANT4_VERSION_CODE GEANT4_VERSION(6,2,1)
#define GEANT4_RELEASE "geant4.6.2.p01"

For geant4.7.0 you would have:
#define GEANT4_VERSION_CODE GEANT4_VERSION(7,0,0)
#define GEANT4_RELEASE "geant4.7.0"

For geant4.7.0.p01 you would have:
#define GEANT4_VERSION_CODE GEANT4_VERSION(7,0,1)
#define GEANT4_RELEASE "geant4.7.0.p01"

and so on ...

These macros can be used by the user in the following way:

#if GEANT4_VERSION_CODE >= GEANT4_VERSION(6,2,2)
  #include <newheader.h> // geant4.6.2.p02 and newer
  // ... c++ code for "new" geant4 ...
#else
  #include <oldheader.h> // geant4.6.2.p01 and prior
  // ... c++ code for "old" geant4 ...
#endif

Thanks in advance,
Best regards,
Jacek.
None G4SDManager/Messenger  Keywords: naming convention, verbose
by J.E Campagne <campagne@lal.in2p3.fr>,   04 Mar, 2005

Hello,

I would like to suggest to uniformize the Manager pointer access. At present (Geant v7.0) I just notice that I should use G4SDManager::GetSDMpointer() G4EventManager::GetEventManager()

Concerning the Messenger, I also notice some naming confusion G4SDmessenger.hh G4EvManMessenger.hh

Concerning G4SDManager.hh, I do see why there is no GetVerboseLevel that I would have like to use.

Why there is a G4VSensitiveDetector::PrintAll() method but this is not triggered by a G4SDManager/G4SDStructure method (for instance: G4SDStructure is used to loop on all the SD detector registered, and the verbose level is transmitted by the G4SDMessenger)

Hope it helps...

Regards, J.E

Feedback Unnecessarily restrictive definition of the G4VUserPhysicsList class...  Keywords: G4VUserPhysicsList G4VModularPhysicsList polymorphism
by Robert Weller <Robert Weller>,   26 Oct, 2004

This message concerns the definition of the abstract base class G4VUserPhysicsList. This class contains two pure virtual functions, ConstructProcess() and ConstructParticle() that must be defined in derived classes such as Hans-Peter Wellisch's use-case physics lists and custom user physics lists such as those in the examples. In the abstract base class, they are declared as protected, although in derived classes, except G4VModularPhysicsList, which itself is used as an abstract base class, they are always public. Here is the problem. By making these protected, an important form of polymorphism is unnecessarily disallowed, since the Construct() function cannot access them from a generic G4VModularPhysicsList pointer.

"So what?", you may say. Well, first it's poor object-oriented programming design to place unnecessary limits on polymorphism. Polymorphism is one of the main reasons for having c++, and it's short-sighted to restricte it without just cause. In this case, it should be trivial to write a very simply user physics list that makes it possible to pick between any number of concrete physics lists at run time, using one member function and a messenger. Of course there are other ways to program this, but creating a pointer e.g. "theRealList" of type G4VModularPhysicsList in the user physics list class "myPhysicsList" and defining e.g. void myPhysicsList::ConstructProcess() {theRealList->ConstructProcess();} and similarly for the other function, ConstructParticle(), is an especially simple and elegant approach that the over-zealous applicated of "protected" in G4VModularPhysicsList makes impossible.

In my library that "protected" is now commented out. If someone has a good reason for it being there, I'd appreciate knowing what it is. Otherwise, I strongly suggest that it disappear in the next public release of Geant4, in the interest of good OOP design and user flexibility.

None Re: Unnecessarily restrictive definition of the G4VUserPhysicsList class...  Keywords: G4VUserPhysicsList G4VModularPhysicsList polymorphism
by Hisaya Kurashige <Hisaya Kurashige>,   28 Nov, 2004
Re: Feedback Unnecessarily restrictive definition of the G4VUserPhysicsList class... (Robert Weller)

Hi Bob,

 I understand your point.
 In the next release, both "ConstructParticle" and "ConstructProcess" methods will be declared as 'public'.
 In addition, we are planning to change scheme of construction of particles and processes. In the new scheme, ConstructParticle is invoked directly by the RunManager and Construct method includes only initialization of process managers and processes. This modification intends to clarify sequence of initialization of particle objects and process objects.   
  

Question Is Dual-Processors Useful in Geant4?  by San <San>,   18 Mar, 2004
I'm going to get a new computer system for simulation projects.  
The major project will be Geant4.
I wish to know whether a Dual Processors system useful in Geant4.
Initially, I was thinking of getting a system with Dual Processors.
However, I don't know whether the dual system is applicable or will help in Geant4.

Please advice.

Thank You!

Regards,
San
None Re: Is Dual-Processors Useful in Geant4?  by alex <alex>,   16 Sep, 2006
Re: Question Is Dual-Processors Useful in Geant4? (San)
Certainly will approach . Pentium Core!!!
None Re: Is Dual-Processors Useful in Geant4?  by Jeremy McCormick <Jeremy McCormick>,   19 Mar, 2004
Re: Question Is Dual-Processors Useful in Geant4? (San)

It depends on what you mean by "useful".

By design, Geant4 is a single-threaded, single-process program. This allows for maximum portability, because forking/threading is performed differently depending on the CPU architecture. Thus, a single Geant4 process will not, for instance, "automatically" use both processors on a dual-CPU machine.

However, if you split your jobs up intelligiently, this same machine can run two Geant4 processes at the same time, which is often very useful. It is equivalent to having two different machines running separate jobs. Depending on the particulars of your jobs, it may be useful to "manually" batch your jobs into groups of 100, 500 or 1000 events (for instance).

Additionally, Geant4 can be made to support parallel computation. In general, this should be performed at the event level, i.e. dispatching single events to each machine in your cluster. Using more granular dispatch methods, such as for steps, tracks, etc. is likely to give poor performance due to the overhead of data transfer, synchronization, etc.

Examples of parallel computation using Geant4 can be found in $G4INSTALL/examples/extended/parallel.

The only implementation of parallel processing of which I'm aware uses the TOP-C library: http://www.ccs.neu.edu/home/gene/topc.html.

I don't know of any implementations using the more typical PVM or MPI libraries.

I hope that helps.

None Re: Is Dual-Processors Useful in Geant4?  by Jeremy McCormick <Jeremy McCormick>,   19 Mar, 2004
Re: None Re: Is Dual-Processors Useful in Geant4? (Jeremy McCormick)

Minor self-correction: forking/threading methods depend on the *OS*, not the CPU architecture.

None configuration for Linux-icc needed  by Exaos Lee <Exaos Lee>,   03 Feb, 2004

I want to use icc (Intel C/C++ Compiler) to compile geant4. I once tried but failed. Anyone who can help me to produce a makefile such as Linux-icc.gmk?

None Re: configuration for Linux-icc needed  by Wellisch, J.P. <Wellisch, J.P.>,   16 Feb, 2004
Re: None configuration for Linux-icc needed (Exaos Lee)

Hi,

  see installation, item 223.

Many greetings,

Hans-Peter.

Idea New UI classes needed  Keywords: User Interface Command
by Andrei Sokolov <a.sokolov@gsi.de>,   02 May, 2003

Hi everybody,

I don't know to whom out of GEANT4 developers to address my question, but anyway...

Can one implement couple of new classes into G4 UserInterface scope, namely G4UIcmdWithAnIntegerAndDoubleAndUnit, which accept one integer and one double parameters, and something like G4UIcmdWithAnIntegerAndVectorAndUnit, which accept a vector of double values with dimension pointed out in first integer parameter?

Best regards,
                 Andrei Sokolov

None Re: New UI classes needed  Keywords: User Interface Command
by michel maire <michel maire>,   02 May, 2003
Re: Idea New UI classes needed (Andrei Sokolov)

User Andrei Sokolov wrote:

>> Hi everybody,
>> 
>> I don't know to whom out of GEANT4 developers to address my question,
>> but anyway...
>> 
>> Can one implement couple of new classes into G4 UserInterface scope,
>> namely G4UIcmdWithAnIntegerAndDoubleAndUnit, which accept one integer
>> and one double parameters, and something like
>> G4UIcmdWithAnIntegerAndVectorAndUnit, which accept a vector of double
>> values with dimension pointed out in first integer parameter?
>> 
>> Best regards,
>>                  Andrei Sokolov
>> 

See examples/extended/electromagnetic/TestEm3/Em3DetectorMessenger.

The command AbsorCmd is with: integer,string,doubleWithUnit

You can adapt this model

Question Compile differences between RedHat and Windows  Keywords: Windows RedHat compile differences
by Dennis Haggerty <Dennis Haggerty>,   20 Mar, 2002

After some modification of novice N03 I'm printing information out to a text file with the following statements:

////////////////////////////////////////////////
void ExN03SteppingVerbose::TrackingStarted()
////////////////////////////////////////////////
{
  ofstream outFile("outfile.txt",ios::app);
  CopyState();
  G4int prec = G4cout.precision(3);
  if( verboseLevel > 0 ){

    if (fTrack->GetDefinition()->GetParticleName() == "gamma"){
     outFile << fTrack->GetDefinition()->GetParticleName()<< " "
	   << G4std::setw( 10) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")<< G4endl;
    }
  }
}

This compiles and works fine on my RedHat installation but when I take the exact same routines and compile them with my windows installation I get the following errors:

Compiling ExN03SteppingVerbose.cc ... ExN03SteppingVerbose.cc src/ExN03SteppingVerbose.cc(52) : error C2065: 'ofstream' : undeclared identifier src/ExN03SteppingVerbose.cc(52) : error C2146: syntax error : missing ';' before identifier 'outFile' src/ExN03SteppingVerbose.cc(52) : error C2065: 'outFile' : undeclared identifier src/ExN03SteppingVerbose.cc(52) : error C2653: 'ios' : is not a class or namespace name src/ExN03SteppingVerbose.cc(52) : error C2065: 'app' : undeclared identifier

I obtained the pre-compiled windows build from the users workshop at SLAC and am able to compile and run the T01 tutorial on my windows installation so it seems like its installed correctly.

What am I missing?

I use the G4cout "method?" frequently to print informaiton to the screen. Is there a similiar "method?" to get that information into a text file?

Regards, Dennis Haggerty

Feedback Re: Compile differences between RedHat and Windows  Keywords: Windows RedHat compile differences
by Gabriele Cosmo <Gabriele Cosmo>,   08 Apr, 2002
Re: Question Compile differences between RedHat and Windows (Dennis Haggerty)
Hi Dennis,

please note that this is not the correct forum for this topic.
The "Installation and Configuration" forum is more appropriate, here.

> After some modification of novice N03 I'm printing information out
> to a text file with the following statements: 
>
>  ////////////////////////////////////////////////
>  void ExN03SteppingVerbose::TrackingStarted()
>  ////////////////////////////////////////////////
>  {
>   ofstream outFile("outfile.txt",ios::app);

You need to specify the namespace for file streams.
i.e., the line above should look like the following:

   std::ofstream outFile("outfile.txt",std::ios::app);

> This compiles and works fine on my RedHat installation but when
> I take the exact same routines and compile them with my windows
> installation I get the following errors: 
>  :
>
> I obtained the pre-compiled windows build from the users workshop
> at SLAC and am able to compile and run the T01 tutorial on my
> windows installation so it seems like its installed correctly. 
>
> What am I missing? 
>
> I use the G4cout "method?" frequently to print informaiton to the
> screen. Is there a similiar "method?" to get that information into
> a text file? 

This happens because g++ does not enforce ISO/ANSI setup for
compilation, while VC++ on Windows does.
The fix above should solve your problem.

Cheers, Gabriele
 Add Message Add Message
to: "User Requirements"

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]