It is troublesome to call the options at every compilation for fortran, especially if they are long. To overcome this, I created a simple script a while ago and kept it on my ACEnet directory.
Below is my shell script (named "compiler.sh") to handle netCDF files in Fortran90 on ACEnet clusters:
#! /bin/sh
ls -alhtr *.f*
echo "Enter the file name: "
read filnam
mpif90 -c -mcmodel=medium -I /usr/local/netCDF3m/include/ $filnam
echo "...Compilation is done."
ls -alhtr *.o
echo "Enter the name of the object file: "
read obfil
echo "Now choose a name of the executable file: "
read exfil
mpif90 -o $exfil $obfil -mcmodel=medium -L /usr/local/netCDF3m/lib -lnetcdf
0 件のコメント:
コメントを投稿