Difference between revisions of "ForestMacStuff"

From New IAC Wiki
Jump to navigation Jump to search
Line 352: Line 352:
 
Fink will recompile and install GEANT 3 using the command
 
Fink will recompile and install GEANT 3 using the command
  
/
+
/sw/bin/fink install cernlib2005
 
 
  
 
== Installing GEMC using Fink==
 
== Installing GEMC using Fink==

Revision as of 20:18, 22 October 2009

setting up wireless

shoose EDUWIFI

Key is 1CBE991A14

neet to send MAC address of card to ISU helpdesk in order to get permission to use

Enabling password requirement when waking from sleep

There is a check box under the "Security" icon within "System Preferences"

setting root password

Mac OS X 10.5 or later

  1. From the Finder's Go menu, choose Utilities.
  2. Open Directory Utility.
  3. Click the lock in the Directory Utility window.
  4. Enter an administrator account name and password, then click OK.
  5. Choose Enable Root User from the Edit menu.
  6. Enter the root password you wish to use in both the Password and Verify fields, then click OK.

Setting up printers

Choose "print" from within any application

Select "Add printer" from the pull down menu

choose "HP Jet Direct - Socket"

Enter IP address of printer

It should auto detect the printer

add a label

Unix utilities

Most of the commands below require that you either be a superuser (su) or have superuser priviledges (sudo)

Xcode

First download Xcode from apple

http://developer.apple.com/TOOLS/xcode/

MacPorts

http://www.macports.org/

installed in /opt/local/bin

do the command

port -d selfupdate

to update ports

some commands


to search for packages use
sudo port search string
to install a package you found do
sudo port install packagename

Installing older port versions

MacPorts is my preferred way of installing, managing, and upgrading much of the software I have on my Mac. I’m setting up a new work machine today and I need to install ruby 1.8.5 on my machine for Rails to be happy. Unfortunately, you can’t do something simple like specifying the version of the port you want to install unless it’s in a local repository. Fortunately, my friend Stephen Chu had this problem about a year ago and has a nice procedure on how to do it. I’m going to update it for MacPorts and ruby 1.8.5 here.

1) Find out the svn revision number of the Portfile that has 1.8.5 by looking at: http://trac.macosforge.org/projects/macports/log/trunk/dports/lang/ruby/Portfile In my case it is 21127.

2) Set up a local port repository. In the file /opt/local/etc/macports/sources.conf, add this line before the rsync line: file:///Users/Shared/dports and create that directory.

3) Install the port into your local repository. cd /Users/Shared/dports && svn co --revision 21127 http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ lang/ruby/

4) Run portindex so that ports now finds your new (old) version of ruby. portindex /Users/Shared/dports

5) Now you should be able to see ruby @1.8.5-p12 in addition to @1.8.6 by running: port list

6) Install Ruby sudo port install ruby @1.8.5-p12 You should be up and running now, so to check, run: ruby -v You will see something like this: ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.10.1]

SVN

http://subversion.tigris.org/


port install subversion

from command line type

=SVN commands

svn -help


svn info URL

svn co URL

Xmgrace

http://plasma-gate.weizmann.ac.il/Grace/


installation using macports

ports install grace

Xfig

sudo port install xfig

Tex

sudo port install teTex

gerbv

port install gerbv

GEANT4

Installing geant 4.9.2 p01

Get CLHEP 2.0.4.2

http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/

after downloading to a good place "be sure to set the prefix path to where you want to find the CLHEP libraries"

tar -zxvf clhep-2.0.4.2.tgz 
cd 2.0.4.2/CLHEP
./configure  --prefix=/users/tforest/src/GEANT4/CLHEP/2.0.4.2/
make

The above prefix will put the CLHEP libraries under the subdirectory /users/tforest/src/GEANT4/CLHEP/2.0.4.2/

the source code is under the subdirectory /users/tforest/src/GEANT4/CLHEP/2.0.4.2/CLHEP

when asked in the GEANT4 configure script below for the CLHEP_BASE_DIR subdirectory youwill enter /users/tforest/src/GEANT4/CLHEP/2.0.4.2/

unpack data libraries

create a "data" subdirectory under your geant4 directory and untar all the data "tar files

tar -xvf G4NDL.3.13.tar
tar -xvf G4EMLOW.6.2.tar
tar -xvf G4RadioactiveDecay.3.2.tar 
tar -xvf G4ABLA.3.0.tar
tar -xvf PhotonEvaporation2.0.tar

Configure -build (without visualization)

download the geatn 4 distribtuion and untar it

then enter the directory and type

./Configure -build

Lets first build the distribution without any graphics to be sure the bare bones are working

then type

./Configure install

to create the env.csh file which will set up your environmental variables

enter "csh"

compile exampleN01 to check that things are working

[tony-forests-macbook-pro:examples/novice/N01] tforest% cd /Users/tforest/src/GEANT4/geant4.9.2.p01/examples/novice/N01

