Transition from Forge to the newest Linux cluster: Foundry (which is about 10 times more powerful than Forge)

Note: Some of the programs under /home/sgao/soft and /home/sgao/progs are still being tested.

0. Logon to Foundry using Putty or MoboXterm from a PC,
or by typing ssh -X foundry.mst.edu from Forge

I strongly recommend that you install MoboXterm on your PC and use the "SSH" function (under "Sessions" then "new session") to connect to foundry.mst.edu.
MobaXterm is a free software that can be downloaded from https://mobaxterm.mobatek.net
You need to have VPN connection established (via OpenVPN) if you are connecting to Foundry from an off-campus PC.

If this is your first time on Foundry:
1. Copy cshrc.sgao from /home/sgao/ to your home directory using
  /bin/cp   /home/sgao/cshrc.sgao   ~/.cshrc   (note the dot before cshrc).
2.   /bin/cp   /home/sgao/aliases.sgao   ~/.aliases   (note the dot before aliases).
3. Type /bin/cp   ~sgao/.gmt*4   .
4. Check which shell you are using by typing echo   $0
5. If the result of the previous command is not "-tcsh" or "-csh", change your default shell using the following steps:
  chsh
  (and enter your password)
  /bin/tcsh
6. Type   /bin/csh

1. Re-compiling a Fortran (or C or other) code on Foundry:

Most Fortran codes compiled on Forge (which runs the Red Hat Linux Operating System) can NOT be executed on Foundry (which runs the Ubuntu Linux OS).
Therefore, they have to be re-compiled.
If you try to execute a Fortran program and get an error message something like:
"error while loading shared libraries ... cannot open shared object file ...",
you need to recompile your program using the following steps:

vi   Makefile
If there is a "-m32", change it to "-m64"
Change "f77" or "g77" to "gfortran " and add " -std=legacy   -ffixed-line-length-90   -fbackslash " if any of them is missing.
(Note 1: the required space before the dashes.
Note 2: It is VERY important to add -ffixed-line-length-90; If you don't, codes may give you wrong results, even if they can compile and run)

Make sure that if "/share/apps/sgao" is in the Makefile, change it to "/home/sgao"
Save Makefile

Then vi the Fortran program and change all the "/share/apps" in the program to "/home".

Type "touch   *.f"
Also vi any other programs (*gmt, SAC macro etc.) and change "/share/apps" to "/home".
(Basically, the "/share/apps" path must be replaced by "/home" for all programs.)

Type "make" to compile.

Note: The new compiler (gfortran) does not like "Tab" in a continued line of a Fortran program.
If you got a warning message like "Warning: Extension: Tab character in format at ...",
vi the Fortran code and change the "Tab" to a "Space bar".
(Note: A warning message is not fatal. So this change is not essential).
Then re-compile by typing "make".

If other issues occurred, look at the error messages carefully,
vi the Fortran code, go to the problematic lines, and make the changes.
Then try to re-compile again by typing "make".

Note for those who are using the "original" (that is, you did not modify them) programs under /home/sgao/progs:
You can simply copy the corresponding *.f and Makefile under the right dir in /home/sgao/progs to your corresponding directory,
and type make to compile.
Note: There is no need to type "ml sgao" (and as a matter of fact, there is no "ml" (yet), but the program paths are in your ~/.cshrc file).

2. Run jobs under interactive mode:

After you logged on to Foundry, you are on the "login node" which is basically a workstation that all the users logon to.

You can run jobs that do not require a lot of CPU time on the login node such as:
vi, checking SWS measurements in 4c*, checking H-k results, writing and compiling GMT, Fortran, and other programs, running short (e.g., less than a few minutes) programs etc.
There is no time limit on the login node (that is, you will not be kicked out after 14 days; see below).

But IT does not like long-running jobs to be ran on the login node because this will slow down the login node and affect other users.

To use one of the many (hundreds) non-login nodes, type
sinteractive   --time=07-00:00:00   --cpus-per-task=2

Note that I've made an alias called "run7" for the above command, so if you type "run7", you are in the interactive mode for a maximum of 7 days;
The command is "run14" for 14 days which stands for
sinteractive   --time=14-00:00:00   --cpus-per-task=2

3. Run jobs in the background (Batch mode)

You can submit batch jobs from the login node or any other node.

Steps:
copy /home/sgao/demo/00_batch/run.batch to the directory where your command file resides.
Then vi run.batch to change yy_Do_all.cmd to the actual name of your command file or program.
You may also want to change the job-name to something that you can recognize (e.g., Yellowstone-MTZ; no space allowed).
To submit your job, type:
sbatch run.batch

To monitor the progress, type
squeue |grep your_user_name

In the folder where you sent your job, there should be a Foundry-????.out file where ???? is the job number.
This file holds info about your job. Use the "more" command to see the content of this file (e.g., more Foundry*out).
More than one such files may exist, because one is created every time you use sbatch. So make sure that you are looking at the right one.

4. Mount your W-drive (that is, your web space) for those who have a W-drive:

This can only be done on the Login node. Simply type:
"mountdfs" and enter your password.
To cd to your W-drive, type "cd   /mnt/dfs/$USER/userweb/$USER" or simply "www" (because I have made an alias)
Note: The W-drive will be off-line if you are idle for more than about 5 minutes. In this case, mountdfs again.

5. Copying files from your Forge /home folder to Foundry /home:

On Forge, cd to your home dir and type:
rsync   -zarvh   *   your_username@foundry.mst.edu:/home/your_user_name
and enter your password when asked.

Note that the /mnt/stor/geoa/sgao disk volume is mounted on both Forge and Foundry so there is no need to do any copying across the two machines.


For more information about Foundry, click here


For more info on modules, click here