**Installing COSY INFINITY on your computer** With your login and password in hand proceed to: [[http://cosy.pa.msu.edu/download| Download]] We strongly encourage you to download the manual called "COSYBeamMan100.pdf" __If you are using Windows:__ Follow the instructions provided on the download page step 1 and download the files provided in step 4. Once the files are downloaded, please run cosy from the folder where the files from step 4 are stored and when prompted enter the name cosy. This will create the binary file needed to run ion optic calculation. __If you are using Linux:__ These instructions should most probably be working on macOSX as long as you have a fortran 1: Download all the file provided on step 3 of the download page and store them in a dedicated folder. 2: If you are using the intel fortran compiler, just use make in your terminal in the correct folder to compile. However, you may need to comment out the part that is related to PGPlot to compile. #: make If you are not using the intel compiler, you will have to edit the Makefile file to reflect your compiler. For example if you are using the gcc compiler: gfortran FC = gfortran -Wno-argument-mismatch FFLAGS= -m64 LINK = $(FC) LIBS = #LIBS = -L/usr/local/pgplot -lpgplot -L/usr/X11R6/lib -lX11 OBJ = foxy.o dafox.o foxfit.o foxgraf.o cosy: $(OBJ) $(LINK) -o cosy $(OBJ) $(LIBS) Note: I strongly suggest (and provided in the example avove) to comment the need for PGplot out. With all compiler (other than the intel one) you will also have to edit the file dafox.f to replace line 1403 with line 1408. Replace IF(NTYP(IMSEC).NE.NRE) CALL FOXNTY(IMSEC) * * SLEEPQQ is an Intel Fortran specific, platform independent call. * CALL SLEEPQQ(NINT(CC(NBEG(IMSEC)))) * * SLEEP is not compiler specific and platform independent, * but only does full seconds, not milliseconds * C CALL SLEEP(NINT(1.D-3*CC(NBEG(IMSEC)))) with IF(NTYP(IMSEC).NE.NRE) CALL FOXNTY(IMSEC) * * SLEEPQQ is an Intel Fortran specific, platform independent call. * * CALL SLEEPQQ(NINT(CC(NBEG(IMSEC)))) * * SLEEP is not compiler specific and platform independent, * but only does full seconds, not milliseconds * CALL SLEEP(NINT(1.D-3*CC(NBEG(IMSEC)))) In your terminal window you can use the command make to compile: #: make 2: Now that the COSY INFINITY is executable exist, you will be able to run COSYscript. Download all the file in step 4 of the download page in your cosy folder. 3: Let's run COSY and create the binary file needed to run ion optic calculation, from your terminal call cosy and at the prompt provide cosy as the script name you want to excecute: #: ./cosy ************************************ * * * C O S Y I N F I N I T Y * * * * FOXY LANGUAGE SYSTEM * * * * VERSION 10.0 * * * * (C) MSU 2017 * * * ************************************ GIVE SOURCE FILE NAME WITHOUT EXTENSION .FOX cosy --- BEGINNING COMPILATION --- BIN FILE WRITTEN: COSY 4: Congrats you are ready to go. Remember the path where you just installed everything because all your scripts will have to point to the file you just generated. __If you are using MacOSX:__ You can of course follow the Linux instructions to get the latest version. Alternatively, according to the COSY Infinity support team the installation package of version 9.2 is good for running COSY 10.1 beam physics environment. After installing the v9.2 you should be able to run the “cosy.fox” file (from http://cosy.pa.msu.edu/download/) which is basically the 10.1 beam physics package. This run will create the “COSY.bin” file (which corresponds to the 10.1 version) and by having it in your working directory you should be able to run any “.fox” file. This provides a somewhat nicer environment to run COSY __Note: If you see the following error:__ Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL no panic, see the following: [[https://stackoverflow.com/questions/44308577/ieee-underflow-flag-ieee-denormal-in-fortran-77]]