How can I set up environment

Typically you can do a module load command to load the compiler available on your system. Otherwise, you can check to see if the compiler is installed in a default install path using the following command:

gcc --version

To check to see what modules are available use

module avail

Of course I check it and I followed instruction…

Are you sure that you are using the csh shell to install the software?

I don’t see the error you are reporting in this issue.
Can you include the commands that you have tried, the errors you were getting, and also point to the tutorial you are using.

Thank you.

I am working in dogwood.unc

Here is my command
module avail
module load gcc/9.1.0
module load openmpi_4.0.1/gcc_9.1.0
kkkghs/LIBRARIES
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.0.tar.gz
tar -xzvf netcdf-c-4.7.0.tar.gz
cd netcdf-c-4.7.0
mkdir …/netcdf-c-4.7.0-gcc9.1.0
which gfortran
which gcc
which g++
csh
setenv FC gfortran
setenv CC gcc
setenv CXX g++
sh
./configure --prefix=$cwd/…/netcdf-c-4.7.0-gcc9.1.0 --disable-netcdf-4 --disable-dap
make check install
and I got a message like that Not Congratulations!

I don’t think that you are running in csh, so the $cwd or current working directory command is not being recognized.

Try the following

echo $cwd

If you don’t get any output, it means that it is undefined.
so the install directory is being set to
/…/netcdf-c-4.7.0-gcc9.1.0
Which is not the path that you need.

Next run the csh command to go into the csh shell

csh

echo $cwd

To see what it is generating. It should give you the path to your current working directory.

Here is an example:
when I am not in the csh shell, there is no value for $cwd

echo $cwd

lizadams@vcredadmins-MBP desktop % pwd
/Users/lizadams/desktop

When I enter the csh shell
lizadams@vcredadmins-MBP desktop % csh
[vcredadmins-MacBook-Pro:~/desktop] lizadams% echo $cwd
/Users/lizadams/desktop

It now shows the current working directory as /Users/lizadams/desktop

The prefix= command can be modified to specify a full path, or you can use the csh shell to rerun the following.

csh
./configure --prefix=$cwd/…/netcdf-c-4.7.0-gcc9.1.0 --disable-netcdf-4 --disable-dap
make check install

Liz

I did csh
echo $cwd
I can see output with /nas/longleaf/home/kkkghs

This is my env
MANPATH=/nas/longleaf/apps-dogwood/lmod/lmod/share/man:::/opt/puppetlabs/puppet/share/man
XDG_SESSION_ID=187616
HOSTNAME=dogwood-login2
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
MODULEPATH_ROOT=/nas/longleaf/apps-dogwood/lmod/modulefiles
SSH_CLIENT=
LMOD_PKG=/nas/longleaf/apps-dogwood/lmod/lmod
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
LMOD_VERSION=7.6
SSH_TTY=/dev/pts/13
QT_GRAPHICSSYSTEM_CHECKED=1
USER=kkkghs
LMOD_sys=Linux
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.l01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:v=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:wd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=01;36:.au=01;36:.flac=01;.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=36:*.xspf=01;36:
MAIL=/var/spool/mail/kkkghs
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:/opt/puppetlabs/bin:/opt/puppetl/bin
LMOD_SETTARG_CMD=:
PWD=/nas/longleaf/home/kkkghs
LANG=en_US.UTF-8
MODULEPATH=/nas/longleaf/apps-dogwood/lmod/modulefiles/Linux:/nas/longleaf/apps-dogwood/lmod/modulefiles/Core:/nas/longleaf/apdogwood/lmod/lmod/modulefiles/Core
LMOD_SYSTEM_NAME=dogwood
LMOD_CMD=/nas/longleaf/apps-dogwood/lmod/lmod/libexec/lmod
HISTCONTROL=ignoredups
KRB5CCNAME=FILE:/tmp/krb5cc_356405_SxL3Sb
SHLVL=2
HOME=/nas/longleaf/home/kkkghs
BASH_ENV=/nas/longleaf/apps-dogwood/lmod/lmod/init/bash
LOGNAME=kkkghs
QTLIB=/usr/lib64/qt-3.3/lib
CVS_RSH=ssh
SSH_CONNECTION=
MODULESHOME=/nas/longleaf/apps-dogwood/lmod/lmod
OMP_NUM_THREADS=1
LESSOPEN=||/usr/bin/lesspipe.sh %s
LMOD_FULL_SETTARG_SUPPORT=no
XDG_RUNTIME_DIR=/run/user/356405
DISPLAY=
LMOD_DIR=/nas/longleaf/apps-dogwood/lmod/lmod/libexec
BASH_FUNC_module()=() { eval $(LMOD_CMD bash "@") && eval ({LMOD_SETTARG_CMD:-:} -s sh)
}
BASH_FUNC_ml()=() { eval $(LMOD_DIR/ml_cmd "@")
}
_=/usr/bin/csh
HOSTTYPE=x86_64-linux
VENDOR=unknown
OSTYPE=linux
MACHTYPE=x86_64
GROUP=users
HOST=dogwood-login2
REMOTEHOST=darby.wireless-1x.unc.edu
TARG_TITLE_BAR_PAREN=

In the commands, just before doing the configure step, you ran sh, rather than csh.

Here is my command
module avail
module load gcc/9.1.0
module load openmpi_4.0.1/gcc_9.1.0
kkkghs/LIBRARIES
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-c-4.7.0.tar.gz
tar -xzvf netcdf-c-4.7.0.tar.gz
cd netcdf-c-4.7.0
mkdir …/netcdf-c-4.7.0-gcc9.1.0
which gfortran
which gcc
which g++
csh
setenv FC gfortran
setenv CC gcc
setenv CXX g++
sh <<<<. change this to csh
./configure --prefix=$cwd/…/netcdf-c-4.7.0-gcc9.1.0 --disable-netcdf-4 --disable-dap
make check install

new

I can see this message after setenv
I do not know why I cannot permit my account itself

The full set of commands need to be followed to ensure that you are trying to build the directory in the correct location.

I am assuming that this is the directory where you installed the netcdf-c tar file is here: /nas/longleaf/home/kkkghs/LIBRARIES

cd /nas/longleaf/home/kkkghs/LIBRARIES
cd netcdf-c-4.7.0
mkdir …/netcdf-c-4.7.0-gcc9.1.0
which gfortran
which gcc
which g++
csh
setenv FC gfortran
setenv CC gcc
setenv CXX g++

at this point you should be in the directory /nas/longleaf/home/kkkghs/LIBRARIES/netcdf-c-4.7.0

###Then you need to run
./configure --prefix=$cwd/…/netcdf-c-4.7.0-gcc9.1.0 --disable-netcdf-4 --disable-dap
###This will install the library under /nas/longleaf/home/kkkghs/LIBRARIES/netcdf-c-4.7.0-gcc9.1.0
make check install

If the $cwd command is giving you and issue, please set the install directory using a full path.

./configure --prefix=/nas/longleaf/home/kkkghs/LIBRARIES/netcdf-c-4.7.0-gcc9.1.0 --disable-netcdf-4 --disable-dap

In general, I wouldn’t recommend installing these libraries under your home directory, especially if you are planning to share them with others.

Of course, I was in the directory
But it did not work… Permission denied
Or not I even cannot start install

I just joined now. When are you free?

I am okay anytime today night and tomorrow morning !!

2022년 1월 18일 (화) 오후 5:25, Liz Adams via CMAS CENTER FORUM <cmas@discoursemail.com>님이 작성:

Let’s try meeting at 9 am 1/19/2022