[tony-forests-macbook-pro:examples/novice/N01] tforest% make
Making dependency for file exampleN01.cc ...
Making dependency for file src/ExN01PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN01PhysicsList.cc ...
Making dependency for file src/ExN01DetectorConstruction.cc ...
Compiling ExN01DetectorConstruction.cc ...
Compiling ExN01PhysicsList.cc ...
Compiling ExN01PrimaryGeneratorAction.cc ...
Creating shared library /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.dylib ...
Creating/replacing object files in /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.a ...
ar: creating archive /Users/tforest/geant4/tmp/Darwin-g++/exampleN01/libexampleN01.a
Compiling exampleN01.cc ...
Using global libraries ...
Linking exampleN01 ...
... Done!


Configure -build (with visualization)

[tony-forests-macbook-pro:~/src/GEANT4/geant4.9.2.p01] tforest% ./Configure -build
 
 
 
                --- Geant4 Toolkit Build  ---
 
 
 
 
 
Would you like to see the instructions? [n] 

Definition of G4SYSTEM variable is Darwin-g++.
That stands for:

1) OS           : Darwin

2) Compiler     : g++

To modify default settings, select number above (e.g. 2) 
[Press [Enter] for default settings] 

There exists a config.sh file. Shall I use it to set the defaults? [y] 
Fetching default answers from your old config.sh file...
 
I can set things up so that your shell scripts and binaries are more portable,
at what may be a noticable cost in performance.  In particular, if you
ask to be portable, the following happens:

     1) Shell scripts will rely on the PATH variable rather than using
        the paths derived above.
     2) ~username interpretations will be done at run time rather than
        by Configure.

Do you expect to run these scripts and binaries on multiple machines? [n] 

Where is Geant4 source installed? 
[/Users/tforest/src/GEANT4/geant4.9.2.p01] 

Specify the path where Geant4 libraries and source files should be
installed. 
[/Users/tforest/src/GEANT4/geant4.9.2.p01] 

Do you want to copy all Geant4 headers 
in one directory? [y] 
 
Specify the path where are the Geant4 data libraries 

PhotonEvaporation2.0 RadioactiveDecay3.2 G4EMLOW6.2 G4NDL3.13 G4ABLA3.0 

are installed. For now, a flat directory structure is assumed, and this can 
be customized at the next step if needed.
[/Users/tforest/src/GEANT4/geant4.9.2.p01/data] 
checking for PhotonEvaporation2.0... yes
checking for RadioactiveDecay3.2... yes
checking for G4EMLOW6.2... yes
checking for G4NDL3.13... yes
checking for G4ABLA3.0... yes

Please, specify where CLHEP is installed. It was found in:

CLHEP_BASE_DIR:                 /Users/tforest/src/GEANT4/CLHEP/2.0.4.2/ 
[/Users/tforest/src/GEANT4/CLHEP/2.0.4.2/] 

You can customize paths and library name of you CLHEP installation:

1) CLHEP_INCLUDE_DIR:           /Users/tforest/src/GEANT4/CLHEP/2.0.4.2//include
2) CLHEP_LIB_DIR:               /Users/tforest/src/GEANT4/CLHEP/2.0.4.2//lib
3) CLHEP_LIB:                   CLHEP
To modify default settings, select number above (e.g. 2)
[Press [Enter] for default settings] 
 

By default 'static' (.a) libraries are built.

Do you want to build 'shared' (.so) libraries?
[y] 

You selected to build 'shared' (.so) libraries. 
Do you want to build 'static' (.a) libraries too?
[n] 
 

Do you want to build 'global' compound libraries? [n] 
 
Do you want to compile libraries in DEBUG mode (-g)? [y] 

  G4UI_NONE

If this variable is set, no UI sessions nor any UI libraries are built. 
This can be useful when running a pure batch job or in a user framework 
having its own UI system.
Do you want to set this variable ?
[y] 

  G4VIS_NONE

If this variable is set, no visualization drivers will be built or used.
Do you want to set this variable ?
[n] 

  G4VIS_BUILD_OPENGLX_DRIVER
  G4VIS_USE_OPENGLX

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries is
required.
[y] 

  G4VIS_BUILD_OPENGLXM_DRIVER
  G4VIS_USE_OPENGLXM

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries and 
the Motif Xm extension is required.
[n] 

Fink

Fink is a Unix software package program which will install unix programs on the Mac in the /sw root directory instead of /usr or /bin.

Installing Fink

http://www.finkproject.org/

You need to download an Image file for a binary installation

GEANT3

Fink will recompile and install GEANT 3 using the command

/sw/bin/fink install cernlib2005

Installing GEMC using Fink

http://clasweb.jlab.org/wiki/index.php/Mac_OS_X_gemc_installation_with_Fink


Go Back