├── codingTests ├── fortran90 │ ├── sort1 │ ├── test1 │ ├── thefile │ ├── driveTP.cpp │ ├── testcode.f90 │ ├── simple.f90 │ ├── conftest.f │ ├── flushing.f90 │ ├── hello │ ├── hello1 │ ├── misMatchDim │ ├── modAssign.f90 │ ├── wtf.f90 │ ├── hello1.f90 │ ├── syntax.f90 │ ├── testWriteArrayGrouped │ ├── testWriteArrayLooped │ ├── testWriteArrayStraight │ ├── testWriteArrayStraigth │ ├── testpointer.f90 │ ├── hello.f90 │ ├── foobarbaz_mod.f90 │ ├── test3.F │ ├── tkind.F90 │ ├── testComment.F │ ├── testOrDefine.F90 │ ├── testDsind.f90 │ ├── lenarray.f90 │ ├── modAndSub.f90 │ ├── modulos.f90 │ ├── test2.F90 │ ├── indexArrays.f90 │ ├── testBools.f90 │ ├── complex.f90 │ ├── nameIfLoop.f90 │ ├── intArray.f90 │ ├── sdot.f90 │ ├── use2Mod.f90 │ └── allocTrick.f90 ├── python │ ├── testout │ ├── testin │ ├── helloMpi.py │ ├── testFunc.py │ ├── edge_mod.F90 │ └── pseudospectral.py ├── cplusplus │ ├── File.txt │ ├── testenv │ ├── filewrite │ ├── g++Build.sh │ ├── wrt_out.txt │ ├── testThreads.cpp │ ├── run100.sh │ ├── testBoostTimer.cpp │ ├── ifDefines.cpp │ ├── buildSimpleClassPdt.sh │ ├── filewrite.cpp │ ├── buildSimpleClassOneLinePdt.sh │ ├── testenv.cxx │ ├── SConstruct │ ├── showMaxVal.cpp │ ├── testPlatform.cc │ ├── static.cpp │ ├── simpleClassOneLine.cpp │ └── simpleClass.cpp ├── scripting │ ├── test1 │ │ └── file1 │ ├── test2 │ │ └── file2 │ ├── test3 │ │ └── file3 │ ├── test4 │ │ └── file4 │ ├── test5 │ │ └── file5 │ ├── bigLs.sh │ ├── addzero.sh │ ├── lists.sh │ ├── underscore.sh │ ├── scr_test4file.sh │ ├── multiRuns.sh │ ├── underscoreAndlowercase.sh │ ├── catExpandVar.sh │ └── cshell │ │ └── stringContains.sh ├── ifort_tests │ ├── lazyptr_test │ ├── lazyptr_test.f90 │ └── lazyptrTest │ │ └── lazyptr_test.f90 ├── doxygen-test │ ├── doxygen_objdb_1090.tmp │ ├── html │ │ ├── tab_b.gif │ │ ├── tab_l.gif │ │ ├── tab_r.gif │ │ ├── doxygen.png │ │ ├── graph_legend.png │ │ └── formula.repository │ └── latex │ │ ├── FreeSans.ttf │ │ └── Makefile ├── bandf │ └── code │ │ ├── alg083.dta │ │ ├── alg096.dta │ │ ├── alg115.dta │ │ ├── alg065.dta │ │ ├── alg066.dta │ │ ├── alg081.dta │ │ ├── alg082.dta │ │ ├── alg036.dta │ │ ├── alg067.dta │ │ ├── alg091.dta │ │ ├── alg092.dta │ │ ├── alg093.dta │ │ ├── alg031.dta │ │ ├── alg032.dta │ │ ├── alg033.dta │ │ ├── alg073.dta │ │ ├── programs.exe │ │ ├── alg064.dta │ │ ├── alg094.dta │ │ ├── alg095.dta │ │ ├── alg074.dta │ │ ├── alg061.dta │ │ ├── alg062.dta │ │ ├── alg063.dta │ │ ├── alg034.dta │ │ ├── alg035.dta │ │ ├── alg071.dta │ │ ├── alg072.dta │ │ └── alg125.dta ├── cMakeStuff │ ├── CMakeFiles │ │ ├── progress.make │ │ ├── cmake.check_cache │ │ ├── CompilerIdC │ │ │ └── a.out │ │ ├── CompilerIdCXX │ │ │ └── a.out │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ └── CMakeSystem.cmake │ ├── helloProj │ │ ├── src │ │ │ ├── CMakeFiles │ │ │ │ └── progress.make │ │ │ ├── hello.cc │ │ │ ├── CmakeLists.txt │ │ │ └── hello.h │ │ ├── test │ │ │ ├── CMakeFiles │ │ │ │ └── progress.make │ │ │ └── testHello.cpp │ │ └── CMakeLists.txt │ └── temp_build │ │ └── thisconfig.sh ├── scons_tests │ ├── SConstruct │ └── hello.c ├── haskell │ └── hello.hs ├── autotools │ └── gnu_test │ │ ├── Makefile.am │ │ ├── README │ │ ├── src │ │ └── main.c │ │ └── configure.ac ├── testConfigures │ └── conftest.c ├── cCodes │ ├── alive1 │ └── alive1.c ├── cLang │ └── hello.c ├── languageInterop │ ├── testPointerAllocs │ │ ├── test.f90 │ │ ├── a.out │ │ ├── test │ │ ├── test.dSYM │ │ │ └── Contents │ │ │ │ └── Resources │ │ │ │ └── DWARF │ │ │ │ └── test │ │ └── a.out.dSYM │ │ │ └── Contents │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── a.out │ └── alexExample │ │ ├── tm_definer_bar_mod_api.h │ │ └── bigWrap.py ├── macOSx │ └── lt1 │ │ ├── a.c │ │ ├── m.c │ │ ├── b.c │ │ └── README ├── hdf5_stuff │ ├── sample-read │ ├── hdf5read.zip │ ├── sample-file.h5 │ ├── sample-file.txt.zip │ └── sample-file.out ├── Mpi_stuff │ ├── cpuNum.txt │ ├── step2.PID.sh │ ├── step1_mpiRank.sh │ ├── step2_mpiRank.sh │ ├── step1.PID.sh │ ├── steps.PID.sh │ ├── coreId.c │ ├── mpiRank_steps.sh │ └── allReduce_trials │ │ └── trial_3_wPatrun │ │ └── doPatView.sh ├── makes │ └── Makefile ├── openmp │ ├── mycpu.c │ ├── coreId.c │ ├── CMakeLists.txt │ ├── useFindMyCpuId.c │ └── omp_get_wtime.cpp ├── fortran2003 │ ├── shapeprg.f03 │ └── testgetarg.f03 ├── gpuStuff │ ├── Makefile │ └── fortest.f95 ├── CMake │ ├── build-test │ │ └── runCmake.sh │ └── tutorial.cxx ├── boost │ └── uuid │ │ ├── uuid.cpp │ │ └── uuid2.cpp ├── matplotlibing │ └── anima1.py └── testIndex.f90 ├── nagle2 ├── Day-III │ ├── 06-coco │ │ ├── Tests │ │ │ ├── test.f90 │ │ │ ├── mac.set │ │ │ ├── whatsit │ │ │ │ └── inc.inc │ │ │ ├── inc.set │ │ │ ├── ass.fpp │ │ │ ├── sym1.fpp │ │ │ ├── sym.fpp │ │ │ ├── debug.set │ │ │ ├── stdout.set │ │ │ ├── stdin.set │ │ │ ├── sym2.fpp │ │ │ ├── names.set │ │ │ ├── inc.fpp │ │ │ ├── sym3.fpp │ │ │ ├── hang2.fpp │ │ │ ├── sym1.f90 │ │ │ ├── foo.set │ │ │ ├── sym.f90 │ │ │ ├── hang2.f90 │ │ │ ├── hang.f90 │ │ │ ├── hang.fpp │ │ │ ├── sym2.f90 │ │ │ ├── nest.f90 │ │ │ ├── key.fpp │ │ │ ├── sym3.f90 │ │ │ ├── nest.fpp │ │ │ ├── if.fpp │ │ │ ├── text4.fpp │ │ │ ├── text3.fpp │ │ │ ├── foo.f │ │ │ ├── ass.f90 │ │ │ ├── if.f90 │ │ │ ├── collect.f90 │ │ │ ├── text3.f90 │ │ │ ├── stdout.f90 │ │ │ ├── text.fpp │ │ │ ├── ass.f │ │ │ ├── text2.f │ │ │ ├── foo.fpp │ │ │ ├── mac.fpp │ │ │ └── text2.fpp │ │ ├── coco.set │ │ ├── coco │ │ ├── Bugs │ │ │ ├── bug │ │ │ ├── type.f90 │ │ │ └── bug.f90 │ │ ├── make_pm │ │ ├── next.f90 │ │ ├── make_pm.in │ │ ├── document.inc │ │ └── makefile │ ├── N1824.pdf │ ├── 02-mctoy │ │ ├── mctoy │ │ └── mctoy.mk │ ├── 01-hello_world │ │ ├── hw │ │ └── hw.mk │ └── 04-Digits-Home │ │ ├── md │ │ └── make_digits.f90 ├── Day-I │ ├── 01-Test │ │ ├── Test │ │ └── Test.mk │ ├── 03-Transition │ │ └── rt │ ├── 09-new-types │ │ ├── aka │ │ ├── coco │ │ ├── test │ │ ├── typebool.f90 │ │ └── test_boolean.f90 │ ├── 06-dim= │ │ ├── Intrinsics │ │ └── Intrinsics.mk │ ├── 02-Derivatives │ │ └── test │ ├── 08-RNGs │ │ └── find_primes │ ├── 04-Fibonacci │ │ └── fibonacci │ ├── 05-rank_remapping │ │ ├── Pointers │ │ └── Pointers.mk │ └── 07-move_alloc │ │ ├── Array_Intrinsic │ │ └── Array_Intrinsic.mk ├── Day-II │ ├── 03-pthreads │ │ ├── hw │ │ ├── size.c │ │ └── hw.mk │ └── 01-Inheritance │ │ ├── iterator │ │ └── iterator.mk └── Day-I-2 │ └── Day-I │ ├── 01-Test │ ├── Test │ └── Test.mk │ ├── 08-RNGs │ ├── test │ └── find_primes │ ├── 03-Transition │ └── rt │ ├── 06-dim= │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 09-new-types │ ├── aka │ ├── coco │ ├── test │ ├── typebool.f90 │ └── test_boolean.f90 │ ├── 02-Derivatives │ ├── test │ └── f.mk │ ├── 04-Fibonacci │ └── fibonacci │ ├── 05-rank_remapping │ ├── Pointers │ └── Pointers.mk │ └── 07-move_alloc │ ├── Array_Intrinsic │ └── Array_Intrinsic.mk ├── scripting ├── nohuping.sh ├── writeloop.out ├── getOutputinVar.sh ├── writeloop.sh ├── loop2.sh ├── loop3.sh ├── sequence.sh ├── searchList.sh └── nohup.out ├── README ├── nagle1 ├── Fortran-I │ ├── 29-Input_Output │ │ ├── group.nml │ │ ├── Input_Output │ │ └── Input_Output.mk │ ├── 07-Characters │ │ ├── Characters.in │ │ ├── Characters │ │ └── Characters.mk │ ├── 09-Logicals │ │ ├── Logicals.in │ │ ├── Logicals │ │ └── Logicals.mk │ ├── 10-Reals │ │ ├── Reals │ │ └── Reals.mk │ ├── 11-Reals │ │ ├── Reals │ │ └── Reals.mk │ ├── 12-Complex │ │ ├── Complex │ │ └── Complex.mk │ ├── Slides_2012_May.pdf │ ├── 04-Integers │ │ ├── Integers │ │ └── Integers.mk │ ├── 05-Integers │ │ ├── Integers │ │ └── Integers.mk │ ├── 08-Logicals │ │ ├── Logicals │ │ ├── Logicals.in │ │ └── Logicals.mk │ ├── README.txt │ ├── 06-Characters │ │ ├── Characters │ │ └── Characters.mk │ ├── 14-Assignment │ │ ├── Assignment │ │ └── Assignment.mk │ ├── 15-Assignment │ │ ├── Assignment │ │ └── Assignment.mk │ ├── 16-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 17-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 18-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 19-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 20-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 21-Attributes │ │ ├── Attributes │ │ └── Attributes.mk │ ├── 30-Procedures │ │ ├── Procedures │ │ └── Procedures.mk │ ├── 31-Procedures │ │ ├── Procedures │ │ └── Procedures.mk │ ├── 32-Procedures │ │ ├── Procedures │ │ └── Procedures.mk │ ├── 33-Procedures │ │ ├── Procedures │ │ └── Procedures.mk │ ├── 01-Hello_World │ │ ├── Hello_World │ │ └── Hello_World.mk │ ├── 02-Hello_World │ │ ├── Hello_World │ │ └── Hello_World.mk │ ├── 03-Hello_World │ │ ├── Hello_World │ │ └── Hello_World.mk │ ├── 22-Executables │ │ ├── Executables │ │ └── Executables.mk │ ├── 23-Executables │ │ ├── Executables │ │ └── Executables.mk │ ├── 24-Executables │ │ ├── Executables │ │ └── Executables.mk │ ├── 25-Input_Output │ │ ├── Input_Output │ │ └── Input_Output.mk │ ├── 26-Input_Output │ │ ├── Input_Output │ │ └── Input_Output.mk │ ├── 27-Input_Output │ │ ├── Input_Output │ │ └── Input_Output.mk │ ├── 28-Input_Output │ │ ├── Input_Output │ │ └── Input_Output.mk │ ├── 13-Derived_Types │ │ ├── Derived_Types │ │ └── Derived_Types.mk │ └── notes.otl ├── Fortran-III │ ├── N1824.pdf │ ├── nrRAL98060.pdf │ ├── Slides_2012_May.pdf │ ├── 02-Himeno │ │ ├── f90_xp_mpi.lzh │ │ └── f90_xp_omp.lzh │ └── 01-Hello_World │ │ ├── Hello_World │ │ └── Hello_World.mk └── Fortran-II │ ├── 01-Array │ ├── Array │ └── Array.mk │ ├── 02-Array │ ├── Array │ └── Array.mk │ ├── 03-Array │ ├── Array │ └── Array.mk │ ├── 04-Array │ ├── Array │ └── Array.mk │ ├── 05-Array │ ├── Array │ └── Array.mk │ ├── 20-Modules │ ├── Module │ └── Module.mk │ ├── 21-Modules │ ├── Module │ └── Module.mk │ ├── 22-Modules │ ├── Module │ └── Module.mk │ ├── 23-Modules │ ├── Module │ └── Module.mk │ ├── 24-Modules │ ├── Module │ └── Module.mk │ ├── 14-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 15-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 16-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 17-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 18-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 19-Pointers │ ├── Pointers │ └── Pointers.mk │ ├── 39-Generics │ ├── Generics │ └── Generics.mk │ ├── 40-Generics │ ├── Generics │ └── Generics.mk │ ├── 41-Generics │ ├── Generics │ └── Generics.mk │ ├── Slides_2012_May.pdf │ ├── 42-Operators │ ├── Operators │ └── Operators.mk │ ├── 43-Operators │ ├── Operators │ └── Operators.mk │ ├── 25-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 26-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 27-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 28-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 29-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 30-Procedures │ ├── Procedures │ └── Procedures.mk │ ├── 31-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 32-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 33-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 34-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 35-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 36-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 37-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 38-Intrinsics │ ├── Intrinsics │ └── Intrinsics.mk │ ├── 06-Array_Intrinsic │ ├── Array_Intrinsic │ └── Array_Intrinsic.mk │ ├── 07-Array_Intrinsic │ ├── Array_Intrinsic │ └── Array_Intrinsic.mk │ ├── 08-Array_Intrinsic │ ├── Array_Intrinsic │ └── Array_Intrinsic.mk │ ├── 09-Array_Intrinsic │ ├── Array_Intrinsic │ └── Array_Intrinsic.mk │ ├── 10-Array_Intrinsic │ └── Array_Intrinsic │ ├── 11-Array_Intrinsic │ └── Array_Intrinsic │ ├── 12-Array_Intrinsic │ └── Array_Intrinsic │ └── 13-Array_Intrinsic │ └── Array_Intrinsic ├── Rouson_examples ├── ssdSource │ ├── chapter01 │ │ ├── CMakeLists.txt │ │ └── figure1.4 │ │ │ ├── CMakeLists.txt │ │ │ └── figure1.4.in │ ├── chapter05 │ │ ├── leak │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ │ ├── CMakeLists.txt │ │ └── vortex_cpp │ │ │ ├── CMakeLists.txt │ │ │ └── Makefile │ ├── chapter06 │ │ ├── fortran_abstract_calculus │ │ │ └── CMakeLists.txt │ │ └── semidiscrete_cpp │ │ │ └── CMakeLists.txt │ ├── chapter02 │ │ ├── figure2.8-11 │ │ │ ├── figure2.8.in │ │ │ ├── testConductor.in │ │ │ ├── CMakeLists.txt │ │ │ ├── testConductor.out │ │ │ └── figure2.8.out │ │ ├── CMakeLists.txt │ │ ├── figure2.14-15 │ │ │ ├── testFunConductor.in │ │ │ ├── testFunConductor.out │ │ │ └── CMakeLists.txt │ │ └── figure2.4 │ │ │ └── CMakeLists.txt │ ├── chapter03 │ │ └── testIntegrableConductor.in │ ├── chapter08 │ │ ├── puppeteer_f2003 │ │ │ └── CMakeLists.txt │ │ └── puppeteer_cpp │ │ │ └── CMakeLists.txt │ ├── chapter07 │ │ ├── strategy_surrogate_f2003 │ │ │ └── CMakeLists.txt │ │ └── strategy_cpp │ │ │ └── CMakeLists.txt │ ├── chapter09 │ │ ├── burgers_factory_f2003 │ │ │ └── CMakeLists.txt │ │ └── burgers_factory_cpp │ │ │ └── CMakeLists.txt │ └── chapter12 │ │ └── Burgers_Trilinos_Factory_RCP_1D │ │ ├── configure_mpi │ │ └── configure_serial └── buildScripts │ ├── gnu-compilers-cmake.sh │ ├── intel-compilers-cmake.sh │ ├── ibm-compilers-cmake.sh │ ├── nag-compilers-cmake.sh │ └── cray-compilers-cmake.sh ├── pythonTools ├── newClass.pyc ├── testNewClass.py ├── interLanguage │ └── README ├── pytests │ ├── test_sample.py │ ├── test_assert1.py │ └── test_class.py ├── krugerTutorial │ ├── snippet8.py │ ├── snippet3.py │ ├── snippet1.py │ ├── snippet6.py │ ├── snippet5.py │ ├── snippet2.py │ ├── snippet4.py │ └── snippet7.py ├── checksum.py ├── printTableNodes.py ├── ffts │ └── simplefft.py ├── newClass.py ├── plotting │ └── plot_flux.py └── unitTests │ ├── test1.py │ └── README ├── tbb ├── run.matmul.tau.sh ├── func.build.mac.sh ├── run.tau.sh ├── run.sh ├── stampede.build.tau.link.sh ├── build.mac.sh ├── build.sh ├── run.tau.args.sh └── build.tau.link.sh ├── jumpingIntoC++ ├── myname.cpp ├── while.cpp ├── nonInit.cpp ├── string_name.cpp ├── incrementers1.cpp ├── cin1.cpp ├── non_negative.cpp ├── for.cpp ├── variable.cpp ├── password.cpp ├── waitForkey.cpp └── getLine.cpp ├── memoryUsage ├── memory.h ├── memory_parallel.h └── totVirtMem.cpp ├── FP_instr ├── fmla │ └── README └── testAvx │ └── testAvx.c ├── opencl_sample └── p3mgpu_test.py ├── appleScripts ├── findCalender.scpt └── findKids.inCaledar.scpt ├── configs └── openmpi_pgi_macosx_i5.sh ├── pthreads └── phello_world.c ├── memoryAccess └── CMakeLists.txt ├── fortranAccociate └── test.cce.sh ├── performance └── rdtsc.s └── compilerIssues └── component_type_mod.F90 /codingTests/fortran90/sort1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/fortran90/test1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/python/testout: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/cplusplus/File.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/fortran90/thefile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/scripting/test1/file1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/scripting/test2/file2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/scripting/test3/file3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/scripting/test4/file4: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/scripting/test5/file5: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/ifort_tests/lazyptr_test: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/test.f90: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripting/nohuping.sh: -------------------------------------------------------------------------------- 1 | ./writeloop.sh 2 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/doxygen_objdb_1090.tmp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg083.dta: -------------------------------------------------------------------------------- 1 | -1 -1 -1 1 2 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/progress.make: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg096.dta: -------------------------------------------------------------------------------- 1 | 3.0 3.0 3.0 1.0 1.0 -------------------------------------------------------------------------------- /codingTests/scons_tests/SConstruct: -------------------------------------------------------------------------------- 1 | Program('hello.c') 2 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/mac.set: -------------------------------------------------------------------------------- 1 | ?? alter: delete 2 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/whatsit/inc.inc: -------------------------------------------------------------------------------- 1 | yea yea 2 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Simple 2 | 3 | testing 4 | more text 5 | 6 | evn 7 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/inc.set: -------------------------------------------------------------------------------- 1 | ?? directory 'whatsit' 2 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/src/CMakeFiles/progress.make: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/test/CMakeFiles/progress.make: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /codingTests/scripting/bigLs.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | 4 | ls $* 5 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg115.dta: -------------------------------------------------------------------------------- 1 | 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 -------------------------------------------------------------------------------- /nagle1/Fortran-I/29-Input_Output/group.nml: -------------------------------------------------------------------------------- 1 | &values valid_flag = T / 2 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/ass.fpp: -------------------------------------------------------------------------------- 1 | ?? assert ( My Foo > Your Foo ) 2 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym1.fpp: -------------------------------------------------------------------------------- 1 | ?? integer :: one = 1 2 | ! ? 3 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/coco.set: -------------------------------------------------------------------------------- 1 | ?? alter: delete 2 | ?? number: off 3 | -------------------------------------------------------------------------------- /codingTests/fortran90/driveTP.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | int main(){ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /codingTests/fortran90/testcode.f90: -------------------------------------------------------------------------------- 1 | program test 2 | end program test 3 | 4 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/07-Characters/Characters.in: -------------------------------------------------------------------------------- 1 | I say, 2 | "Hello, World!" 3 | -------------------------------------------------------------------------------- /scripting/writeloop.out: -------------------------------------------------------------------------------- 1 | nohup: writeloop.sh: No such file or directory 2 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(figure1.4) 2 | -------------------------------------------------------------------------------- /codingTests/fortran90/simple.f90: -------------------------------------------------------------------------------- 1 | 2 | PROGRAM simple 3 | 4 | END 5 | -------------------------------------------------------------------------------- /codingTests/haskell/hello.hs: -------------------------------------------------------------------------------- 1 | 2 | main = putStrLn "Hello, World !" 3 | 4 | 5 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym.fpp: -------------------------------------------------------------------------------- 1 | ?? integer :: foo = 0 2 | what = ?foo? 3 | -------------------------------------------------------------------------------- /scripting/getOutputinVar.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | TEMP=`env | grep PATH` 4 | echo $TEMP 5 | -------------------------------------------------------------------------------- /codingTests/autotools/gnu_test/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src 2 | dist_doc_DATA = README 3 | -------------------------------------------------------------------------------- /codingTests/fortran90/conftest.f: -------------------------------------------------------------------------------- 1 | program main 2 | 3 | 4 | end 5 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/debug.set: -------------------------------------------------------------------------------- 1 | ?? logical :: debug = .false. 2 | ?? keys: {} 3 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/stdout.set: -------------------------------------------------------------------------------- 1 | ?? input 'foo.fpp' 2 | ?? integer :: jj = 11 3 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/stdin.set: -------------------------------------------------------------------------------- 1 | ?? output 'stdout.f90' 2 | ?? integer :: jj = 11 3 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter05/leak/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(leak main.F90 leak.F90) 2 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg065.dta: -------------------------------------------------------------------------------- 1 | 4.0 -1.0 1.0 2 | -1.0 4.25 2.75 3 | 1.0 2.75 3.5 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg066.dta: -------------------------------------------------------------------------------- 1 | 4.0 -1.0 1.0 2 | -1.0 4.25 2.75 3 | 1.0 2.75 3.5 -------------------------------------------------------------------------------- /codingTests/python/testin: -------------------------------------------------------------------------------- 1 | 2 | 3 | hello 4 | 5 | 6 | big dog 7 | 8 | why 9 | 10 | -------------------------------------------------------------------------------- /codingTests/scons_tests/hello.c: -------------------------------------------------------------------------------- 1 | int 2 | main() 3 | { 4 | printf("Hello World \n"); 5 | } 6 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym2.fpp: -------------------------------------------------------------------------------- 1 | ?? integer :: one = 1 2 | ?? integer :: two = 2 3 | ! ? 4 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg081.dta: -------------------------------------------------------------------------------- 1 | 1 -1 0.5 -0.16666666667 0.04166666667 -0.008333333333 0.001388888889 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg082.dta: -------------------------------------------------------------------------------- 1 | 2.532132 -1.130318 0.271495 -0.044337 0.005474 -0.000543 2 | 0 0 0 3 | -------------------------------------------------------------------------------- /codingTests/scripting/addzero.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | for f in *.mp3; do 4 | mv "$f" "0$f" 5 | done 6 | -------------------------------------------------------------------------------- /codingTests/testConfigures/conftest.c: -------------------------------------------------------------------------------- 1 | int main () 2 | { 3 | 4 | ; 5 | return 0; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /nagle2/Day-III/N1824.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/N1824.pdf -------------------------------------------------------------------------------- /pythonTools/newClass.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/pythonTools/newClass.pyc -------------------------------------------------------------------------------- /codingTests/bandf/code/alg036.dta: -------------------------------------------------------------------------------- 1 | 0 0 0.5 0.25 2 | 4 6 3.5 7 4.5 5 3 | 6 1 7 2 4 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg067.dta: -------------------------------------------------------------------------------- 1 | 2.0 2.0 2.0 2.0 2 | -1.0 -1.0 -1.0 3 | -1.0 -1.0 -1.0 4 | 1.0 0.0 0.0 1.0 -------------------------------------------------------------------------------- /codingTests/cCodes/alive1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cCodes/alive1 -------------------------------------------------------------------------------- /codingTests/cLang/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(int argc, char **argv) { printf("hello world\n"); } 3 | -------------------------------------------------------------------------------- /codingTests/languageInterop/testPointerAllocs/test.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM test 4 | 5 | 6 | 7 | END PROGRAM 8 | -------------------------------------------------------------------------------- /codingTests/macOSx/lt1/a.c: -------------------------------------------------------------------------------- 1 | int *g; 2 | //int *g=0; // This initialization allows for the library to work. 3 | -------------------------------------------------------------------------------- /nagle2/Day-I/01-Test/Test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/01-Test/Test -------------------------------------------------------------------------------- /scripting/writeloop.sh: -------------------------------------------------------------------------------- 1 | for i in 1 2 3 4 5 6 7 2 | 3 | do 4 | echo "$i" 5 | date >> file${i}.txt 6 | done 7 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg091.dta: -------------------------------------------------------------------------------- 1 | -4.0 14.0 0.0 2 | -5.0 13.0 0.0 3 | -1.0 0.0 2.0 4 | 1.0 1.0 1.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg092.dta: -------------------------------------------------------------------------------- 1 | 4.0 -1.0 1.0 2 | -1.0 3.0 -2.0 3 | 1.0 -2.0 3.0 4 | 1.0 0.0 0.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg093.dta: -------------------------------------------------------------------------------- 1 | -4.0 14.0 0.0 2 | -5.0 13.0 0.0 3 | -1.0 0.0 2.0 4 | 1.0 1.0 1.0 -------------------------------------------------------------------------------- /codingTests/cplusplus/testenv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cplusplus/testenv -------------------------------------------------------------------------------- /codingTests/fortran90/flushing.f90: -------------------------------------------------------------------------------- 1 | 2 | PROGRAM flushing 3 | 4 | CALL flush(6) 5 | 6 | END PROGRAM flushing 7 | -------------------------------------------------------------------------------- /codingTests/fortran90/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/hello -------------------------------------------------------------------------------- /codingTests/fortran90/hello1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/hello1 -------------------------------------------------------------------------------- /nagle1/Fortran-III/N1824.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/N1824.pdf -------------------------------------------------------------------------------- /nagle2/Day-I/03-Transition/rt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/03-Transition/rt -------------------------------------------------------------------------------- /nagle2/Day-I/09-new-types/aka: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/09-new-types/aka -------------------------------------------------------------------------------- /nagle2/Day-II/03-pthreads/hw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-II/03-pthreads/hw -------------------------------------------------------------------------------- /nagle2/Day-III/02-mctoy/mctoy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/02-mctoy/mctoy -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/names.set: -------------------------------------------------------------------------------- 1 | ?? input 'mac.fpp' 2 | ?? output 'mac.f90' 3 | ?? logical :: debug = .true. 4 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/coco: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/06-coco/coco -------------------------------------------------------------------------------- /codingTests/cplusplus/filewrite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cplusplus/filewrite -------------------------------------------------------------------------------- /nagle1/Fortran-I/09-Logicals/Logicals.in: -------------------------------------------------------------------------------- 1 | 55, 42 2 | 19, -101 3 | 456789, 987654 4 | -29, -31 5 | 22, 22 6 | 22, -22 7 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/10-Reals/Reals: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/10-Reals/Reals -------------------------------------------------------------------------------- /nagle1/Fortran-I/11-Reals/Reals: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/11-Reals/Reals -------------------------------------------------------------------------------- /nagle2/Day-I/06-dim=/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/06-dim=/Intrinsics -------------------------------------------------------------------------------- /nagle2/Day-I/09-new-types/coco: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/09-new-types/coco -------------------------------------------------------------------------------- /nagle2/Day-I/09-new-types/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/09-new-types/test -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Bugs/bug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/06-coco/Bugs/bug -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/inc.fpp: -------------------------------------------------------------------------------- 1 | ?? document 2 | ?? symbols 3 | ?? report 4 | ?? options 5 | ?? include 'inc.inc' 6 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/make_pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/06-coco/make_pm -------------------------------------------------------------------------------- /codingTests/bandf/code/alg031.dta: -------------------------------------------------------------------------------- 1 | 1.0 0.7651977 2 | 1.3 0.6200860 3 | 1.6 0.4554022 4 | 1.9 0.2818186 5 | 2.2 0.1103623 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg032.dta: -------------------------------------------------------------------------------- 1 | 1.0 0.7651977 2 | 1.3 0.6200860 3 | 1.6 0.4554022 4 | 1.9 0.2818186 5 | 2.2 0.1103623 -------------------------------------------------------------------------------- /codingTests/fortran90/misMatchDim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/misMatchDim -------------------------------------------------------------------------------- /codingTests/hdf5_stuff/sample-read: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/hdf5_stuff/sample-read -------------------------------------------------------------------------------- /codingTests/scripting/lists.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | test1="hello big more" 3 | for i in $test1 4 | do 5 | echo $i 6 | done 7 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/01-Array/Array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/01-Array/Array -------------------------------------------------------------------------------- /nagle1/Fortran-II/02-Array/Array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/02-Array/Array -------------------------------------------------------------------------------- /nagle1/Fortran-II/03-Array/Array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/03-Array/Array -------------------------------------------------------------------------------- /nagle1/Fortran-II/04-Array/Array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/04-Array/Array -------------------------------------------------------------------------------- /nagle1/Fortran-II/05-Array/Array: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/05-Array/Array -------------------------------------------------------------------------------- /nagle1/Fortran-III/nrRAL98060.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/nrRAL98060.pdf -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/01-Test/Test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/01-Test/Test -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/08-RNGs/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/08-RNGs/test -------------------------------------------------------------------------------- /nagle2/Day-I/02-Derivatives/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/02-Derivatives/test -------------------------------------------------------------------------------- /nagle2/Day-I/08-RNGs/find_primes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/08-RNGs/find_primes -------------------------------------------------------------------------------- /nagle2/Day-III/01-hello_world/hw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/01-hello_world/hw -------------------------------------------------------------------------------- /nagle2/Day-III/04-Digits-Home/md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-III/04-Digits-Home/md -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym3.fpp: -------------------------------------------------------------------------------- 1 | ?? integer :: one = 1 2 | ?? integer :: two = 2 3 | ?? integer :: three = 3 4 | ! ? 5 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg033.dta: -------------------------------------------------------------------------------- 1 | 1.3 0.6200860 -0.52202320 2 | 1.6 0.4554022 -0.56989590 3 | 1.9 0.2818186 -0.58115710 4 |  -------------------------------------------------------------------------------- /codingTests/bandf/code/alg073.dta: -------------------------------------------------------------------------------- 1 | 4.0 3.0 0.0 24.0 2 | 3.0 4.0 -1.0 30.0 3 | 0.0 -1.0 4.0 -24.0 4 | 1.0 1.0 1.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/programs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/bandf/code/programs.exe -------------------------------------------------------------------------------- /codingTests/fortran90/modAssign.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | module foo 4 | 5 | 6 | integer :: a = sin(3.) 7 | end module foo 8 | -------------------------------------------------------------------------------- /codingTests/fortran90/wtf.f90: -------------------------------------------------------------------------------- 1 | 2 | PROGRAM whatisgoingon 3 | 4 | WRITE(*,*) "hello world" 5 | 6 | 7 | END PROGRAM 8 | -------------------------------------------------------------------------------- /codingTests/hdf5_stuff/hdf5read.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/hdf5_stuff/hdf5read.zip -------------------------------------------------------------------------------- /nagle1/Fortran-I/12-Complex/Complex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/12-Complex/Complex -------------------------------------------------------------------------------- /nagle1/Fortran-I/Slides_2012_May.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/Slides_2012_May.pdf -------------------------------------------------------------------------------- /nagle1/Fortran-II/20-Modules/Module: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/20-Modules/Module -------------------------------------------------------------------------------- /nagle1/Fortran-II/21-Modules/Module: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/21-Modules/Module -------------------------------------------------------------------------------- /nagle1/Fortran-II/22-Modules/Module: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/22-Modules/Module -------------------------------------------------------------------------------- /nagle1/Fortran-II/23-Modules/Module: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/23-Modules/Module -------------------------------------------------------------------------------- /nagle1/Fortran-II/24-Modules/Module: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/24-Modules/Module -------------------------------------------------------------------------------- /nagle2/Day-I/04-Fibonacci/fibonacci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/04-Fibonacci/fibonacci -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/hang2.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: yourdebug=.false. 2 | ?? if( yourdebug )then 3 | ! all is well 4 | ?? else 5 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym1.f90: -------------------------------------------------------------------------------- 1 | !?>?? integer :: one = 1 2 | ! ? 3 | !?>?? This was produced using the following SET file 4 | -------------------------------------------------------------------------------- /scripting/loop2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for i in `seq 1 10`; 3 | do 4 | echo $i 5 | done 6 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter01/figure1.4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(figure1_4 main.F90 conduction.F90 kind_parameters.F90) 2 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter06/fortran_abstract_calculus/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(chaos main.F90 lorenz.F90 integrand.F90) 2 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/cpuNum.txt: -------------------------------------------------------------------------------- 1 | 1024 icc -c mycpu.c 2 | 1025 ls 3 | 1026 ftn -o omp_hello.f90 -openmp mycpu.o omp_hello.f90 4 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/html/tab_b.gif -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/html/tab_l.gif -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/html/tab_r.gif -------------------------------------------------------------------------------- /codingTests/fortran90/hello1.f90: -------------------------------------------------------------------------------- 1 | 2 | program hello 3 | 4 | 5 | 6 | write(*,*) "hello world" 7 | 8 | end program 9 | -------------------------------------------------------------------------------- /codingTests/fortran90/syntax.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | program test 4 | 5 | real::var1 6 | 7 | write(*,*) var1 8 | 9 | end program 10 | -------------------------------------------------------------------------------- /codingTests/hdf5_stuff/sample-file.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/hdf5_stuff/sample-file.h5 -------------------------------------------------------------------------------- /nagle1/Fortran-I/04-Integers/Integers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/04-Integers/Integers -------------------------------------------------------------------------------- /nagle1/Fortran-I/05-Integers/Integers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/05-Integers/Integers -------------------------------------------------------------------------------- /nagle1/Fortran-I/08-Logicals/Logicals: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/08-Logicals/Logicals -------------------------------------------------------------------------------- /nagle1/Fortran-I/09-Logicals/Logicals: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/09-Logicals/Logicals -------------------------------------------------------------------------------- /nagle1/Fortran-I/README.txt: -------------------------------------------------------------------------------- 1 | To make: 2 | 3 | $rm *.o 4 | make -f *.mk 5 | 6 | The files *,v are the version control tagged files. 7 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/14-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/14-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/15-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/15-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/16-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/16-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/17-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/17-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/18-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/18-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/19-Pointers/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/19-Pointers/Pointers -------------------------------------------------------------------------------- /nagle1/Fortran-II/39-Generics/Generics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/39-Generics/Generics -------------------------------------------------------------------------------- /nagle1/Fortran-II/40-Generics/Generics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/40-Generics/Generics -------------------------------------------------------------------------------- /nagle1/Fortran-II/41-Generics/Generics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/41-Generics/Generics -------------------------------------------------------------------------------- /nagle1/Fortran-II/Slides_2012_May.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/Slides_2012_May.pdf -------------------------------------------------------------------------------- /nagle1/Fortran-III/Slides_2012_May.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/Slides_2012_May.pdf -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/03-Transition/rt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/03-Transition/rt -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/06-dim=/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/06-dim=/Intrinsics -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/09-new-types/aka: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/09-new-types/aka -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/09-new-types/coco: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/09-new-types/coco -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/09-new-types/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/09-new-types/test -------------------------------------------------------------------------------- /nagle2/Day-I/05-rank_remapping/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/05-rank_remapping/Pointers -------------------------------------------------------------------------------- /nagle2/Day-I/09-new-types/typebool.f90: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/09-new-types/typebool.f90 -------------------------------------------------------------------------------- /nagle2/Day-II/01-Inheritance/iterator: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-II/01-Inheritance/iterator -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/foo.set: -------------------------------------------------------------------------------- 1 | ?? ! why do this? 2 | ?? alter: shift0 3 | ?? ! leave a trail 4 | ?? logical :: debug = .false. 5 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym.f90: -------------------------------------------------------------------------------- 1 | !?>?? integer :: foo = 0 2 | what = 0 3 | !?>?? This was produced using the following SET file 4 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(vortex_cpp) 2 | add_subdirectory(hermetic) 3 | add_subdirectory(leak) 4 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/html/doxygen.png -------------------------------------------------------------------------------- /nagle1/Fortran-I/06-Characters/Characters: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/06-Characters/Characters -------------------------------------------------------------------------------- /nagle1/Fortran-I/07-Characters/Characters: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/07-Characters/Characters -------------------------------------------------------------------------------- /nagle1/Fortran-I/14-Assignment/Assignment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/14-Assignment/Assignment -------------------------------------------------------------------------------- /nagle1/Fortran-I/15-Assignment/Assignment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/15-Assignment/Assignment -------------------------------------------------------------------------------- /nagle1/Fortran-I/16-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/16-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/17-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/17-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/18-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/18-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/19-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/19-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/20-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/20-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/21-Attributes/Attributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/21-Attributes/Attributes -------------------------------------------------------------------------------- /nagle1/Fortran-I/30-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/30-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-I/31-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/31-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-I/32-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/32-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-I/33-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/33-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/42-Operators/Operators: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/42-Operators/Operators -------------------------------------------------------------------------------- /nagle1/Fortran-II/43-Operators/Operators: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/43-Operators/Operators -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/02-Derivatives/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/02-Derivatives/test -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/08-RNGs/find_primes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/08-RNGs/find_primes -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/hang2.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: yourdebug=.false. 2 | !?>?? if( yourdebug )then 3 | !?>! all is well 4 | !?>?? else 5 | -------------------------------------------------------------------------------- /pythonTools/testNewClass.py: -------------------------------------------------------------------------------- 1 | #! /opt/local/bin/python 2 | 3 | import newClass 4 | 5 | sp=newClass.simplePrint() 6 | sp.what("hello") 7 | 8 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.8-11/figure2.8.in: -------------------------------------------------------------------------------- 1 | &physics alpha=1.,L_fin=1.,T_chip=1.,T_air=1. / 2 | &numerics dt=0.01,nodes=3 / 3 | -------------------------------------------------------------------------------- /codingTests/autotools/gnu_test/README: -------------------------------------------------------------------------------- 1 | This is a demonstration package for GNU Automake. 2 | Type 'info Automake' to read the Automake manual. 3 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg064.dta: -------------------------------------------------------------------------------- 1 | 6.0 2.0 1.0 -1.0 2 | 2.0 4.0 1.0 0.0 3 | 1.0 1.0 4.0 -1.0 4 | -1.0 0.0 -1.0 3.0 5 |  -------------------------------------------------------------------------------- /codingTests/bandf/code/alg094.dta: -------------------------------------------------------------------------------- 1 | -4.0 -1.0 1.0 2 | -1.0 3.0 -2.0 3 | 1.0 -2.0 3.0 4 | 1.0 -1.0 1.0 5 | 6.0 6 | 2.0 1.0 7 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg095.dta: -------------------------------------------------------------------------------- 1 | 4.0 1.0 -2.0 2.0 2 | 2.0 0.0 1.0 3 | 3.0 -2.0 4 | -1.0 -------------------------------------------------------------------------------- /codingTests/cplusplus/g++Build.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | g++ testStructVec.cpp -lboost_system -o testStructVec -DVEC -lboost_timer -g 4 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/latex/FreeSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/latex/FreeSans.ttf -------------------------------------------------------------------------------- /codingTests/fortran90/testWriteArrayGrouped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/testWriteArrayGrouped -------------------------------------------------------------------------------- /codingTests/fortran90/testWriteArrayLooped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/testWriteArrayLooped -------------------------------------------------------------------------------- /codingTests/fortran90/testWriteArrayStraight: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/testWriteArrayStraight -------------------------------------------------------------------------------- /codingTests/fortran90/testWriteArrayStraigth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/fortran90/testWriteArrayStraigth -------------------------------------------------------------------------------- /codingTests/hdf5_stuff/sample-file.txt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/hdf5_stuff/sample-file.txt.zip -------------------------------------------------------------------------------- /codingTests/languageInterop/alexExample/tm_definer_bar_mod_api.h: -------------------------------------------------------------------------------- 1 | #define TmGetBar_typeString FC_FUNC(tmgetbar_typestring,TMGETBAR_TYPESTRING) 2 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/01-Hello_World/Hello_World: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/01-Hello_World/Hello_World -------------------------------------------------------------------------------- /nagle1/Fortran-I/02-Hello_World/Hello_World: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/02-Hello_World/Hello_World -------------------------------------------------------------------------------- /nagle1/Fortran-I/03-Hello_World/Hello_World: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/03-Hello_World/Hello_World -------------------------------------------------------------------------------- /nagle1/Fortran-I/22-Executables/Executables: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/22-Executables/Executables -------------------------------------------------------------------------------- /nagle1/Fortran-I/23-Executables/Executables: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/23-Executables/Executables -------------------------------------------------------------------------------- /nagle1/Fortran-I/24-Executables/Executables: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/24-Executables/Executables -------------------------------------------------------------------------------- /nagle1/Fortran-II/25-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/25-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/26-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/26-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/27-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/27-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/28-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/28-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/29-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/29-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/30-Procedures/Procedures: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/30-Procedures/Procedures -------------------------------------------------------------------------------- /nagle1/Fortran-II/31-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/31-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/32-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/32-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/33-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/33-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/34-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/34-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/35-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/35-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/36-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/36-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/37-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/37-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-II/38-Intrinsics/Intrinsics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/38-Intrinsics/Intrinsics -------------------------------------------------------------------------------- /nagle1/Fortran-III/02-Himeno/f90_xp_mpi.lzh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/02-Himeno/f90_xp_mpi.lzh -------------------------------------------------------------------------------- /nagle1/Fortran-III/02-Himeno/f90_xp_omp.lzh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/02-Himeno/f90_xp_omp.lzh -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/04-Fibonacci/fibonacci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/04-Fibonacci/fibonacci -------------------------------------------------------------------------------- /nagle2/Day-I/07-move_alloc/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I/07-move_alloc/Array_Intrinsic -------------------------------------------------------------------------------- /pythonTools/interLanguage/README: -------------------------------------------------------------------------------- 1 | gcc -shared -o code.so 2 | python driver.py 3 | 4 | simple linking....doesn't do anything...yet. 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripting/loop3.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | 4 | for ((i=1;i<=100;i++)); 5 | do 6 | # your-unix-command-here 7 | echo $i 8 | done 9 | -------------------------------------------------------------------------------- /tbb/run.matmul.tau.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/opt/apps/papi/5.5.0/lib:$LD_LIBRARY_PATH 2 | tau_exec -T knl_17,icpc,papi,mpi,tbb ./matmul.tau.exe 3 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(figure2.4) 2 | add_subdirectory(figure2.8-11) 3 | add_subdirectory(figure2.14-15) 4 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.14-15/testFunConductor.in: -------------------------------------------------------------------------------- 1 | &physics alpha=1.,L_fin=1.,T_chip=1.,T_air=0. / 2 | &numerics dt=0.01,nodes=3 / 3 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.8-11/testConductor.in: -------------------------------------------------------------------------------- 1 | &physics alpha=1.,L_fin=1.,T_chip=1.,T_air=1. / 2 | &numerics dt=0.01,nodes=3 / 3 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg074.dta: -------------------------------------------------------------------------------- 1 | 3.333 15920 -10.333 15913 2 | 2.222 16.71 9.612 28.544 3 | 1.5611 5.1791 1.6852 8.4254 4 |  -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/graph_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/doxygen-test/html/graph_legend.png -------------------------------------------------------------------------------- /jumpingIntoC++/myname.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main() { 5 | 6 | std::cout << "My name is Srinath Vadlamani \n"; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/25-Input_Output/Input_Output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/25-Input_Output/Input_Output -------------------------------------------------------------------------------- /nagle1/Fortran-I/26-Input_Output/Input_Output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/26-Input_Output/Input_Output -------------------------------------------------------------------------------- /nagle1/Fortran-I/27-Input_Output/Input_Output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/27-Input_Output/Input_Output -------------------------------------------------------------------------------- /nagle1/Fortran-I/28-Input_Output/Input_Output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/28-Input_Output/Input_Output -------------------------------------------------------------------------------- /nagle1/Fortran-I/29-Input_Output/Input_Output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/29-Input_Output/Input_Output -------------------------------------------------------------------------------- /nagle1/Fortran-III/01-Hello_World/Hello_World: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-III/01-Hello_World/Hello_World -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/09-new-types/typebool.f90: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/09-new-types/typebool.f90 -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Top-level Cmakelist.txt 2 | PROJECT(HELLO) 3 | 4 | ADD_SUBDIRECTORY(src) 5 | ADD_SUBDIRECTORY(test) 6 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/html/formula.repository: -------------------------------------------------------------------------------- 1 | \form#0:\[ 34 \int \] 2 | \form#1:\[ 2 + 3 \] 3 | \form#2:\[ 2 + 3 \chi \] 4 | \form#3:$ \chi + \alpha $ 5 | -------------------------------------------------------------------------------- /codingTests/fortran90/testpointer.f90: -------------------------------------------------------------------------------- 1 | 2 | module testPointer_mod 3 | 4 | 5 | REAL, POINTER :: test1 6 | 7 | 8 | END MODULE 9 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/08-Logicals/Logicals.in: -------------------------------------------------------------------------------- 1 | both are true T T 2 | left is true T F 3 | right is true F T 4 | both are false F F 5 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/13-Derived_Types/Derived_Types: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-I/13-Derived_Types/Derived_Types -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/05-rank_remapping/Pointers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/05-rank_remapping/Pointers -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/hang.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: mydebug=.false. 2 | !?>?? if( mydebug )then 3 | !?>! all is well 4 | !?>?? else 5 | !?>?? endfile 6 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/hang.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: mydebug=.false. 2 | ?? if( mydebug )then 3 | ! all is well 4 | ?? else 5 | ?? endfile 6 | ?? endif 7 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg061.dta: -------------------------------------------------------------------------------- 1 | 1.0 -1.0 2.0 -1.0 -8.0 2 | 2.0 -2.0 3.0 -3.0 -20.0 3 | 1.0 1.0 1.0 0.0 -2.0 4 | 1.0 -1.0 4.0 3.0 4.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg062.dta: -------------------------------------------------------------------------------- 1 | 1.0 -1.0 2.0 -1.0 -8.0 2 | 2.0 -2.0 3.0 -3.0 -20.0 3 | 1.0 1.0 1.0 0.0 -2.0 4 | 1.0 -1.0 4.0 3.0 4.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg063.dta: -------------------------------------------------------------------------------- 1 | 1.0 -1.0 2.0 -1.0 -8.0 2 | 2.0 -2.0 3.0 -3.0 -20.0 3 | 1.0 1.0 1.0 0.0 -2.0 4 | 1.0 -1.0 4.0 3.0 4.0 -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cMakeStuff/CMakeFiles/CompilerIdC/a.out -------------------------------------------------------------------------------- /codingTests/fortran90/hello.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM hello 4 | IMPLICIT NONE 5 | 6 | WRITE(*,*) "HELLO WORLD" 7 | 8 | 9 | END PROGRAM hello 10 | -------------------------------------------------------------------------------- /codingTests/languageInterop/testPointerAllocs/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/languageInterop/testPointerAllocs/a.out -------------------------------------------------------------------------------- /codingTests/languageInterop/testPointerAllocs/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/languageInterop/testPointerAllocs/test -------------------------------------------------------------------------------- /memoryUsage/memory.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int get_memory_usage_kb(long* vmrss_kb, long* vmsize_kb); 6 | 7 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/07-move_alloc/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle2/Day-I-2/Day-I/07-move_alloc/Array_Intrinsic -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym2.f90: -------------------------------------------------------------------------------- 1 | !?>?? integer :: one = 1 2 | !?>?? integer :: two = 2 3 | ! ? 4 | !?>?? This was produced using the following SET file 5 | -------------------------------------------------------------------------------- /pythonTools/pytests/test_sample.py: -------------------------------------------------------------------------------- 1 | # content of test_sample.py 2 | def func(x): 3 | return x + 1 4 | 5 | def test_answer(): 6 | assert func(3) == 5 7 | -------------------------------------------------------------------------------- /scripting/sequence.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Bash version ${BASH_VERSION}..." 3 | for i in $(seq 1 2 20) 4 | do 5 | echo "Welcome $i times" 6 | done 7 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter01/figure1.4/figure1.4.in: -------------------------------------------------------------------------------- 1 | &physics 2 | alpha=1.,L_fin=1.,T_chip=1.,T_air=1. 3 | / 4 | &numerics 5 | dt=0.01,nodes=9 6 | / 7 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cMakeStuff/CMakeFiles/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /codingTests/python/helloMpi.py: -------------------------------------------------------------------------------- 1 | #hello.py 2 | from mpi4py import MPI 3 | comm = MPI.COMM_WORLD 4 | rank = comm.Get_rank() 5 | print "hello world from process ", rank 6 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/06-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/06-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/07-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/07-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/08-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/08-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/09-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/09-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/10-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/10-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/11-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/11-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/12-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/12-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle1/Fortran-II/13-Array_Intrinsic/Array_Intrinsic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/nagle1/Fortran-II/13-Array_Intrinsic/Array_Intrinsic -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/nest.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: doit = .true. 2 | !?>?? if( doit )then 3 | !?>?? text :: what 4 | !?>?? else if( what if this works )then 5 | -------------------------------------------------------------------------------- /FP_instr/fmla/README: -------------------------------------------------------------------------------- 1 | These fmla type of tests were created by george.steed@arm.com 2 | 3 | EX compile: gcc test.s -nostdlib -static 4 | EX run/test: perf stat ./a.out 5 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter03/testIntegrableConductor.in: -------------------------------------------------------------------------------- 1 | &physics alpha=1.,L_fin=1.,T_chip=1.,T_air=0. / 2 | &numerics dt=0.01,nodes=3 / 3 | &test_suite scheme=1/ 4 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter05/vortex_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../../chapter06/common_cpp/) 2 | add_executable(superfluid_cpp main.cpp vortex.cpp ) 3 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter08/puppeteer_f2003/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(weather main.F90 atmosphere.F90 air.F90 cloud.F90 ground.F90 global_parameters.F90) 2 | -------------------------------------------------------------------------------- /codingTests/cCodes/alive1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | printf( "I am alive! Beware.\n" ); 6 | getchar(); 7 | return 0; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /codingTests/makes/Makefile: -------------------------------------------------------------------------------- 1 | list= hello goodbye 2 | all: 3 | for i in $(list) ;\ 4 | do \ 5 | echo $${i};\ 6 | done 7 | foo=asdf ;\ 8 | echo $$foo 9 | 10 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/key.fpp: -------------------------------------------------------------------------------- 1 | ?? macro,parens :: hypot( x, y) = sqrt( {x}*{x}+{y}*{y}) 2 | ! z = {hypot}( 42 + 17, Snafu - Fubar) 3 | ?? document 4 | ?? options 5 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/next.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: doit = .true. 2 | !?>?? if( doit )then 3 | !?>?? text :: what 4 | !?>?? else 5 | !?>?? end text what 6 | !?>?? end if 7 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet8.py: -------------------------------------------------------------------------------- 1 | import tables 2 | hf=tables.openFile('dataFile1.h5','r') 3 | newx1=hf.root.x1.read() 4 | newy1=hf.root.y1.read() 5 | hf.close() 6 | -------------------------------------------------------------------------------- /codingTests/scripting/underscore.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | for f in *; do # turn all spaces into underscores 4 | mv \"$f\" `echo \"$f\" | tr [:space:] _` 5 | done 6 | 7 | -------------------------------------------------------------------------------- /pythonTools/pytests/test_assert1.py: -------------------------------------------------------------------------------- 1 | # content of test_assert1.py 2 | def f(): 3 | return 3 4 | 5 | def test_function(): 6 | assert f() == 5 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /codingTests/ifort_tests/lazyptr_test.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM lazyptr 4 | 5 | IMPLICIT NONE 6 | 7 | CALL test1sub 8 | END PROGRAM 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /codingTests/scripting/scr_test4file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e bashing.sh ] 4 | then 5 | echo "bashing.sh not exists" 6 | else 7 | echo "bashing.sh is here" 8 | fi 9 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter06/semidiscrete_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../../chapter06/common_cpp/) 2 | add_executable(chaos_cpp main.cpp lorenz.cpp integrand.cpp) 3 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/src/hello.cc: -------------------------------------------------------------------------------- 1 | #include "hello.h" 2 | #include 3 | 4 | void Hello:: Print(){ 5 | std::cout << "Hello, World!" << std::endl; 6 | } 7 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/temp_build/thisconfig.sh: -------------------------------------------------------------------------------- 1 | rm -rf CMake* 2 | 3 | CC=mpiicc CXX=mpiicpc \ 4 | cmake \ 5 | /work/02463/srinathv/Coding-Examples/codingTests/cMakeStuff/helloProj 6 | -------------------------------------------------------------------------------- /codingTests/fortran90/foobarbaz_mod.f90: -------------------------------------------------------------------------------- 1 | 2 | MODULE foobarbaz 3 | IMPLICIT NONE 4 | 5 | REAL:: foo 6 | REAL:: bar 7 | REAL:: baz 8 | 9 | END MODULE 10 | 11 | -------------------------------------------------------------------------------- /nagle2/Day-III/01-hello_world/hw.mk: -------------------------------------------------------------------------------- 1 | FC=ifort 2 | 3 | FCFLAGS=-std -warn all -check all -coarray 4 | 5 | hw: hello_world.f90 6 | ${FC} ${FCFLAGS} hello_world.f90 ${LIBS} -o hw 7 | 8 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/make_pm.in: -------------------------------------------------------------------------------- 1 | &files incname="coco.inc" / 2 | 3 | &sw stderr = 0, 4 | com_vers = "gfortran 4.6", 5 | com_sern = "GPL", 6 | os_vers = "Mac OS X 10.7" / 7 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/step2.PID.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # this is to test to append a file that has the same PID 4 | 5 | echo "Step2 added this line for PID =", $$ >> steps_$$.txt 6 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cMakeStuff/CMakeFiles/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /codingTests/ifort_tests/lazyptrTest/lazyptr_test.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM lazyptr 4 | 5 | IMPLICIT NONE 6 | 7 | CALL test1sub 8 | END PROGRAM 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /codingTests/scripting/multiRuns.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | for (( i=1;i<=5;i++ )) 4 | do 5 | echo `mkdir test$i` 6 | cd test$i 7 | touch file$i 8 | cd .. 9 | done 10 | -------------------------------------------------------------------------------- /codingTests/scripting/underscoreAndlowercase.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | for f in *; do 4 | file=$(echo $f | tr A-Z a-z | tr ' ' _) 5 | [ ! -f $file ] && mv "$f" $file 6 | done 7 | 8 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/sym3.f90: -------------------------------------------------------------------------------- 1 | !?>?? integer :: one = 1 2 | !?>?? integer :: two = 2 3 | !?>?? integer :: three = 3 4 | ! ? 5 | !?>?? This was produced using the following SET file 6 | -------------------------------------------------------------------------------- /opencl_sample/p3mgpu_test.py: -------------------------------------------------------------------------------- 1 | import newp3m 2 | 3 | mySim=newp3m.N2Sim() 4 | mySim.set_nptcls(2**10) 5 | mySim.init_ptcls() 6 | mySim.initialize_opencl() 7 | mySim.calc_radii_gpu() 8 | 9 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet3.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | s=numpy.arange(10) 3 | t=numpy.zeros( [2,20], numpy.int) 4 | t[0,:]=numpy.arange(20) 5 | t[1,5:15]=s 6 | print t.shape 7 | print t 8 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg034.dta: -------------------------------------------------------------------------------- 1 | 0.00000000 1.00000000 2 | 0.25000000 1.64872127 3 | 0.50000000 2.71828183 4 | 0.75000000 4.48168907 5 | 1.00000000 7.38905610 6 |  -------------------------------------------------------------------------------- /codingTests/bandf/code/alg035.dta: -------------------------------------------------------------------------------- 1 | 0.00000000 1.00000000 2 | 0.25000000 1.64872127 3 | 0.50000000 2.71828183 4 | 0.75000000 4.48168907 5 | 1.00000000 7.38905610 6 |  -------------------------------------------------------------------------------- /codingTests/bandf/code/alg071.dta: -------------------------------------------------------------------------------- 1 | 10.0 -1.0 2.0 0.0 6.0 2 | -1.0 11.0 -1.0 3.0 25.0 3 | 2.0 -1.0 10.0 -1.0 -11.0 4 | 0.0 3.0 -1.0 8.0 15.0 5 | 0.0 0.0 0.0 0.0 -------------------------------------------------------------------------------- /codingTests/bandf/code/alg072.dta: -------------------------------------------------------------------------------- 1 | 10.0 -1.0 2.0 0.0 6.0 2 | -1.0 11.0 -1.0 3.0 25.0 3 | 2.0 -1.0 10.0 -1.0 -11.0 4 | 0.0 3.0 -1.0 8.0 15.0 5 | 0.0 0.0 0.0 0.0 -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/cMakeStuff/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/test/testHello.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "hello.h" 4 | 5 | int main(){ 6 | Hello().Print(); 7 | return 0; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /appleScripts/findCalender.scpt: -------------------------------------------------------------------------------- 1 | tell application "Calendar" 2 | set theCalendarName to "Co-parenting Schedule" 3 | set theCalendar to first calendar where its name = theCalendarName 4 | end tell 5 | -------------------------------------------------------------------------------- /codingTests/fortran90/test3.F: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM test3 4 | 5 | REAL :: x 6 | INTEGER :: y=10 7 | 8 | x=DBLE(y) 9 | 10 | 11 | END PROGRAM 12 | -------------------------------------------------------------------------------- /codingTests/macOSx/lt1/m.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void foo(); 4 | extern int *g; 5 | 6 | int main() { 7 | foo(); 8 | printf("in main: g = %d\n", *g); 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/step1_mpiRank.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | 4 | #rank=`mpiRank` 5 | echo ${rank} 6 | echo "This is the rank of this process = ${rank} in step 1 " > steps_"${rank}".txt 7 | exit 8 | -------------------------------------------------------------------------------- /codingTests/fortran90/tkind.F90: -------------------------------------------------------------------------------- 1 | 2 | program main 3 | 4 | real :: xi 5 | complex :: zi 6 | 7 | xi= 1.D0 8 | zi= (1.D0, -1.D0) 9 | 10 | write(*,*) xi 11 | write(*,*) zi 12 | 13 | end program 14 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/nest.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: doit = .true. 2 | ?? if( doit )then 3 | ?? text :: what 4 | ?? else if( what if this works )then 5 | ?? end text what 6 | ?? end if 7 | ?? copy :: what 8 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/src/CmakeLists.txt: -------------------------------------------------------------------------------- 1 | # CmakeLists.txt in Hello dir 2 | # Adds a library called Hello (libHello.a under Linux) from the source file hello.cc 3 | ADD_LIBRARY( Hello hello ) 4 | 5 | -------------------------------------------------------------------------------- /codingTests/macOSx/lt1/b.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | extern int *g; 4 | void foo() { 5 | g = malloc(sizeof(int)); 6 | *g = 10; 7 | printf("in b: g = %d\n", *g); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /tbb/func.build.mac.sh: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/bash 2 | mpic++ -D__USE_FUNC mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_mm.func.exe 3 | mpic++ -D__USE_TBB -D__USE_FUNC mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.func.exe 4 | -------------------------------------------------------------------------------- /codingTests/cplusplus/wrt_out.txt: -------------------------------------------------------------------------------- 1 | delta t = 0.1 2 | T[0] = 0 3 | T[1] = 2.3 4 | T[2] = 4.6 5 | T[3] = 6.9 6 | T[4] = 9.2 7 | T[5] = 11.5 8 | T[6] = 13.8 9 | T[7] = 16.1 10 | T[8] = 18.4 11 | T[9] = 20.7 12 | -------------------------------------------------------------------------------- /codingTests/languageInterop/alexExample/bigWrap.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | 4 | import sys, os, re, time, math 5 | 6 | 7 | arguments=sys.argv[1:] 8 | print sys.argv[1], sys.argv[2] 9 | 10 | 11 | -------------------------------------------------------------------------------- /codingTests/openmp/mycpu.c: -------------------------------------------------------------------------------- 1 | //#include 2 | #include 3 | int sched_getcpu(); 4 | 5 | int findmycpu_ () 6 | { 7 | int cpu; 8 | cpu = sched_getcpu(); 9 | return cpu; 10 | } 11 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/if.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: debug = .false. 2 | ?? if( debug )then 3 | ! one 4 | ?? elseif( debug .or. .not. debug )then 5 | ! ok 6 | ?? else 7 | ! never 8 | ?? end if 9 | ?? symbols 10 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/step2_mpiRank.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | echo "in Step 2" 4 | #rank=`mpiRank` 5 | echo ${rank} 6 | echo "This is the rank of this process = ${rank} in step 2 " >> steps_"${rank}".txt 7 | exit 8 | -------------------------------------------------------------------------------- /jumpingIntoC++/while.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main () { 4 | int i = 0; // always declare variables 5 | while (i < 10 ) { 6 | std::cout << i << '\n'; 7 | i++; //increment i 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /scripting/searchList.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #want a script that will 4 | #1)produce a number of files with ..test 5 | #2)gather list of n's 6 | #3)run an operation over the list of n' (cp or something) 7 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter07/strategy_surrogate_f2003/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(timed_lorenz main.F90 integrand.F90 lorenz.F90 timed_lorenz.F90 surrogate.F90 strategy.F90 explicit_euler.F90 runge_kutta_2nd.F90) 2 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter08/puppeteer_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../../chapter06/common_cpp/) 2 | add_executable(weather_cpp main.cpp integrand.cpp atmosphere.cpp air.cpp cloud.cpp ground.cpp mat.cpp) 3 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/helloProj/src/hello.h: -------------------------------------------------------------------------------- 1 | 2 | #indef_hello_h 3 | #define_hello_h 4 | 5 | class Hello { 6 | public: 7 | void Print(); 8 | }; 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text4.fpp: -------------------------------------------------------------------------------- 1 | ?? text :: foo 2 | ! yea, foo! 3 | ?? end text foo 4 | ! 5 | ?? copy :: foo 6 | ?? text :: bar 7 | ! ho, bar! 8 | ?? end text bar 9 | 10 | ?? copy :: bar 11 | ?? document 12 | -------------------------------------------------------------------------------- /codingTests/autotools/gnu_test/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int 5 | main (void) 6 | { 7 | puts ("Hello World!"); 8 | puts ("This is " PACKAGE_STRING "."); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /codingTests/fortran2003/shapeprg.f03: -------------------------------------------------------------------------------- 1 | program shape_prg 2 | use shape_mod 3 | type(shape) :: sh 4 | logical filled 5 | sh = constructor(5, .true., 100, 200) 6 | call sh%print() 7 | end 8 | -------------------------------------------------------------------------------- /codingTests/languageInterop/testPointerAllocs/test.dSYM/Contents/Resources/DWARF/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/languageInterop/testPointerAllocs/test.dSYM/Contents/Resources/DWARF/test -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text3.fpp: -------------------------------------------------------------------------------- 1 | ?? text :: doit( what, how) 2 | call Fubar( ?what?, ?how?) 3 | ?? end text doit 4 | ?? copy :: doit( Snafu, Bohica) 5 | ??copy :: doit( or2, Bohica) 6 | ?? text :: null 7 | ?? end text null 8 | -------------------------------------------------------------------------------- /pythonTools/checksum.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | 3 | dirList=os.listdir(os.getcwd()) 4 | for fname in dirList: 5 | os.system('md5 '+fname) 6 | os.system('openssl sha1 '+fname) 7 | os.system('openssl rmd160 '+fname) 8 | 9 | -------------------------------------------------------------------------------- /scripting/nohup.out: -------------------------------------------------------------------------------- 1 | nohup: writeloop.sh: No such file or directory 2 | -n 1 3 | 4 | -n 2 5 | 6 | -n 3 7 | 8 | -n 4 9 | 10 | -n 5 11 | 12 | -n 6 13 | 14 | -n 7 15 | 16 | 1 17 | 2 18 | 3 19 | 4 20 | 5 21 | 6 22 | 7 23 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/step1.PID.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # this is to test to write to a file named by PID 4 | 5 | echo "This program shows the PIDs of each process" 6 | 7 | echo $$, " is the PID of a rank" > steps_$$.txt 8 | -------------------------------------------------------------------------------- /codingTests/fortran90/testComment.F: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM comment 4 | IMPLICIT NONE 5 | 6 | WRITE(*,*) "This works" 7 | 1 WRITE(*,*) "This works" 8 | 9 | 10 | 11 | END PROGRAM 12 | -------------------------------------------------------------------------------- /codingTests/languageInterop/testPointerAllocs/a.out.dSYM/Contents/Resources/DWARF/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srinathv/Coding-Examples/HEAD/codingTests/languageInterop/testPointerAllocs/a.out.dSYM/Contents/Resources/DWARF/a.out -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/foo.f: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | ! Business as usual. ! foo.fpp: 10 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter07/strategy_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../../chapter06/common_cpp/) 2 | add_executable(timed_lorenz_cpp explicit_euler.cpp integrand.cpp lorenz.cpp main.cpp runge_kutta_2nd.cpp timed_lorenz.cpp) 3 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter09/burgers_factory_f2003/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(burgers main.F90 field.F90 field_factory.F90 periodic_6th_factory.F90 periodic_6th_order.F90 matrix.F90 ../../chapter01/figure1.4/kind_parameters.F90) 2 | -------------------------------------------------------------------------------- /codingTests/cplusplus/testThreads.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() { 5 | unsigned int n = std::thread::hardware_concurrency(); 6 | std::cout << n << " concurrent threads are supported.\n"; 7 | } 8 | -------------------------------------------------------------------------------- /pythonTools/printTableNodes.py: -------------------------------------------------------------------------------- 1 | #! /opt/local/bin/python 2 | 3 | import tables 4 | 5 | 6 | timefile=tables.openFile('out.gyro.timedata.h5') 7 | planefile=tables.openFile('gyro00000.h5') 8 | 9 | print planefile 10 | print timefile 11 | -------------------------------------------------------------------------------- /codingTests/cplusplus/run100.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | 4 | trials=100 5 | rm -f testVec.out 6 | for i in `seq 1 ${trials}`; 7 | do 8 | # echo $i 9 | ./${1} >> testVec.out 10 | sleep 1 11 | done 12 | -------------------------------------------------------------------------------- /jumpingIntoC++/nonInit.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int main() { 5 | 6 | int x; 7 | int y; 8 | 9 | y=2; 10 | 11 | std::cout << "x+y+5 = "<< x+y+5 << std::endl; 12 | 13 | //on mac os x seams to always give back 7 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.8-11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable( testConductor 2 | main.F90 conductor.F90 differentiator.F90 problem.F90 3 | ../../chapter01/figure1.4/kind_parameters.F90 ../../chapter01/figure1.4/conduction.F90 4 | ) 5 | 6 | -------------------------------------------------------------------------------- /codingTests/fortran90/testOrDefine.F90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM testOrDefine 4 | 5 | 6 | #if defined(HAVE_A) || defined(HAVE_B) 7 | write(*,*) "IN A or B" 8 | #else 9 | write(*,*) "not in A or B" 10 | #endif 11 | 12 | END PROGRAM testOrDefine 13 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/steps.PID.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | #run the step<>.PID.sh files 4 | 5 | 6 | step1.PID.sh 7 | step2.PID.sh 8 | 9 | echo "the number of output files shows that bash creates each line if possible in different processes." 10 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.8-11/testConductor.out: -------------------------------------------------------------------------------- 1 | initial temperature = 1.00 1.00 1.00 1.00 1.00 2 | final temperature = 1.00 1.00 1.00 1.00 1.00 3 | |dT/dt|=0.000E+00<1.000E-06 4 | In main: test passed. :) 5 | -------------------------------------------------------------------------------- /codingTests/fortran90/testDsind.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | program testDsind 4 | 5 | USE degree_trig 6 | implicit none 7 | real(8) :: angle 8 | 9 | 10 | 11 | angle = 45. 12 | write(*,*) dsind(angle) 13 | 14 | 15 | 16 | 17 | end program testDsind 18 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.14-15/testFunConductor.out: -------------------------------------------------------------------------------- 1 | initial temperature = 1.0 0.75 0.50 0.25 0.0 2 | final temperature = 1.0 0.75 0.50 0.25 0.0 3 | |dT/dt|=0.000E+00<1.000E-06 4 | In main: test passed. :) 5 | -------------------------------------------------------------------------------- /codingTests/autotools/gnu_test/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([amhello], [1.0], [bug-automake@gnu.org]) 2 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 3 | AC_PROG_CC 4 | AC_CONFIG_HEADERS([config.h]) 5 | AC_CONFIG_FILES([ 6 | Makefile 7 | src/Makefile 8 | ]) 9 | AC_OUTPUT 10 | -------------------------------------------------------------------------------- /codingTests/fortran90/lenarray.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | program main 4 | 5 | integer, DIMENSION(5) :: array 6 | integer, DIMENSION(5,6) :: array2 7 | 8 | 9 | write(*,*) SIZE(array) 10 | write(*,*) SIZE(array2) 11 | 12 | end program 13 | -------------------------------------------------------------------------------- /memoryUsage/memory_parallel.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int get_cluster_memory_usage_kb(long* vmrss_per_process, long* vmsize_per_process, int root, int np); 5 | int get_global_memory_usage_kb(long* global_vmrss, long* global_vmsize, int np); 6 | 7 | -------------------------------------------------------------------------------- /nagle2/Day-II/03-pthreads/size.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | printf( "int: %d\n", sizeof( int)); 6 | printf( "pthread: %d\n", sizeof(pthread_t)); 7 | printf( "pthread key: %d\n", sizeof(pthread_key_t)); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /pythonTools/pytests/test_class.py: -------------------------------------------------------------------------------- 1 | # content of test_class.py 2 | class TestClass: 3 | def test_one(self): 4 | x = "this" 5 | assert 'h' in x 6 | 7 | def test_two(self): 8 | x = "hello" 9 | assert hasattr(x, 'check') 10 | 11 | -------------------------------------------------------------------------------- /codingTests/fortran90/modAndSub.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | module foo 4 | implicit none 5 | 6 | integer :: fooBar 7 | 8 | end module foo 9 | 10 | subroutine bar 11 | use foo 12 | implicit none 13 | 14 | 15 | fooBar =3 16 | 17 | end subroutine bar 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /codingTests/python/testFunc.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # undesterding passing of integers in to a function what is to be returned 4 | 5 | #foo: take an int and add 3 to it 6 | def foo(int1=0): 7 | return int1+3 8 | 9 | 10 | bar=4 11 | bar2=foo(bar) 12 | print bar,bar2 13 | 14 | 15 | -------------------------------------------------------------------------------- /jumpingIntoC++/string_name.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int main() { 6 | 7 | std::string name; 8 | 9 | std::cout << " Enter your name "; 10 | std::cin >> name; 11 | 12 | std::cout << " Your name is " << name << std::endl; 13 | } 14 | -------------------------------------------------------------------------------- /nagle2/Day-III/02-mctoy/mctoy.mk: -------------------------------------------------------------------------------- 1 | #FC=ifort 2 | # 3 | #FCFLAGS=-std -warn all -check all -coarray 4 | 5 | FC=gfortran-mp-4.7 6 | 7 | FCFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 8 | 9 | 10 | mctoy: mctoy.f90 11 | ${FC} ${FCFLAGS} mctoy.f90 ${LIBS} -o mctoy 12 | -------------------------------------------------------------------------------- /codingTests/fortran90/modulos.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM testmodulo 4 | IMPLICIT NONE 5 | 6 | INTEGER :: step, time 7 | 8 | write(*,*) modulo(7,INT(0+.1)) 9 | 10 | 11 | step=0 12 | time=0 13 | 14 | write(*,*) modulo(step,time) 15 | 16 | 17 | END PROGRAM testmodulo 18 | -------------------------------------------------------------------------------- /codingTests/cplusplus/testBoostTimer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | boost::timer::auto_cpu_timer t; 7 | 8 | for (long i = 0; i < 100000000; ++i) 9 | std::sqrt(123.456L); // burn some time 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /tbb/run.tau.sh: -------------------------------------------------------------------------------- 1 | 2 | #TAU_PROFILE_FORMAT=merged 3 | #ibrun tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.tauLink.knl.exe 4 | export LD_LIBRARY_PATH=/opt/apps/papi/5.5.0/lib:$LD_LIBRARY_PATH 5 | ibrun -n 2 -o 0 tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.tauLink.knl.tau.exe 6 | 7 | 8 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/ass.f90: -------------------------------------------------------------------------------- 1 | !?>?? assert ( My Foo > Your Foo ) 2 | if( .not. ( My Foo > Your Foo ) )then 3 | write( unit= *, fmt= *) "assertion failed: ass.fpp: 1: " // "( My Foo > Your Foo )" 4 | stop "assertion failed" 5 | end if 6 | !?>?? This was produced using the following SET file 7 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/if.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: debug = .false. 2 | !?>?? if( debug )then 3 | !?>! one 4 | !?>?? elseif( debug .or. .not. debug )then 5 | ! ok 6 | !?>?? else 7 | !?>! never 8 | !?>?? end if 9 | !?>?? symbols 10 | !?>?? This was produced using the following SET file 11 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet1.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | x=numpy.arange(10) 3 | type(x) 4 | x.dtype 5 | # Create periodic grid 6 | xp=numpy.arange(10)*2*numpy.pi/9 7 | print xp 8 | xp.dtype 9 | # Create numpy array via an operation on existing array 10 | y=numpy.sin(x) 11 | type(y) 12 | 13 | -------------------------------------------------------------------------------- /jumpingIntoC++/incrementers1.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main() { 5 | 6 | int x = 0; 7 | int y = 0; 8 | 9 | std::cout << " want to see what happens with x++ = " << x++ <<"\n"; 10 | 11 | std::cout << " want to see what happens with ++y = " << ++y <<"\n"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tbb/run.sh: -------------------------------------------------------------------------------- 1 | 2 | #TAU_PROFILE_FORMAT=merged 3 | #ibrun tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.tauLink.knl.exe 4 | 5 | if [ -z "$1" ] 6 | then 7 | ibrun -n 2 -o 0 ./mpi_tbb_mm.argsThread.knl.exe 8 | else 9 | ibrun -n 2 -o 0 ./mpi_tbb_mm.argsThread.knl.exe -threads $1 10 | fi 11 | -------------------------------------------------------------------------------- /tbb/stampede.build.tau.link.sh: -------------------------------------------------------------------------------- 1 | export TAU_MAKEFILE=/work/02463/srinathv/tau2/x86_64/lib/Makefile.tau-mvapich4_10-icpc-papi-mpi-tbb 2 | source /opt/apps/intel/15/composer_xe_2015.2.164/tbb/bin/tbbvars.sh intel64 3 | 4 | tau_cxx.sh -optLinkOnly -D__USE_TAU mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.tauLink 5 | -------------------------------------------------------------------------------- /codingTests/fortran90/test2.F90: -------------------------------------------------------------------------------- 1 | 2 | PROGRAM test2 3 | 4 | real :: a= 10. 5 | 6 | #if defined(HAVE_A) || defined(HAVE_B) 7 | write(*,*) "in the if block" 8 | #endif 9 | 10 | WRITE(6,*) "HELLO WORLD" 11 | WRITE(6,*) "log of 10 is ", LOG(a) 12 | 13 | END PROGRAM test2 14 | -------------------------------------------------------------------------------- /codingTests/gpuStuff/Makefile: -------------------------------------------------------------------------------- 1 | Test: fortest.f95 cudaTest2.o 2 | gfortran -lstdc++ -L /usr/local/cuda/lib -I /usr/local/cuda/include -lcudart -lcuda fortest.f95 cudaTest2.o -o forCuda 3 | cudaTest2.o: cudaTest2.cu 4 | nvcc -c -O3 -m64 cudaTest2.cu 5 | clean: 6 | rm a.out cudaTest2.o cudaTest2.linkinfo 7 | -------------------------------------------------------------------------------- /configs/openmpi_pgi_macosx_i5.sh: -------------------------------------------------------------------------------- 1 | ./configure \ 2 | --prefix=/Users/srinathv/software/ompi/pgi \ 3 | FC=pgfortran \ 4 | FCFLAGS='-tp= nehalem-64' \ 5 | F77=pgfortran \ 6 | FFLAGS='-tp= nehalem-64' \ 7 | CC=pgcc \ 8 | CFLAGS='-tp= nehalem-64' \ 9 | CXX=pgcpp \ 10 | CXXFLAGS='-tp= nehalem-64' 11 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/collect.f90: -------------------------------------------------------------------------------- 1 | !?>?? logical :: mydebug=.false. 2 | !?>?? if( mydebug )then 3 | !?>! all is well 4 | !?>?? else 5 | !?>?? endfile 6 | !?>?? End of file - now processing hang2.fpp 7 | !?>?? logical :: yourdebug=.false. 8 | !?>?? if( yourdebug )then 9 | !?>! all is well 10 | !?>?? else 11 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet6.py: -------------------------------------------------------------------------------- 1 | from matplotlib import pylab 2 | import numpy 3 | rdArray=pylab.loadtxt('dataFile1.txt',comments='x1') 4 | rdArray.shape 5 | x1=rdArray[:,0] 6 | y1=rdArray[:,1] 7 | x2=rdArray[:,2] 8 | y2=rdArray[:,3] 9 | from plotExamples import * 10 | makeXyPlot(x1,y1,x2,y2) 11 | 12 | 13 | -------------------------------------------------------------------------------- /codingTests/CMake/build-test/runCmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if false ; then 4 | echo "if false" 5 | else 6 | rm -rf CMake* 7 | /home/srivad01/software/cmake/882ba7/gnu/7.2/bin/cmake ../. 8 | if [ $? ]; then 9 | echo "exit status is NOT 0 " 10 | else 11 | echo "exist status is 0" 12 | fi 13 | fi 14 | -------------------------------------------------------------------------------- /jumpingIntoC++/cin1.cpp: -------------------------------------------------------------------------------- 1 | 2 | /*program to show simple cin use */ 3 | 4 | #include 5 | 6 | int main () { 7 | 8 | int thisisanumber ; 9 | 10 | std::cout << "Please enter a number: "; 11 | std::cin >> thisisanumber ; 12 | std::cout << " You entered: " << thisisanumber << "\n"; 13 | } 14 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.14-15/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable( testFunConductor 2 | main.F90 fun_conductor.F90 3 | ../../chapter01/figure1.4/kind_parameters.F90 ../../chapter01/figure1.4/conduction.F90 4 | ../figure2.8-11/conductor.F90 ../figure2.8-11/differentiator.F90 ../figure2.8-11/problem.F90 5 | ) 6 | -------------------------------------------------------------------------------- /codingTests/cplusplus/ifDefines.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | 5 | #if defined(MACRO1) || defined(MACRO2) 6 | #define TESTMACRO 7 | #endif 8 | 9 | int main() { 10 | #if defined(TESTMACRO) 11 | cout << "TESTMACRO on" << endl; 12 | #else 13 | cout << "TESTMACRO off" << endl; 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /codingTests/fortran90/indexArrays.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM indexArray 4 | 5 | REAL,DIMENSION(:),ALLOCATABLE :: a 6 | INTEGER :: i 7 | 8 | 9 | ALLOCATE(a(0:10)) 10 | DO i=0,10 11 | a(i)=i 12 | ENDDO 13 | 14 | WRITE(*,*) a(:) 15 | WRITE(*,*) a(0:10) 16 | 17 | DEALLOCATE(a) 18 | END PROGRAM indexArray 19 | -------------------------------------------------------------------------------- /pythonTools/ffts/simplefft.py: -------------------------------------------------------------------------------- 1 | from scipy import * 2 | a = zeros(1000) 3 | b = fft(a) 4 | plot(abs(b)) 5 | from pylab import * 6 | plot(abs(b)) 7 | b 8 | a[:100]=1 9 | a 10 | b = fft(a) 11 | plot(abs(b)) 12 | _ip.magic("history ") 13 | _ip.magic("history -help") 14 | #?history 15 | _ip.magic("history -n -f simplefft.py") 16 | -------------------------------------------------------------------------------- /codingTests/fortran90/testBools.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | PROGRAM testBools 4 | 5 | 6 | LOGICAL :: a, b, c, d 7 | 8 | 9 | a=.true. 10 | 11 | b= .true. 12 | 13 | d = a .and. b 14 | c = (a .and. b) 15 | 16 | IF(c) write(*,*) "C is true" 17 | IF(d) write(*,*) "D is true" 18 | 19 | 20 | END PROGRAM 21 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/document.inc: -------------------------------------------------------------------------------- 1 | ! 2 | ! Preprocessor executed: ?date? ?time? 3 | ! 4 | ! Preprocessor command line: ?cmdline? 5 | ! Preprocessor set file: ?setfile? 6 | ! Preprocessor log file: ?logfile? 7 | ! Preprocessor version: 8 | ! ?coco? 9 | ! 10 | ! Source file: ?file? line: ?line? 11 | ! Compile file: ?output? 12 | ! 13 | -------------------------------------------------------------------------------- /codingTests/scripting/catExpandVar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #does cat bash expand variables: 4 | 5 | 6 | foo="hello" 7 | 8 | echo $foo 9 | 10 | echo "$foo" 11 | 12 | cat>foo.txt< 3 | 4 | int main() { 5 | 6 | int num; 7 | std::cout << "Enter a number: "; 8 | std::cin >> num; 9 | if (num < 0 ) { 10 | std::cout << " You entered a negative number \n"; 11 | } 12 | else { 13 | std::cout << " You entered a non-negative number \n"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /codingTests/scripting/cshell/stringContains.sh: -------------------------------------------------------------------------------- 1 | #! /bin/csh -f 2 | 3 | set COMPILER1 = intel 4 | set COMPILER2 = intelmic 5 | 6 | echo "COMPILER1 = $COMPILER1" 7 | echo "COMPILER2 = $COMPILER2" 8 | 9 | set word = 'mic' 10 | if ($COMPILER1:q =~ *$word:q*) echo "COMPILER1 has mic in it" 11 | if ($COMPILER2:q =~ *$word:q*) echo "COMPILER2 has mic in it" 12 | -------------------------------------------------------------------------------- /memoryUsage/totVirtMem.cpp: -------------------------------------------------------------------------------- 1 | #include "sys/types.h" 2 | #include "sys/sysinfo.h" 3 | 4 | struct sysinfo memInfo; 5 | 6 | sysinfo (&memInfo); 7 | long long totalVirtualMem = memInfo.totalram; 8 | //Add other values in next statement to avoid int overflow on right hand side... 9 | totalVirtualMem += memInfo.totalswap; 10 | totalVirtualMem *= memInfo.mem_unit; -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/makefile: -------------------------------------------------------------------------------- 1 | #FC=gfortran -c 2 | #FC=ifort -c 3 | FC=nagfor -c 4 | 5 | #FFLAGS=-std=f2008 -Wall -fcheck=all 6 | #FFLAGS=-std -warn all -check all 7 | FFLAGS=-f2008 -w=all -C=all 8 | 9 | #LD=gfortran 10 | #LD=ifort 11 | LD=nagfor 12 | 13 | coco: coco.o 14 | ${LD} coco.o -o coco 15 | 16 | coco.o: coco.f90 17 | ${FC} ${FFLAGS} coco.f90 18 | -------------------------------------------------------------------------------- /codingTests/fortran90/nameIfLoop.f90: -------------------------------------------------------------------------------- 1 | 2 | program nameIfLoop 3 | IMPLICIT NONE 4 | 5 | integer:: i,j 6 | 7 | i=3 8 | 9 | ifName: if (i>2) then 10 | write(*,*) "in if " 11 | endif ifName 12 | 13 | 14 | doName: do j=1,4 15 | write(*,*) " j is now =" ,j 16 | enddo doName 17 | 18 | 19 | 20 | 21 | end program nameIfLoop 22 | -------------------------------------------------------------------------------- /jumpingIntoC++/for.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main () { 4 | // The loop goes while i < 10, increasing i by one each loop 5 | for ( int i = 0 ; i < 10 ; i++ ) { 6 | // The condition is checked each loop 7 | // When i equals 10, then the loop breaks. 8 | std::cout << i << " squared is " << i * i << std::endl ; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /codingTests/fortran90/intArray.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | program intArray 4 | 5 | 6 | INTEGER :: TheInt 7 | 8 | INTEGER, DIMENSION(1) :: TheIntArray 9 | 10 | 11 | 12 | TheInt=4 13 | 14 | 15 | TheIntArray = TheInt 16 | 17 | 18 | write(*,*) Size(TheIntArray) 19 | write(*,*) Size(TheIntArray,1) 20 | 21 | 22 | 23 | end program 24 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/coreId.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | #pragma omp parallel 7 | { 8 | int thread_num = omp_get_thread_num(); 9 | int cpu_num = findmycpu_(); 10 | printf("Thread %3d is running on CPU %3d\n", thread_num, cpu_num); 11 | } 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /codingTests/openmp/coreId.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | #pragma omp parallel 7 | { 8 | int thread_num = omp_get_thread_num(); 9 | int cpu_num = sched_getcpu(); 10 | printf("Thread %3d is running on CPU %3d\n", thread_num, cpu_num); 11 | } 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Bugs/type.f90: -------------------------------------------------------------------------------- 1 | program bugger 2 | 3 | type :: thingo_t 4 | end type thingo_t 5 | 6 | type, extends( thingo_t) :: sonofthingo_t 7 | end type sonofthingo_t 8 | 9 | class( thingo_t), pointer :: pt 10 | 11 | continue 12 | 13 | select type( pt) 14 | type in( sonofthingo_t) 15 | end select 16 | 17 | stop 'whew!' 18 | 19 | end program bugger 20 | -------------------------------------------------------------------------------- /nagle2/Day-II/03-pthreads/hw.mk: -------------------------------------------------------------------------------- 1 | FC=gfortran -c 2 | 3 | FCFLAGS=-std=f2008 -Wall -fcheck=all -pthread 4 | 5 | LD=gfortran 6 | 7 | LDFLAGS=${FCFLAGS} 8 | 9 | LIBS=-lpthread 10 | 11 | hw: pthread.o hw.o 12 | ${LD} ${LDFLAGS} hw.o pthread.o ${LIBS} -o hw 13 | 14 | pthread.o: pthread.f90 15 | ${FC} ${FCFLAGS} pthread.f90 16 | 17 | hw.o: hw.f90 18 | ${FC} ${FCFLAGS} hw.f90 19 | -------------------------------------------------------------------------------- /tbb/build.mac.sh: -------------------------------------------------------------------------------- 1 | 2 | mpic++ -D__USE_TBB -D__LIKE_GRAVIT mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.argsThread.knl.exe 3 | mpic++ -D__USE_TBB mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.knl.exe 4 | mpic++ -D__USE_TBB -D__USE_CLASS mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.class.knl.exe 5 | mpic++ mpi_tbb_mm.cpp -std=c++0x -o mpi_mm.knl.exe 6 | icpc matmul.cpp -tbb -o matmul.exe 7 | -------------------------------------------------------------------------------- /pthreads/phello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * hello ( ) 4 | { 5 | printf ( " Hello World from pthread ! \ n" ) ; 6 | return NULL ; 7 | } 8 | 9 | void main ( ) 10 | { 11 | pthread_t thread ; 12 | 13 | pthread_create(&thread , NULL, &hello , NULL ) ; 14 | 15 | printf ( " Hello World from main ! \ n" ) ; 16 | 17 | pthread_join ( thread , NULL ) ; 18 | } 19 | -------------------------------------------------------------------------------- /memoryAccess/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | 4 | enable_language(Fortran) 5 | 6 | 7 | add_executable( cMemoryOrder 8 | print_array_values.c 9 | cMemoryOrder.c ) 10 | 11 | add_executable ( fortranMemoryOrder 12 | print_array_values.c 13 | fortranMemoryOrder.f ) 14 | 15 | set (CMAKE_C_COMPILER gcc) 16 | set (CMAKE_FORTRAN_COMPILER gfortran) 17 | -------------------------------------------------------------------------------- /tbb/build.sh: -------------------------------------------------------------------------------- 1 | 2 | mpiicpc -D__USE_TBB -D__LIKE_GRAVIT mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.argsThread.knl.exe 3 | mpiicpc -D__USE_TBB mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.knl.exe 4 | mpiicpc mpi_tbb_mm.cpp -std=c++0x -o mpi_mm.knl.exe 5 | icpc matmul.cpp -tbb -o matmul.exe 6 | icc -D__USE_TBB -D__USE_TBB_FUNC -D__LIKE_GRAVIT tbb_mm.cpp -tbb -std=c++11 -o tbb_tbb_mm.args.func.exe 7 | -------------------------------------------------------------------------------- /codingTests/boost/uuid/uuid.cpp: -------------------------------------------------------------------------------- 1 | #include // uuid class 2 | #include // generators 3 | #include // streaming operators etc. 4 | #include 5 | 6 | int main() { 7 | boost::uuids::uuid uuid = boost::uuids::random_generator()(); 8 | std::cout << uuid << std::endl; 9 | } 10 | -------------------------------------------------------------------------------- /fortranAccociate/test.cce.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # 3 | # 4 | # 5 | # 6 | listOfCce=' cce/14.0.4 cce/15.0.1 cce/16.0.0 cce/16.0.1 cce/17.0.0 cce/17.0.1 cce/17.0.1.1' 7 | 8 | for cce in $listOfCce 9 | do 10 | ml load $cce 11 | echo $cce 12 | exeName=testAssociate.${cce/\//_} 13 | echo $exeName 14 | ftn -g -O0 testAssociate.f90 -o $exeName 15 | 16 | done 17 | -------------------------------------------------------------------------------- /jumpingIntoC++/variable.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int main() { 5 | 6 | int input; 7 | 8 | std::cout << "Enter in a number :"; 9 | std::cin >> input; 10 | 11 | if (input < 10) { 12 | std::cout << "You entered a number less than 10 " << std::endl; 13 | } 14 | else{ 15 | std::cout << "You entered a number greater than 10 " << std::endl; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter09/burgers_factory_cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(../../chapter06/common_cpp/) 2 | include_directories(../../appendixA/) 3 | include_directories(../../chapter08/puppeteer_cpp/) 4 | 5 | add_executable(burgers_cpp main.cpp periodic_6th_factory.cpp periodic_6th_order.cpp initializer.cpp ../../appendixA/gaussian_elimination.cpp ../../chapter08/puppeteer_cpp/mat.cpp) 6 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/mpiRank_steps.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | #call mpi_rank number grabber 4 | #run step_1_mpiRank.sh <--- file will ">" to mpiRank_<>.txt with rank number 5 | #run step_2_mpiRank.sh <-- file will append to mpiRank_<>.txt with rank number in another sentence 6 | 7 | rank=`mpiRank` 8 | 9 | #source step1_mpiRank.sh 10 | source step2_mpiRank.sh 11 | 12 | #echo "Finished" 13 | -------------------------------------------------------------------------------- /codingTests/fortran90/sdot.f90: -------------------------------------------------------------------------------- 1 | program dot_main 2 | real x(10), y(10), sdot, res 3 | integer n, incx, incy, i 4 | external sdot 5 | n = 5 6 | incx = 2 7 | incy = 1 8 | do i = 1, 10 9 | x(i) = 2.0e0 10 | y(i) = 1.0e0 11 | end do 12 | res = sdot (n, x, incx, y, incy) 13 | print *, 'SDOT = ', res 14 | end 15 | 16 | 17 | !on mac os x: $gfortran sdot.f90 -L/usr/local/opt/lapack/lib -lblas -o sdot.exe -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet5.py: -------------------------------------------------------------------------------- 1 | from matplotlib import pylab 2 | import numpy 3 | # 2D line plot 4 | r=4. 5 | t=numpy.arange(20)*2*numpy.pi/(20-1) 6 | x=r*numpy.cos(t) 7 | y=r*numpy.sin(t) 8 | pylab.plot(x,y) 9 | pylab.axis('equal') 10 | pylab.show() 11 | # Contour plot 12 | xg,yg=numpy.meshgrid(t,t) 13 | z=numpy.cos(xg)*numpy.sin(yg) 14 | print z.shape 15 | pylab.imshow(z) 16 | pylab.show() 17 | -------------------------------------------------------------------------------- /codingTests/hdf5_stuff/sample-file.out: -------------------------------------------------------------------------------- 1 | npixels = 68 2 | ValueRangeMin= 164.3572 3 | SensingStartTime=2008-02-01T23:09:40.984 4 | FittingNumberOfIterations(1,7),(2,8)= 7 14 5 | ViewMode(1)=Nominal 6 | Time - Day (7): 21215 7 | Time - MillisecondOfDay (7): 83416983 8 | Time FillValue - MillisecondOfDay: 0 9 | SatellitePosition - X: 6866.035 10 | -------------------------------------------------------------------------------- /codingTests/python/edge_mod.F90: -------------------------------------------------------------------------------- 1 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 2 | 3 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 4 | 5 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 6 | 7 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 8 | 9 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 10 | 11 | #if defined(ELEMENT_OPENMP) || defined(NESTED_OPENMP) 12 | 13 | -------------------------------------------------------------------------------- /nagle2/Day-I/09-new-types/test_boolean.f90: -------------------------------------------------------------------------------- 1 | 2 | ! test type boolean 3 | 4 | program test_boolean 5 | 6 | use :: type_boolean 7 | 8 | type( boolean_t) :: a 9 | 10 | real :: r 11 | 12 | integer :: i 13 | 14 | continue 15 | 16 | read( unit= *, fmt= *) r 17 | 18 | a = r 19 | 20 | i = a 21 | 22 | write( unit= *, fmt= *) i 23 | 24 | stop 'normal exit' 25 | 26 | end program test_boolean 27 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text3.f90: -------------------------------------------------------------------------------- 1 | !?>?? text :: doit( what, how) 2 | !?>call Fubar( ?what?, ?how?) 3 | !?>?? end text doit 4 | !?>?? copy :: doit( Snafu, Bohica) 5 | !?>?? ! text doit 6 | call Fubar( Snafu, Bohica) 7 | !?>?? ! end text doit 8 | !?>??copy :: doit( or2, Bohica) 9 | !?>?? ! text doit 10 | call Fubar( or2, Bohica) 11 | !?>?? ! end text doit 12 | !?>?? text :: null 13 | !?>?? end text null 14 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet2.py: -------------------------------------------------------------------------------- 1 | # Create x as a list and then convert 2 | from snippet1 import * 3 | xlist=range(10) 4 | type(xlist) 5 | x=numpy.array(xlist) 6 | type(x) 7 | x.dtype 8 | # Create an empty array and fill it. Note that default is double so 9 | # don't really need it here, but good for illustration 10 | yp=numpy.zeros([10],numpy.double) 11 | for i in range(10): yp[i]=numpy.cos(xp[i]) 12 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.8-11/figure2.8.out: -------------------------------------------------------------------------------- 1 | initial temperature = 1.00000000000000000 1.00000000000000000 2 | 1.00000000000000000 1.00000000000000000 1.00000000000000000 3 | final temperature = 1.00000000000000000 1.00000000000000000 4 | 1.00000000000000000 1.00000000000000000 1.00000000000000000 5 | derivative 0.000000000000000000E+00 < 0.999999997475242708E-06 6 | In main: test passed. :) 7 | -------------------------------------------------------------------------------- /codingTests/cplusplus/buildSimpleClassPdt.sh: -------------------------------------------------------------------------------- 1 | export PATH=/opt/apps/gcc/4.9.1/bin:$PATH 2 | export LD_LIBRARY_PATH=/opt/apps/gcc/4.9.1/lib:/opt/apps/gcc/4.9.1/lib64:$LD_LIBRARY_PATH 3 | export TAU_MAKEFILE=/work/02463/srinathv/maverick/tau-2.25/x86_64/lib/Makefile.tau-intel15-pdt3_21-TEST-icpc-papi-mpi-pthread-pdt 4 | TAU_OPTIONS="-optPdtCxxParser=cxxparse4101 -optKeepFiles" 5 | tau_cxx.sh simpleClass.cpp -o simpleClass 6 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/09-new-types/test_boolean.f90: -------------------------------------------------------------------------------- 1 | 2 | ! test type boolean 3 | 4 | program test_boolean 5 | 6 | use :: type_boolean 7 | 8 | type( boolean_t) :: a 9 | 10 | real :: r 11 | 12 | integer :: i 13 | 14 | continue 15 | 16 | read( unit= *, fmt= *) r 17 | 18 | a = r 19 | 20 | i = a 21 | 22 | write( unit= *, fmt= *) i 23 | 24 | stop 'normal exit' 25 | 26 | end program test_boolean 27 | -------------------------------------------------------------------------------- /codingTests/cplusplus/filewrite.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | 9 | ofstream File("File.txt"); 10 | string array[10]; 11 | 12 | 13 | for (int x = 0; x <= 9; x++) 14 | { 15 | cout<< x <<" Enter a string:"<> array[x]; 17 | File<< array[x] << ", "; 18 | cout<>>>>>> b8bf7aa809d731542480932529bd28e9f1a30499 17 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet4.py: -------------------------------------------------------------------------------- 1 | from matplotlib import pylab 2 | from snippet2 import * 3 | pylab.plot(x,y) 4 | pylab.show() 5 | xaxmin=x.min(); xaxmax=x.max(); yaxmin=1.2*y.min(); yaxmax=1.2*y.max() 6 | pylab.axis([xaxmin,xaxmax,yaxmin,yaxmax]) 7 | pylab.xlabel(" X (m) ") 8 | pylab.ylabel(" Signal (eV) ") 9 | pylab.plot(x,y) 10 | pylab.plot(xp,yp,marker="+", linestyle="-", color="red",ms=10) 11 | pylab.show() 12 | 13 | -------------------------------------------------------------------------------- /codingTests/cplusplus/buildSimpleClassOneLinePdt.sh: -------------------------------------------------------------------------------- 1 | export PATH=/opt/apps/gcc/4.9.1/bin:$PATH 2 | export LD_LIBRARY_PATH=/opt/apps/gcc/4.9.1/lib:/opt/apps/gcc/4.9.1/lib64:$LD_LIBRARY_PATH 3 | export TAU_MAKEFILE=/work/02463/srinathv/maverick/tau-2.25/x86_64/lib/Makefile.tau-intel15-pdt3_21-TEST-icpc-papi-mpi-pthread-pdt 4 | TAU_OPTIONS="-optPdtCxxParser=cxxparse4101 -optKeepFiles" 5 | tau_cxx.sh simpleClassOneLine.cpp -o simpleClassOneLine 6 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/stdout.f90: -------------------------------------------------------------------------------- 1 | !?>?? integer :: a = 4, b = 5 2 | !?>?? logical :: debug = .false. 3 | !?>?? symbols 4 | !?>?? message a+b, a-b, a*b, a/b, a\b 5 | !?>9 -1 20 0 4 6 | !?>?? if( debug )then 7 | !?>! I'm debugging now! 8 | !?>?? else 9 | ! Business as usual. 10 | !?>?? end if 11 | !?>?? symbols 12 | !?>?? This was produced using the following SET file 13 | !?>?? output 'stdout.f90' 14 | !?>?? integer :: jj = 11 15 | -------------------------------------------------------------------------------- /codingTests/macOSx/lt1/README: -------------------------------------------------------------------------------- 1 | 2 | Mon Apr 25 12:57:34 MDT 2011 3 | This directory will hold a simple autool project to 4 | help understand how libtool on the Mac OS X works with ranlib. 5 | Particularly, we want to: 6 | 7 | 1) build a library 8 | 2) add to another library 9 | 3) link to an executable 10 | 4) all while using common global symbols. 11 | 12 | gcc -c a.c b.c; rm -rf libab.a a.out; ar -q libab.a a.o b.o; gcc m.c libab.a 13 | -------------------------------------------------------------------------------- /Rouson_examples/buildScripts/gnu-compilers-cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SSD_PATH=../ssdSource 3 | EXTRA_ARGS=$@ 4 | 5 | rm -f CMakeCache.txt 6 | cmake \ 7 | -D CMAKE_BUILD_TYPE:STRING=DEBUG \ 8 | -D CMAKE_CXX_COMPILER:FILEPATH=g++ \ 9 | -D CMAKE_Fortran_COMPILER:FILEPATH=gfortran \ 10 | -D CMAKE_Fortran_FLAGS:STRING="-g" \ 11 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \ 12 | -D ALL_EXAMPLES_ENABLED:BOOL=OFF \ 13 | $EXTRA_ARGS \ 14 | $SSD_PATH 15 | -------------------------------------------------------------------------------- /Rouson_examples/buildScripts/intel-compilers-cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SSD_PATH=../ssdSource 3 | EXTRA_ARGS=$@ 4 | 5 | rm -f CMakeCache.txt 6 | cmake \ 7 | -D CMAKE_BUILD_TYPE:STRING=DEBUG \ 8 | -D CMAKE_CXX_COMPILER:FILEPATH=iCC \ 9 | -D CMAKE_Fortran_COMPILER:FILEPATH=ifort \ 10 | -D CMAKE_Fortran_FLAGS:STRING="-g" \ 11 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \ 12 | -D ALL_EXAMPLES_ENABLED:BOOL=OFF \ 13 | $EXTRA_ARGS \ 14 | $SSD_PATH 15 | -------------------------------------------------------------------------------- /codingTests/cplusplus/testenv.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char** argv) { 6 | std::string type, name("what"), foo(""); 7 | 8 | type = "your mom"; 9 | foo = "why is this broken?"; 10 | 11 | std::cout << type << " " << foo << std::endl; 12 | 13 | std::ostringstream lol; 14 | 15 | lol << type << " " << name; 16 | std::cout << lol.str(); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /codingTests/fortran2003/testgetarg.f03: -------------------------------------------------------------------------------- 1 | PROGRAM test_get_command_argument 2 | INTEGER :: i 3 | CHARACTER(len=32) :: arg 4 | 5 | i = 0 6 | DO 7 | CALL get_command_argument(i, arg) 8 | IF (LEN_TRIM(arg) == 0) EXIT 9 | 10 | WRITE (*,*) TRIM(arg) 11 | i = i+1 12 | END DO 13 | END PROGRAM 14 | 15 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: debug = .false. 2 | ?? integer :: counter = 0 3 | ??text :: foo 4 | ?? counter = counter + 1 5 | ?? message 'this is appearance: ', counter 6 | ! ?counter? 7 | ?? if( debug )then 8 | ! what? me worry! 9 | ?? else 10 | ! just do it 11 | ?? end if 12 | ?? end text foo 13 | ?? document 14 | ! copy this 15 | ?? copy :: foo 16 | ?? debug = .true. 17 | ?? copy :: foo 18 | ?? copy :: foo 19 | ??symbols 20 | -------------------------------------------------------------------------------- /tbb/run.tau.args.sh: -------------------------------------------------------------------------------- 1 | 2 | #TAU_PROFILE_FORMAT=merged 3 | #ibrun tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.tauLink.knl.exe 4 | export LD_LIBRARY_PATH=/opt/apps/papi/5.5.0/lib:$LD_LIBRARY_PATH 5 | if [ -z "$1" ] 6 | then 7 | ibrun -n 2 -o 0 tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.argsThread.knl.tau.exe 8 | else 9 | ibrun -n 2 -o 0 tau_exec -T knl_17,icpc,papi,mpi,tbb ./mpi_tbb_mm.argsThread.knl.tau.exe -threads $1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /Rouson_examples/buildScripts/ibm-compilers-cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SSD_PATH=../ssdSource 3 | EXTRA_ARGS=$@ 4 | 5 | rm -f CMakeCache.txt 6 | cmake \ 7 | -D CMAKE_BUILD_TYPE:STRING=DEBUG \ 8 | -D CMAKE_CXX_COMPILER:FILEPATH=xlc++ \ 9 | -D CMAKE_Fortran_COMPILER:FILEPATH=xlf2003 \ 10 | -D CMAKE_Fortran_FLAGS:STRING="-g -lessl" \ 11 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \ 12 | -D ALL_EXAMPLES_ENABLED:BOOL=OFF \ 13 | $EXTRA_ARGS \ 14 | $SSD_PATH 15 | -------------------------------------------------------------------------------- /Rouson_examples/buildScripts/nag-compilers-cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SSD_PATH=../ssdSource 3 | EXTRA_ARGS=$@ 4 | 5 | rm -f CMakeCache.txt 6 | cmake \ 7 | -D CMAKE_BUILD_TYPE:STRING=DEBUG \ 8 | -D CMAKE_CXX_COMPILER:FILEPATH=g++ \ 9 | -D CMAKE_Fortran_COMPILER:FILEPATH=nagfor \ 10 | -D CMAKE_Fortran_FLAGS:STRING="-f2003 -g -C=all" \ 11 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ 12 | -D ALL_EXAMPLES_ENABLED:BOOL=OFF \ 13 | $EXTRA_ARGS \ 14 | $SSD_PATH 15 | -------------------------------------------------------------------------------- /codingTests/cMakeStuff/CMakeFiles/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | 2 | 3 | SET(CMAKE_SYSTEM "Darwin-9.7.0") 4 | SET(CMAKE_SYSTEM_NAME "Darwin") 5 | SET(CMAKE_SYSTEM_VERSION "9.7.0") 6 | SET(CMAKE_SYSTEM_PROCESSOR "i386") 7 | 8 | SET(CMAKE_HOST_SYSTEM "Darwin-9.7.0") 9 | SET(CMAKE_HOST_SYSTEM_NAME "Darwin") 10 | SET(CMAKE_HOST_SYSTEM_VERSION "9.7.0") 11 | SET(CMAKE_HOST_SYSTEM_PROCESSOR "i386") 12 | 13 | SET(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | SET(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /nagle2/Day-II/01-Inheritance/iterator.mk: -------------------------------------------------------------------------------- 1 | FC=gfortran -c 2 | #FC=ifort -c 3 | #FC=nagfor -c 4 | 5 | FCFLAGS=-std=f2008 -Wall -fcheck=all 6 | #FCFLAGS=-std -warn all -check all -heap-arrays 7 | #FCFLAGS=-f2008 -w=all -C=all 8 | 9 | LD=gfortran 10 | #LD=ifort 11 | #LD=nagfor 12 | 13 | LDFLAGS=${FCFLAGS} 14 | 15 | LIBS= 16 | 17 | iterator: iterator.o 18 | ${LD} ${LDFLAGS} iterator.o ${LIBS} -o iterator 19 | 20 | iterator.o: iterator.f90 21 | ${FC} ${FCFLAGS} iterator.f90 22 | -------------------------------------------------------------------------------- /Rouson_examples/buildScripts/cray-compilers-cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SSD_PATH=../ssdSource 3 | EXTRA_ARGS=$@ 4 | 5 | rm -f CMakeCache.txt 6 | /global/u1/x/xiaofeng/cmake-2.8.5/bin/cmake \ 7 | -D CMAKE_BUILD_TYPE:STRING=DEBUG \ 8 | -D CMAKE_CXX_COMPILER:FILEPATH=g++ \ 9 | -D CMAKE_Fortran_COMPILER:FILEPATH=ftn \ 10 | -D CMAKE_Fortran_FLAGS:STRING="" \ 11 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \ 12 | -D ALL_EXAMPLES_ENABLED:BOOL=OFF \ 13 | $EXTRA_ARGS \ 14 | $SSD_PATH 15 | -------------------------------------------------------------------------------- /codingTests/bandf/code/alg125.dta: -------------------------------------------------------------------------------- 1 | 2 6 10 5 11 5 2 | 0.2 0.2 5 3 3 4 1 7 3 8 3 1 1 3 | 0.4 0.2 3 4 3 5 1 2 3 4 | 0.3 0.1 4 4 2 1 3 9 3 2 1 5 | 0.5 0.1 3 5 3 6 1 10 3 6 | 0.6 0.1 1 6 3 7 | 0.0 0.4 1 3 1 8 | 0.0 0.2 2 3 2 7 1 9 | 0.0 0.0 2 7 2 8 1 10 | 0.2 0.0 3 8 2 1 2 9 1 11 | 0.4 0.0 4 5 2 9 2 2 2 10 1 12 | 0.6 0.0 2 6 2 10 2 13 | 1 6 2 1 4 2 5 4 11 5 -------------------------------------------------------------------------------- /codingTests/cplusplus/SConstruct: -------------------------------------------------------------------------------- 1 | env = Environment() 2 | 3 | env.Program(target='testVec', source=['testVec.cpp']) 4 | # directly when constructing your Environment 5 | env = Environment(CPPFLAGS='-O2 -fPIC') 6 | #env.Append(LIBPATH = ['/usr/local/lib/']) 7 | env.Append(LIBS = ['boost_system'])#,'boost_timer,'boost_container']) 8 | 9 | # ... or appending it later 10 | #env.Append(CCFLAGS='-O3') 11 | 12 | #t = env.Program(target='bar', source=['foo.c']) 13 | #Default(t) 14 | 15 | 16 | -------------------------------------------------------------------------------- /codingTests/openmp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.6) 2 | project (findMycoreId) 3 | add_executable(findMycore.exe mycpu.c useFindMyCpuId.c) 4 | 5 | FIND_PACKAGE( OpenMP REQUIRED) 6 | if(OPENMP_FOUND) 7 | message("OPENMP FOUND") 8 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 10 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") 11 | endif() 12 | 13 | 14 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Bugs/bug.f90: -------------------------------------------------------------------------------- 1 | program bug 2 | implicit none 3 | 4 | type, abstract :: p_t 5 | end type p_t 6 | 7 | type, extends( p_t) :: c_t 8 | end type c_t 9 | 10 | class( p_t), pointer :: p_p 11 | 12 | continue 13 | 14 | select type( p_p) 15 | 16 | type is( c_t) 17 | call foo( p_p) 18 | end select 19 | 20 | stop "What! Me worry?" 21 | 22 | contains 23 | 24 | subroutine foo( ptr) 25 | type( c_t), pointer :: ptr 26 | end subroutine foo 27 | 28 | end program bug 29 | -------------------------------------------------------------------------------- /pythonTools/newClass.py: -------------------------------------------------------------------------------- 1 | #!/bin/env pythonMacports 2 | #Trying to learn how to use classes correctly in python 3 | #Simple class that 4 | #1)is imported into ipython 5 | #2)prints what is sent in 6 | #3)what else 7 | 8 | class simplePrint: 9 | "print the input to screen" 10 | def __init__(self): 11 | pass 12 | def what(self,toPrint): 13 | print "You say " + toPrint 14 | 15 | 16 | def main(): 17 | pass 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /appleScripts/findKids.inCaledar.scpt: -------------------------------------------------------------------------------- 1 | set theStartDate to current date 2 | --set theEndDate to 3 | 4 | tell application "Calendar" 5 | set theCalendarName to "Co-parenting Schedule" 6 | set theCalendar to first calendar where its name = theCalendarName 7 | tell calendar theCalendarName 8 | first event where its summary = "Kids: Srinath" and start date is greater than or equal to theStartDate 9 | -- count event where its summary = "Kids" 10 | end tell 11 | end tell 12 | 13 | -------------------------------------------------------------------------------- /FP_instr/testAvx/testAvx.c: -------------------------------------------------------------------------------- 1 | #define OSXSAVEFlag (1UL<<27) 2 | #define AVXFlag ((1UL<<28)|OSXSAVEFlag) 3 | #define FMAFlag ((1UL<<12)|AVXFlag|OSXSAVEFlag) 4 | #define CLMULFlag ((1UL<< 1)|AVXFlag|OSXSAVEFlag) 5 | #define VAESFlag ((1UL<<25)|AVXFlag|OSXSAVEFlag) 6 | 7 | 8 | 9 | inline bool SimdDetectFeature(U32 idFeature) 10 | { 11 | int EAX, EBX, ECX, EDX; 12 | cpuid(0, EAX, EBX, ECX, EDX); 13 | if((ECX & idFeature) != idFeature) 14 | return false; 15 | return true; 16 | } 17 | -------------------------------------------------------------------------------- /codingTests/Mpi_stuff/allReduce_trials/trial_3_wPatrun/doPatView.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | #allfiles=(*) 4 | #echo "${allfiles[@]}" 5 | 6 | 7 | 8 | #echo "******" 9 | #echo "******" 10 | #echo "******" 11 | #echo "******" 12 | #echo "******" 13 | #echo "******" 14 | #echo "******" 15 | ##echo "******" 16 | #echo "******" 17 | mpiAllReducePlusDirs=(mpiAllReduce+*) 18 | echo "${mpiAllReducePlusDirs[@]}" 19 | 20 | 21 | pat_view --pdf --pes 10 -o tioga_mpiAllreduce_pe10.pdf ${mpiAllReducePlusDirs[@]} 22 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/ass.f: -------------------------------------------------------------------------------- 1 | 2 | if( .not. ( My Foo > Your Foo ) )then ! ass.fpp: 1 3 | write( unit= *, fmt= *) "assertion failed: ass.fpp: 1: " // "( My ! ass.fpp: 1 4 | &Foo > Your Foo )" ! ass.fpp: 1 5 | stop "assertion failed" ! ass.fpp: 1 6 | end if ! ass.fpp: 1 7 | -------------------------------------------------------------------------------- /pythonTools/plotting/plot_flux.py: -------------------------------------------------------------------------------- 1 | import tables,pylab 2 | 3 | profile=tables.openFile('gyro_profile.h5') 4 | n_field=profile.root.n_field.read() 5 | n_kinetic=profile.root.n_kinetic.read() 6 | profile.close() 7 | 8 | fluxfile=open('gbflux.out') 9 | fluxstr=fluxfile.read() 10 | newfluxstr=fluxstr.replace('\n',' ') 11 | fluxarray=pylab.fromstring(newfluxstr,sep=' ') 12 | fluxtensor=fluxarray.reshape([n_kinetic,n_field,4,457]) 13 | fluxfile.close() 14 | 15 | pylab.plot(fluxtensor[0,0,1,:]) 16 | pylab.show() 17 | -------------------------------------------------------------------------------- /codingTests/CMake/tutorial.cxx: -------------------------------------------------------------------------------- 1 | // A simple program that computes the square root of a number 2 | #include 3 | #include 4 | #include 5 | int main (int argc, char *argv[]) 6 | { 7 | if (argc < 2) 8 | { 9 | fprintf(stdout,"Usage: %s number\n",argv[0]); 10 | return 1; 11 | } 12 | double inputValue = atof(argv[1]); 13 | double outputValue = sqrt(inputValue); 14 | fprintf(stdout,"The square root of %g is %g\n", 15 | inputValue, outputValue); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /pythonTools/krugerTutorial/snippet7.py: -------------------------------------------------------------------------------- 1 | from matplotlib import pylab 2 | import tables 3 | rdArray=pylab.loadtxt('dataFile1.txt',comments='x1') 4 | rdArray.shape 5 | x1=rdArray[:,0] 6 | y1=rdArray[:,1] 7 | hf=tables.openFile('dataFile1.h5','w') 8 | x1n=hf.createArray(hf.root,"x1",x1) 9 | hf.setNodeAttr(x1n,"vsType", "mesh") 10 | hf.setNodeAttr(x1n,"vsKind", "structured") 11 | y1n=hf.createArray(hf.root,"y1",y1) 12 | hf.setNodeAttr(x1n,"vsType", "variable") 13 | hf.setNodeAttr(x1n,"vsMesh", "x1") 14 | hf.close() 15 | 16 | 17 | -------------------------------------------------------------------------------- /pythonTools/unitTests/test1.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | import unittest 4 | 5 | #Here's our "unit". 6 | 7 | def IsOdd(n): 8 | return n % 2 == 1 9 | 10 | #Here's our "unit tests". 11 | 12 | class IsOddTests(unittest.TestCase): 13 | 14 | def testOne(self): 15 | #self.failUnless(IsOdd(1)) 16 | self.assertTrue(IsOdd(1)) 17 | 18 | def testTwo(self): 19 | self.assertFalse(IsOdd(2)) 20 | 21 | def main(): 22 | unittest.main() 23 | 24 | if __name__ == '__main__': 25 | main() 26 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/02-Derivatives/f.mk: -------------------------------------------------------------------------------- 1 | #FC=gfortran -c 2 | #FC=ifort -c 3 | FC=nagfor -c 4 | 5 | #FCFLAGS=-std=f2008 -Wall -fcheck=all 6 | #FCFLAGS=-std -warn all -check all 7 | FCFLAGS=-f2008 -w=all -C=all 8 | 9 | #LD=gfortran 10 | #LD=ifort 11 | LD=nagfor 12 | 13 | LDFLAGS=${FCFLAGS} 14 | 15 | LIBS= 16 | 17 | test: f_df.o test_f_df.o 18 | ${LD} ${LDFLAGS} test_f_df.o f_df.o ${LIBS} -o test 19 | 20 | f_df.o: f_df.f90 21 | ${FC} ${FCFLAGS} f_df.f90 22 | 23 | test_f_df.o: f_df.f90 24 | ${FC} ${FCFLAGS} test_f_df.f90 25 | -------------------------------------------------------------------------------- /compilerIssues/component_type_mod.F90: -------------------------------------------------------------------------------- 1 | module component_type_mod 2 | 3 | !---------------------------------------------------------------------------- 4 | ! share code & libs 5 | !---------------------------------------------------------------------------- 6 | use shr_kind_mod , only: r8 => SHR_KIND_R8 7 | use shr_kind_mod , only: cs => SHR_KIND_CS 8 | use shr_kind_mod , only: cl => SHR_KIND_CL 9 | 10 | real(r8) , pointer :: drv2mdl(:) => null() ! area correction factors 11 | end module 12 | -------------------------------------------------------------------------------- /jumpingIntoC++/password.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | int main() { 6 | 7 | std::string password; // this will store the password 8 | 9 | std::cout << "Enter your password :" << "\n" ; 10 | getline (std::cin, password, '\n' ); 11 | if (password == "xyzzy" ) { 12 | std::cout << "Access allowed " << "\n" ; 13 | } 14 | else { 15 | std::cout << "Bad passowrd. Denied Access." << "\n" ; 16 | // returning is a convenient way to stop the program 17 | return 0; 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /codingTests/openmp/useFindMyCpuId.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | //int findmycpu_ (); 6 | 7 | int main() { 8 | #pragma omp parallel 9 | { 10 | int thread_num = omp_get_thread_num(); 11 | int cpu_num = sched_getcpu(); 12 | // int findmycpu_num = findmycpu_(); 13 | printf("Thread %3d is running on CPU %3d\n", thread_num, cpu_num); 14 | // printf("Thread %3d is running on myCPU %3d\n", thread_num, findmycpu_num); 15 | } 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /jumpingIntoC++/waitForkey.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* this program will print something, wait for a keystroke, the print more */ 3 | 4 | #include 5 | 6 | int main() { 7 | 8 | 9 | std::cout << " I want you to return to see my friends names \n"; 10 | 11 | std::cin.get(); 12 | 13 | std::cout << "Ryan and Ryan \n"; 14 | std::cout << "Press return again to see another friend \n"; 15 | 16 | std::cin.get(); // seems to expect a return 17 | 18 | std::cout << " Here is Jeremy and Brad.\n"; 19 | 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/10-Reals/Reals.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Reals: Reals.o 21 | ${LD} ${LDFLAGS} Reals.o -o Reals 22 | 23 | # make this object file 24 | 25 | Reals.o: Reals.f90 26 | ${FC} ${FFLAGS} Reals.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/11-Reals/Reals.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Reals: Reals.o 21 | ${LD} ${LDFLAGS} Reals.o -o Reals 22 | 23 | # make this object file 24 | 25 | Reals.o: Reals.f90 26 | ${FC} ${FFLAGS} Reals.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/01-Array/Array.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array: Array.o 21 | ${LD} ${LDFLAGS} Array.o -o Array 22 | 23 | # make this object file 24 | 25 | Array.o: Array.f90 26 | ${FC} ${FFLAGS} Array.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/02-Array/Array.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array: Array.o 21 | ${LD} ${LDFLAGS} Array.o -o Array 22 | 23 | # make this object file 24 | 25 | Array.o: Array.f90 26 | ${FC} ${FFLAGS} Array.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/03-Array/Array.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array: Array.o 21 | ${LD} ${LDFLAGS} Array.o -o Array 22 | 23 | # make this object file 24 | 25 | Array.o: Array.f90 26 | ${FC} ${FFLAGS} Array.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/04-Array/Array.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array: Array.o 21 | ${LD} ${LDFLAGS} Array.o -o Array 22 | 23 | # make this object file 24 | 25 | Array.o: Array.f90 26 | ${FC} ${FFLAGS} Array.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/05-Array/Array.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array: Array.o 21 | ${LD} ${LDFLAGS} Array.o -o Array 22 | 23 | # make this object file 24 | 25 | Array.o: Array.f90 26 | ${FC} ${FFLAGS} Array.f90 27 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter05/leak/Makefile: -------------------------------------------------------------------------------- 1 | #The following compilers correctly compile this code: 2 | compile=xlf2003 3 | compile=ifort 4 | compile=nagfor -f2003 5 | compile=gfortran 6 | 7 | executable=leak 8 | objects=leak.o 9 | 10 | $(executable): main.o $(objects) 11 | $(compile) main.o $(objects) -o $(executable) 12 | 13 | main.o: main.F90 leak.o Makefile 14 | $(compile) -c main.F90 15 | 16 | leak.o: leak.F90 Makefile 17 | $(compile) -c leak.F90 18 | 19 | .PHONY : clean 20 | clean : 21 | -rm -f *.o *.mod $(executable) a.out core 22 | -------------------------------------------------------------------------------- /codingTests/boost/uuid/uuid2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include // uuid class 4 | #include // generators 5 | #include // streaming operators etc. 6 | 7 | 8 | int main() 9 | { 10 | boost::uuids::random_generator generator; 11 | 12 | boost::uuids::uuid uuid1 = generator(); 13 | std::cout << uuid1 << std::endl; 14 | 15 | boost::uuids::uuid uuid2 = generator(); 16 | std::cout << uuid2 << std::endl; 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/20-Modules/Module.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Module: Module.o 21 | ${LD} ${LDFLAGS} Module.o -o Module 22 | 23 | # make this object file 24 | 25 | Module.o: Module.f90 26 | ${FC} ${FFLAGS} Module.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/21-Modules/Module.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Module: Module.o 21 | ${LD} ${LDFLAGS} Module.o -o Module 22 | 23 | # make this object file 24 | 25 | Module.o: Module.f90 26 | ${FC} ${FFLAGS} Module.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/22-Modules/Module.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Module: Module.o 21 | ${LD} ${LDFLAGS} Module.o -o Module 22 | 23 | # make this object file 24 | 25 | Module.o: Module.f90 26 | ${FC} ${FFLAGS} Module.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/23-Modules/Module.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Module: Module.o 21 | ${LD} ${LDFLAGS} Module.o -o Module 22 | 23 | # make this object file 24 | 25 | Module.o: Module.f90 26 | ${FC} ${FFLAGS} Module.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/24-Modules/Module.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Module: Module.o 21 | ${LD} ${LDFLAGS} Module.o -o Module 22 | 23 | # make this object file 24 | 25 | Module.o: Module.f90 26 | ${FC} ${FFLAGS} Module.f90 27 | -------------------------------------------------------------------------------- /pythonTools/unitTests/README: -------------------------------------------------------------------------------- 1 | using the website: 2 | 3 | http://www.openp2p.com/pub/a/python/2004/12/02/tdd_pyunit.html 4 | 5 | as guide for now 6 | 7 | 8 | from: 9 | https://docs.python.org/2.7/library/unittest.html#deprecated-aliases 10 | 11 | Method Name Deprecated alias(es) 12 | assertEqual() failUnlessEqual, assertEquals 13 | assertNotEqual() failIfEqual 14 | assertTrue() failUnless, assert_ 15 | assertFalse() failIf 16 | assertRaises() failUnlessRaises 17 | assertAlmostEqual() failUnlessAlmostEqual 18 | assertNotAlmostEqual() failIfAlmostEqual 19 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/12-Complex/Complex.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Complex: Complex.o 21 | ${LD} ${LDFLAGS} Complex.o -o Complex 22 | 23 | # make this object file 24 | 25 | Complex.o: Complex.f90 26 | ${FC} ${FFLAGS} Complex.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/04-Integers/Integers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Integers: Integers.o 21 | ${LD} ${LDFLAGS} Integers.o -o Integers 22 | 23 | # make this object file 24 | 25 | Integers.o: Integers.f90 26 | ${FC} ${FFLAGS} Integers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/05-Integers/Integers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Integers: Integers.o 21 | ${LD} ${LDFLAGS} Integers.o -o Integers 22 | 23 | # make this object file 24 | 25 | Integers.o: Integers.f90 26 | ${FC} ${FFLAGS} Integers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/08-Logicals/Logicals.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Logicals: Logicals.o 21 | ${LD} ${LDFLAGS} Logicals.o -o Logicals 22 | 23 | # make this object file 24 | 25 | Logicals.o: Logicals.f90 26 | ${FC} ${FFLAGS} Logicals.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/09-Logicals/Logicals.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Logicals: Logicals.o 21 | ${LD} ${LDFLAGS} Logicals.o -o Logicals 22 | 23 | # make this object file 24 | 25 | Logicals.o: Logicals.f90 26 | ${FC} ${FFLAGS} Logicals.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/14-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/15-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/16-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/17-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/18-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/19-Pointers/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/39-Generics/Generics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Generics: Generics.o 21 | ${LD} ${LDFLAGS} Generics.o -o Generics 22 | 23 | # make this object file 24 | 25 | Generics.o: Generics.f90 26 | ${FC} ${FFLAGS} Generics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/40-Generics/Generics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Generics: Generics.o 21 | ${LD} ${LDFLAGS} Generics.o -o Generics 22 | 23 | # make this object file 24 | 25 | Generics.o: Generics.f90 26 | ${FC} ${FFLAGS} Generics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/41-Generics/Generics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Generics: Generics.o 21 | ${LD} ${LDFLAGS} Generics.o -o Generics 22 | 23 | # make this object file 24 | 25 | Generics.o: Generics.f90 26 | ${FC} ${FFLAGS} Generics.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-I/05-rank_remapping/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /codingTests/doxygen-test/latex/Makefile: -------------------------------------------------------------------------------- 1 | all: clean refman.pdf 2 | 3 | pdf: refman.pdf 4 | 5 | refman.pdf: refman.tex 6 | pdflatex refman.tex 7 | makeindex refman.idx 8 | pdflatex refman.tex 9 | latex_count=5 ; \ 10 | while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ 11 | do \ 12 | echo "Rerunning latex...." ;\ 13 | pdflatex refman.tex ;\ 14 | latex_count=`expr $$latex_count - 1` ;\ 15 | done 16 | 17 | 18 | clean: 19 | rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf 20 | -------------------------------------------------------------------------------- /jumpingIntoC++/getLine.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int main () { 6 | 7 | std::string phrase; 8 | std::string up2comma; 9 | 10 | 11 | std::cout << "Type in a phrase: "; 12 | std::getline(std::cin,phrase,"\n"); 13 | std::cout << "Type in a phrase with a comma: "; 14 | std::getline(std::cin,up2comma,","); 15 | 16 | std::cout << " Your phrase : " << phrase << std::endl ; 17 | std::cout << " Your phrase up to comma : " << up2comma << std::endl ; 18 | 19 | 20 | //not compiling .. where does getline live? 21 | 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/42-Operators/Operators.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Operators: Operators.o 21 | ${LD} ${LDFLAGS} Operators.o -o Operators 22 | 23 | # make this object file 24 | 25 | Operators.o: Operators.f90 26 | ${FC} ${FFLAGS} Operators.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/43-Operators/Operators.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Operators: Operators.o 21 | ${LD} ${LDFLAGS} Operators.o -o Operators 22 | 23 | # make this object file 24 | 25 | Operators.o: Operators.f90 26 | ${FC} ${FFLAGS} Operators.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/05-rank_remapping/Pointers.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Pointers: Pointers.o 21 | ${LD} ${LDFLAGS} Pointers.o -o Pointers 22 | 23 | # make this object file 24 | 25 | Pointers.o: Pointers.f90 26 | ${FC} ${FFLAGS} Pointers.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-I/06-dim=/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter02/figure2.4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(hello_world hello_world.F90) 2 | 3 | if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") 4 | message("*** A reported Gnu Fortran compiler bug prevents compilation of ***") 5 | message("*** chapter02/figure2.4/oo_hello_world.F90. Substituting ***") 6 | message("*** gfortran_oo_hello_world.F90. ***\n") 7 | add_executable(gfortran_oo_hello_world gfortran_oo_hello_world.F90) 8 | else() 9 | add_executable(oo_hello_world oo_hello_world.F90) 10 | endif() 11 | 12 | -------------------------------------------------------------------------------- /codingTests/cplusplus/showMaxVal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int main() 6 | { 7 | 8 | int imin = std::numeric_limits::min(); // minimum value 9 | int imax = std::numeric_limits::max(); 10 | 11 | std::cout<< "int min is "<< imin << "\n"; 12 | std::cout << "int max is "<< imax << "\n"; 13 | 14 | 15 | int64_t imin64 = std::numeric_limits::min(); // minimum value 16 | int64_t imax64 = std::numeric_limits::max(); 17 | std::cout<< "int64_t min is "<< imin64 << "\n"; 18 | std::cout << "int64_t max is "<< imax64 << "\n"; 19 | } 20 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/notes.otl: -------------------------------------------------------------------------------- 1 | 2 | Questions: 3 | 1) git_id value? 4 | 2) titling loop like 5 | foo : do 6 | 7 | 8 | 9 | end do foo 10 | 11 | 12 | NOTES: 13 | 13-Derived types 14 | constructor idea 15 | 16 | 16-attributes: 17 | forall and where 18 | 19 | 20 | 17-attributes: 21 | target and pointers 22 | -target: may be aliased 23 | 24 | pointers: 25 | compilers treat pointer cautiously 26 | 27 | continue -- marks end of declaration block and beginning of executable 28 | 29 | 30 | case ( a, b) is a or b 31 | 23-executables 32 | 33 | 34 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/06-dim=/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/06-Characters/Characters.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Characters: Characters.o 21 | ${LD} ${LDFLAGS} Characters.o -o Characters 22 | 23 | # make this object file 24 | 25 | Characters.o: Characters.f90 26 | ${FC} ${FFLAGS} Characters.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/07-Characters/Characters.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Characters: Characters.o 21 | ${LD} ${LDFLAGS} Characters.o -o Characters 22 | 23 | # make this object file 24 | 25 | Characters.o: Characters.f90 26 | ${FC} ${FFLAGS} Characters.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/14-Assignment/Assignment.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Assignment: Assignment.o 21 | ${LD} ${LDFLAGS} Assignment.o -o Assignment 22 | 23 | # make this object file 24 | 25 | Assignment.o: Assignment.f90 26 | ${FC} ${FFLAGS} Assignment.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/15-Assignment/Assignment.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Assignment: Assignment.o 21 | ${LD} ${LDFLAGS} Assignment.o -o Assignment 22 | 23 | # make this object file 24 | 25 | Assignment.o: Assignment.f90 26 | ${FC} ${FFLAGS} Assignment.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/16-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/17-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/18-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/19-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/20-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/25-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/26-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/27-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/28-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/29-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/30-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/31-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/32-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/33-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/34-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/35-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/36-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/37-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/38-Intrinsics/Intrinsics.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Intrinsics: Intrinsics.o 21 | ${LD} ${LDFLAGS} Intrinsics.o -o Intrinsics 22 | 23 | # make this object file 24 | 25 | Intrinsics.o: Intrinsics.f90 26 | ${FC} ${FFLAGS} Intrinsics.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text2.f: -------------------------------------------------------------------------------- 1 | ! 2 | ! Preprocessor executed: 2011/12/17 12:33:52.684 3 | ! 4 | ! Preprocessor command line: ../coco -ad -F text2 5 | ! Preprocessor set file: 6 | ! Preprocessor log file: 7 | ! Preprocessor version: 8 | ! $Id: coco.f90,v 2.0 2011/12/17 00:48:06 dan Exp dan $ 9 | ! 10 | ! Source file: text2.fpp line: 14 11 | ! Compile file: text2.f 12 | ! 13 | ! copy this 14 | ! 1 15 | what is the what word 16 | ! just do it 17 | ! 2 18 | what is the me word 19 | ! what? me worry! 20 | ! 3 21 | what is the worry word 22 | ! what? me worry! 23 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter12/Burgers_Trilinos_Factory_RCP_1D/configure_mpi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SRC_PATH=/home/knmorri/Git_Trilinos/Tutorial/Burgers_Trilinos_Factory_RCP_1D/src 4 | EXTRA_ARGS=$@ 5 | 6 | cmake \ 7 | -D Trilinos_DIR:FILEPATH=/home/knmorri/Git_Trilinos/Trilinos-MPI-10.0 \ 8 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE\ 9 | -D CMAKE_Fortran_FLAGS:STRING="-g -qxlf2003=polymorphic -qxlf2003=autorealloc -WF,-C! -O3 -qhot" \ 10 | -D CMAKE_CXX_FLAGS:STRING="-qrtti=all -O3 -qhot" \ 11 | ${EXTRA_ARGS} \ 12 | ${SRC_PATH} 13 | 14 | -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter12/Burgers_Trilinos_Factory_RCP_1D/configure_serial: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SRC_PATH=/home/knmorri/Git_Trilinos/Tutorial/Burgers_Trilinos_Factory_RCP_1D/src 4 | EXTRA_ARGS=$@ 5 | 6 | cmake \ 7 | -D Trilinos_DIR:FILEPATH=/home/knmorri/Git_Trilinos/Trilinos-10.0 \ 8 | -D CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE\ 9 | -D CMAKE_Fortran_FLAGS:STRING="-g -qxlf2003=polymorphic -qxlf2003=autorealloc -WF,-C! -O3 -qhot" \ 10 | -D CMAKE_CXX_FLAGS:STRING="-qrtti=all -O3 -qhot" \ 11 | ${EXTRA_ARGS} \ 12 | ${SRC_PATH} 13 | 14 | -------------------------------------------------------------------------------- /codingTests/gpuStuff/fortest.f95: -------------------------------------------------------------------------------- 1 | PROGRAM fortest 2 | 3 | ! simple program which creates 2 vectors and adds them in a 4 | ! cuda function 5 | 6 | IMPLICIT NONE 7 | 8 | integer*4 :: i 9 | integer*4, parameter :: N=8 10 | real*4, Dimension(N) :: a, b 11 | 12 | DO i=1,N 13 | a(i)=i*1.0 14 | b(i)=2.0 15 | END DO 16 | 17 | print *, 'a = ', (a(i), i=1,N) 18 | 19 | CALL kernel_wrapper(a, b, N) 20 | 21 | print *, 'a + 2 = ', (a(i), i=1,N) 22 | 23 | END PROGRAM 24 | 25 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/01-Hello_World/Hello_World.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Hello_World: Hello_World.o 21 | ${LD} ${LDFLAGS} Hello_World.o -o Hello_World 22 | 23 | # make this object file 24 | 25 | Hello_World.o: Hello_World.f90 26 | ${FC} ${FFLAGS} Hello_World.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/02-Hello_World/Hello_World.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Hello_World: Hello_World.o 21 | ${LD} ${LDFLAGS} Hello_World.o -o Hello_World 22 | 23 | # make this object file 24 | 25 | Hello_World.o: Hello_World.f90 26 | ${FC} ${FFLAGS} Hello_World.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/03-Hello_World/Hello_World.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Hello_World: Hello_World.o 21 | ${LD} ${LDFLAGS} Hello_World.o -o Hello_World 22 | 23 | # make this object file 24 | 25 | Hello_World.o: Hello_World.f90 26 | ${FC} ${FFLAGS} Hello_World.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/foo.fpp: -------------------------------------------------------------------------------- 1 | ! ?date? what a long-winded comment this blather just keeps on going and going oh shut up already no not just one more thing gosh who cares oh my you've been talking for six hours now why oh why 2 | ?date? a( i, j, k)% stuff% morestuff( i, j, k) = a + b - c + d * e / f % and then ! why 3 | ?? integer :: a = 4, b = 5 4 | ?? logical :: debug = .false. 5 | ?? if( debug )then 6 | ?? symbols 7 | ?? end if 8 | ?? message a+b, a-b, a*b, a/b, a\b 9 | ?? if( debug )then 10 | ! I'm debugging now! 11 | ?? else 12 | ! Business as usual. 13 | ?? end if 14 | ?? symbols 15 | -------------------------------------------------------------------------------- /codingTests/cplusplus/testPlatform.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() { 7 | #if defined(__linux__) 8 | std::cout << "on linux \n"; 9 | #elif defined(__APPLE__) 10 | std::cout << "on APPLE \n"; 11 | #endif 12 | 13 | #if defined (__x86_64__) 14 | std::cout << " on __x86_64__ \n"; 15 | #endif 16 | 17 | #if defined (__i386__) 18 | std::cout << " on __i386__ \n"; 19 | #endif 20 | 21 | #if defined (__GNUC__) 22 | std::cout << " using gnu c compiler \n"; 23 | #endif 24 | 25 | 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/01-Test/Test.mk: -------------------------------------------------------------------------------- 1 | FC=gfortran -c 2 | 3 | FFLAGS=-std=f2008 -Wall -fcheck=all 4 | 5 | LD=gfortran 6 | 7 | LDFLAGS= 8 | 9 | Test: Test.o Test_math_funcs.o Math_funcs.o 10 | ${LD} ${LDFLAGS} Test.o Test_math_funcs.o Math_funcs.o -L${PFUNIT}/lib -lpfunit -o Test 11 | 12 | Math_funcs.o: Math_funcs.f90 13 | ${FC} ${FFLAGS} Math_funcs.f90 -o Math_funcs.o 14 | 15 | Test_math_funcs.o: Test_math_funcs.f90 16 | ${FC} ${FFLAGS} -I${PFUNIT}/mod -I. Test_math_funcs.f90 -o Test_math_funcs.o 17 | 18 | Test.o: Test.f90 19 | ${FC} ${FFLAGS} -I${PFUNIT}/mod -I. Test.f90 -o Test.o 20 | 21 | -------------------------------------------------------------------------------- /codingTests/cplusplus/static.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int getValue() { 4 | static int value = 10; // Static variable, initialized once 5 | return value; 6 | } 7 | 8 | int main() { 9 | int result = getValue(); 10 | std::cout << "Result: " << result << std::endl; 11 | 12 | // Modify the value 13 | // This won't affect the value returned by getValue() 14 | getValue() += 5; 15 | 16 | // Call again to see if the value changed 17 | result = getValue(); 18 | std::cout << "Result after modification: " << result << std::endl; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /codingTests/fortran90/allocTrick.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | Program allocTrick 4 | 5 | ! I want to get all the info from the allocated array itself 6 | 7 | implicit none 8 | 9 | 10 | integer :: n1=1,n2=2,n3=3 11 | integer :: ranks(1),i 12 | real, allocatable :: array(:,:,:) 13 | integer, allocatable :: dims(:) 14 | 15 | 16 | 17 | 18 | allocate(array(n1,n2,n3)) 19 | 20 | ranks=shape(shape(array)) 21 | allocate(dims(ranks(1))) 22 | dims=shape(array) 23 | write(*,*) "shape of array = ", dims 24 | write(*,*) "dimension of array = ", ranks 25 | 26 | 27 | End Program allocTrick 28 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/21-Attributes/Attributes.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Attributes: Attributes.o 21 | ${LD} ${LDFLAGS} Attributes.o -o Attributes 22 | 23 | # make this object file 24 | 25 | Attributes.o: Attributes.f90 26 | ${FC} ${FFLAGS} Attributes.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/30-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/31-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/32-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/33-Procedures/Procedures.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Procedures: Procedures.o 21 | ${LD} ${LDFLAGS} Procedures.o -o Procedures 22 | 23 | # make this object file 24 | 25 | Procedures.o: Procedures.f90 26 | ${FC} ${FFLAGS} Procedures.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-I/01-Test/Test.mk: -------------------------------------------------------------------------------- 1 | FC=gfortran-mp-4.7 -c 2 | 3 | FFLAGS=-std=f2008 -Wall -fcheck=all 4 | 5 | LD=gfortran-mp-4.7 6 | 7 | LDFLAGS= 8 | 9 | Test: Test.o Test_math_funcs.o Math_funcs.o 10 | ${LD} ${LDFLAGS} Test.o Test_math_funcs.o Math_funcs.o -L${PFUNIT}/lib -lpfunit -o Test 11 | 12 | Math_funcs.o: Math_funcs.f90 13 | ${FC} ${FFLAGS} Math_funcs.f90 -o Math_funcs.o 14 | 15 | Test_math_funcs.o: Test_math_funcs.f90 16 | ${FC} ${FFLAGS} -I${PFUNIT}/mod -I. Test_math_funcs.f90 -o Test_math_funcs.o 17 | 18 | Test.o: Test.f90 19 | ${FC} ${FFLAGS} -I${PFUNIT}/mod -I. Test.f90 -o Test.o 20 | 21 | -------------------------------------------------------------------------------- /codingTests/python/pseudospectral.py: -------------------------------------------------------------------------------- 1 | # pseudospectral.py 2 | # 3 | # Compute the pseudospectral differentiation matrix for a set of grid points 4 | 5 | import scipy as sp 6 | from operator import mul 7 | 8 | def diffmat(x): # x is an ordered array of grid points 9 | n = sp.size(x) 10 | e = sp.ones((n,1)) 11 | Xdiff = sp.outer(x,e)-sp.outer(e,x)+sp.identity(n) 12 | xprod = -reduce(mul,Xdiff) # product of rows 13 | W = sp.outer(1/xprod,e) 14 | D = W/sp.multiply(W.T,Xdiff) 15 | d = 1-sum(D) 16 | 17 | for k in range(0,n): # Set diagonal elements 18 | D[k,k] = d[k] 19 | 20 | return -D.T -------------------------------------------------------------------------------- /Rouson_examples/ssdSource/chapter05/vortex_cpp/Makefile: -------------------------------------------------------------------------------- 1 | executable=quantumvortex 2 | objects=vortex.o 3 | compile=/gsa/tlbgsa/projects/x/xlcmpbld/run/vacpp/111/aix/daily/latest/bin/xlC -qrtti=all 4 | compile=/opt/local/bin/g++-mp-4.6 5 | compile=g++ 6 | INCLUDE=-I../../chapter06/common_cpp/ 7 | 8 | $(executable): main.o $(objects) 9 | $(compile) main.o $(objects) -o $(executable) 10 | 11 | main.o: main.cpp vortex.o 12 | $(compile) $(INCLUDE) -c main.cpp 13 | 14 | vortex.o: vortex.cpp 15 | $(compile) $(INCLUDE) -c vortex.cpp 16 | 17 | .PHONY : clean 18 | clean : 19 | -rm -f *.o $(executable) a.out core 20 | -------------------------------------------------------------------------------- /codingTests/testIndex.f90: -------------------------------------------------------------------------------- 1 | 2 | 3 | program testIndex 4 | 5 | real, dimension( -3:0) :: testarray 6 | real, dimension( 0:-2) :: testarray2 7 | real, dimension(1:2,1:2):: matrix 8 | 9 | 10 | testarray=0 11 | testarray2=0 12 | 13 | testarray(-3)=3.0 14 | 15 | 16 | write(*,*) testarray ," size of testarray = ", size(testarray) 17 | write(*,*) "2 = ",testarray2 , " size of testarray2 = ", size(testarray2) 18 | 19 | matrix(1,1)=1 20 | matrix(1,2)=2 21 | matrix(2,1)=3 22 | matrix(2,2)=4 23 | 24 | write(*,*) matrix 25 | write(*,*) matrix(2:1,2:1) 26 | end program testIndex 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/13-Derived_Types/Derived_Types.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Derived_Types: Derived_Types.o 21 | ${LD} ${LDFLAGS} Derived_Types.o -o Derived_Types 22 | 23 | # make this object file 24 | 25 | Derived_Types.o: Derived_Types.f90 26 | ${FC} ${FFLAGS} Derived_Types.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/22-Executables/Executables.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Executables: Executables.o 21 | ${LD} ${LDFLAGS} Executables.o -o Executables 22 | 23 | # make this object file 24 | 25 | Executables.o: Executables.f90 26 | ${FC} ${FFLAGS} Executables.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/23-Executables/Executables.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Executables: Executables.o 21 | ${LD} ${LDFLAGS} Executables.o -o Executables 22 | 23 | # make this object file 24 | 25 | Executables.o: Executables.f90 26 | ${FC} ${FFLAGS} Executables.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/24-Executables/Executables.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Executables: Executables.o 21 | ${LD} ${LDFLAGS} Executables.o -o Executables 22 | 23 | # make this object file 24 | 25 | Executables.o: Executables.f90 26 | ${FC} ${FFLAGS} Executables.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-III/01-Hello_World/Hello_World.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Hello_World: Hello_World.o 21 | ${LD} ${LDFLAGS} Hello_World.o -o Hello_World 22 | 23 | # make this object file 24 | 25 | Hello_World.o: Hello_World.f90 26 | ${FC} ${FFLAGS} Hello_World.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/mac.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: debug 2 | ?? integer :: counter = 42 3 | ?? macro :: goo = oobleck 4 | ?? macro, parens :: hypot( x, y) = sqrt( ?x?*?x? + ?y?*?y?) 5 | ?? integer :: i 6 | ! 7 | ?? include '../document.inc' 8 | ! ?file? ?line? 9 | ! ?date? ?time? 10 | ! ?time? ?date? 11 | ! ?date? 12 | ! ?date? ?coco? 13 | ! ?coco? 14 | ! ?setfile? 15 | ! ?logfile? 16 | ! ?output? 17 | ! ?cmdline? 18 | ! debug y/n ?debug? 19 | ! how many = ?counter? 20 | poo = ?goo? 21 | z = ?hypot?(a, b) 22 | z = ?hypot?(x2-x1, y2-y1) 23 | z = ?hypot?(a+b,(a-b)) 24 | z = ?hypot?((x2-x1), y2-y1) 25 | ?? symbols 26 | -------------------------------------------------------------------------------- /tbb/build.tau.link.sh: -------------------------------------------------------------------------------- 1 | export TAU_MAKEFILE=/work/02463/srinathv/tau2/x86_64/lib/Makefile.tau-knl_17-icpc-papi-mpi-tbb 2 | #export TAU_MAKEFILE=/Users/srinathv/Repos/NicUOregon/tau2/apple/lib/Makefile.tau-icpc-mpi-tbb 3 | 4 | tau_cxx.sh -optLinkOnly -D__USE_TAU -DTAU_STDCXXLIB -DPROFILING_ON mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.tauLink.knl.tau.exe 5 | tau_cxx.sh -optLinkOnly -D__USE_TAU -DTAU_STDCXXLIB -DPROFILING_ON -D__LIKE_GRAVIT mpi_tbb_mm.cpp -tbb -std=c++0x -o mpi_tbb_mm.argsThread.knl.tau.exe 6 | tau_cxx.sh -optLinkOnly -D__USE_TAU -DTAU_STDCXXLIB -DPROFILING_ON matmul.cpp -tbb -std=c++0x -o matmul.tau.exe 7 | -------------------------------------------------------------------------------- /nagle2/Day-III/04-Digits-Home/make_digits.f90: -------------------------------------------------------------------------------- 1 | program make_digits 2 | 3 | character( len= 1), dimension( 4), parameter :: digits_4 = [ '1', '2', '3', '4'] 4 | 5 | integer :: i, j, k, l 6 | 7 | continue 8 | 9 | do l = 1, 4 10 | 11 | do k = 1, 4 12 | 13 | do j = 1, 4 14 | 15 | do i = 1, 4 16 | 17 | write( unit= *, fmt= *) digits_4( i) // digits_4( j) // digits_4( k) // digits_4( l) 18 | 19 | end do 20 | 21 | end do 22 | 23 | end do 24 | 25 | end do 26 | 27 | stop 'normal exit in digits_home' 28 | 29 | end program make_digits 30 | -------------------------------------------------------------------------------- /nagle2/Day-III/06-coco/Tests/text2.fpp: -------------------------------------------------------------------------------- 1 | ?? logical :: debug = .false. 2 | ?? integer :: counter = 0 3 | ?? macro :: fubar( x) = f?x?cked up beyond ALL recognition 4 | ??cmdline 5 | ! ?fubar?(A) 6 | ??text :: foo(word) 7 | ?? counter = counter + 1 8 | ?? message 'copy number ', counter, counter > 1 9 | ! ?counter? 10 | WHAT IS THE ?WORD? WORD 11 | ?? if( debug )then 12 | ! what? me worry! 13 | ?? else 14 | ! just do it 15 | ?? end if 16 | ?? end text foo 17 | ?? document 18 | ! copy this 19 | ?? copy :: foo(what) 20 | ?? debug = .true. 21 | ?? copy :: foo(ME) 22 | ?? copy :: foo(worry) 23 | ??symbols 24 | ?? report 25 | -------------------------------------------------------------------------------- /codingTests/cplusplus/simpleClassOneLine.cpp: -------------------------------------------------------------------------------- 1 | // example: class constructor 2 | #include 3 | using namespace std; 4 | 5 | class Rectangle { 6 | int width, height; 7 | public: 8 | Rectangle (int,int); 9 | int area () {return (width*height);} 10 | ~Rectangle (); 11 | }; 12 | 13 | Rectangle::Rectangle (int a, int b) { width = a; height = b; } 14 | 15 | Rectangle::~Rectangle() {} 16 | 17 | int main () { 18 | Rectangle rect (3,4); 19 | Rectangle rectb (5,6); 20 | cout << "rect area: " << rect.area() << endl; 21 | cout << "rectb area: " << rectb.area() << endl; 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/25-Input_Output/Input_Output.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Input_Output: Input_Output.o 21 | ${LD} ${LDFLAGS} Input_Output.o -o Input_Output 22 | 23 | # make this object file 24 | 25 | Input_Output.o: Input_Output.f90 26 | ${FC} ${FFLAGS} Input_Output.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/26-Input_Output/Input_Output.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Input_Output: Input_Output.o 21 | ${LD} ${LDFLAGS} Input_Output.o -o Input_Output 22 | 23 | # make this object file 24 | 25 | Input_Output.o: Input_Output.f90 26 | ${FC} ${FFLAGS} Input_Output.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/27-Input_Output/Input_Output.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Input_Output: Input_Output.o 21 | ${LD} ${LDFLAGS} Input_Output.o -o Input_Output 22 | 23 | # make this object file 24 | 25 | Input_Output.o: Input_Output.f90 26 | ${FC} ${FFLAGS} Input_Output.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/28-Input_Output/Input_Output.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Input_Output: Input_Output.o 21 | ${LD} ${LDFLAGS} Input_Output.o -o Input_Output 22 | 23 | # make this object file 24 | 25 | Input_Output.o: Input_Output.f90 26 | ${FC} ${FFLAGS} Input_Output.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-I/29-Input_Output/Input_Output.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all -fcoarray=single 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Input_Output: Input_Output.o 21 | ${LD} ${LDFLAGS} Input_Output.o -o Input_Output 22 | 23 | # make this object file 24 | 25 | Input_Output.o: Input_Output.f90 26 | ${FC} ${FFLAGS} Input_Output.f90 27 | -------------------------------------------------------------------------------- /nagle2/Day-I/07-move_alloc/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | -------------------------------------------------------------------------------- /codingTests/openmp/omp_get_wtime.cpp: -------------------------------------------------------------------------------- 1 | // omp_get_wtime.cpp 2 | // compile with: /openmp 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main() { 9 | double start = omp_get_wtime( ); 10 | // sleep(1000); 11 | std::this_thread::sleep_for(std::chrono::milliseconds(10000)); 12 | double end = omp_get_wtime( ); 13 | double wtick = omp_get_wtick( ); 14 | 15 | printf("start = %.16g\nend = %.16g\ndiff = %.16g\n", 16 | start, end, end - start); 17 | 18 | printf("wtick = %.16g\n1/wtick = %.16g\n", 19 | wtick, 1.0 / wtick); 20 | } 21 | -------------------------------------------------------------------------------- /nagle2/Day-I-2/Day-I/07-move_alloc/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | -------------------------------------------------------------------------------- /codingTests/cplusplus/simpleClass.cpp: -------------------------------------------------------------------------------- 1 | // example: class constructor 2 | #include 3 | using namespace std; 4 | 5 | class Rectangle { 6 | int width, height; 7 | public: 8 | Rectangle (int,int); 9 | int area () {return (width*height);} 10 | ~Rectangle (); 11 | }; 12 | 13 | Rectangle::Rectangle (int a, int b) { 14 | width = a; 15 | height = b; 16 | } 17 | 18 | Rectangle::~Rectangle() {} 19 | 20 | int main () { 21 | Rectangle rect (3,4); 22 | Rectangle rectb (5,6); 23 | cout << "rect area: " << rect.area() << endl; 24 | cout << "rectb area: " << rectb.area() << endl; 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/06-Array_Intrinsic/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/07-Array_Intrinsic/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/08-Array_Intrinsic/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | -------------------------------------------------------------------------------- /nagle1/Fortran-II/09-Array_Intrinsic/Array_Intrinsic.mk: -------------------------------------------------------------------------------- 1 | 2 | # use this compiler for the .f90 --> .o step 3 | 4 | FC=gfortran -c 5 | 6 | # use these options to the compiler 7 | 8 | FFLAGS=-std=f2008 -Wall -fcheck=all 9 | 10 | # use the compiler driver for the .o --> a.out step 11 | 12 | LD=gfortran 13 | 14 | # use these options to the linker 15 | 16 | LDFLAGS= 17 | 18 | # make this executable 19 | 20 | Array_Intrinsic: Array_Intrinsic.o 21 | ${LD} ${LDFLAGS} Array_Intrinsic.o -o Array_Intrinsic 22 | 23 | # make this object file 24 | 25 | Array_Intrinsic.o: Array_Intrinsic.f90 26 | ${FC} ${FFLAGS} Array_Intrinsic.f90 27 | --------------------------------------------------------------------------------