Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

           mkdir -p ~/gem/v_5.1.1/Abs/My_Abs      # Set 'My_Abs' to whatever you like. But make sure to give every executable directory a different 'my_Abs' name.!

2) Populate directory

Go into the executable directory you just created above. For example:

               cd ~/gem/v_5.1.1/Abs/My_Abs

a) Get the basename of abs-directory

Get the basename (last part of your directory path) of your abs-directory for later use:

             base_dir=$( basename $(pwd) )

'base_dir' should now be set to 'My_Abs'. You can verify it with:

            echo $base_dir

b) Clone the Git repository you want

For example:

             git clone ~winger/gem/v_5.1.1/Abs/UQAM_development_FLake_CLASS/gem

then change into 'gem' directory that came with the clone:

             cd gem

...

c) Create working directories

So the object files, libraries and executables will not be under your home, create links for the directories 'build' and 'work'. Pick a place under which you want to keep the object files, libraries and executables. Preferably under the default(!) space of you professors, for example:

            work_space=~/projects/def-professor/${USER}/GEM_WORK_DIR     # Set 'professor' to the CC name of your professor. You can find all of them under ~/projects.

Set the variable 'base_dir' to the basename (just the last part) of your executable directory. For example:

            base_dir=$( basename $(pwd) )

Create the directories and the links (using the :

            mkdir -p ${work_space}/${base_dir##*/dir}/build
            mkdir -p ${work_space}/${base_dir##*/dir}/work
            ln -s ${work_space}/${base_dir##*/dir}/build
            ln -s ${work_space}/${base_dir##*/dir}/work

3) Create the executables

a) Acquire compiler:

(Only needed once per window/terminal.)

            module add intel/2021.2.0 fftw-intel-2021

b) If you are not already in it, go into the 'gem' directory of your abs-directory:

            cd ~/gem/v_5.1.1/Abs/My_Abs/gem

c) Set the variable 'abs_dir' to the name of your executable directory, including the 'gem' directory (needed under de))

            abs_dir=$(pwd)

cd) Change into 'build' directory:

            cd build

de) Create make files and dependencies

(Only need once at the beginning and whenever you add any new routines or add include files or module "use" lines to an existing routine.)

            cmake   -DCOMPILER=intel   -DCMAKE_VERBOSE_MAKEFILE=ON    -DWORK_PREFIX=${abs_dir}/work    ${abs_dir}/project

ef) Compile and create executable

...