►
From YouTube: Building Applications at NERSC
Description
Building Applications at NERSC, Jack Deslippe
A
A
So
I'm
going
to
talk
about
a
few
things
here,
so
some.
The
first
thing
I
want
to
tell
you
about,
is
all
the
applications
that
are
already
available
to
you
without
having
to
build
them
and
go
over
the
compilers
and
libraries
and
then
sort
of
play
a
little
game
where
we
fix
some
common
build
problems
in
in
applications,
so
that
this
is
sort
of
odd
in
a
talk
about
building
applications.
A
And
usually,
what
happens
is
that
if
there's
sort
of
you
know
more
than
one
so
two
three
or
more
requests
for
a
given
application,
then
we'll
tend
to
build
it
ourselves
and
and
share
with
users.
So
if
there's
something
that
you
that
an
application
that
you
want
and
you
think
that
other
users
are
likely
to
also
want
it,
please
send
us
an
email,
let
us
know
and
we'll
take
it
into
consideration
when
we
have
sort
of
more
than
one
of
those
requests
we'll
build
it
ourselves.
A
A
And
you
can
see
a
more
complete
list
of
all
the
applications
that
are
available
by
going
to
the
following
url,
which
shows
you
sort
of
every
version
on
all
the
different
machines
at
nursk.
B
A
So
one
place
to
start
is
by
going
to
the
avent
web
page
at
nurse
and
looking
at
the
compilation,
instructions
which
basically
is
a
list
of
how
we
built
the
package
that
is
in
the
modules
available
at
nursk,
and
it's
often
a
good
starting
point
for
for
you
as
well.
So
this
is
available
on
quite
a
few
different
applications
in
the
web
pages
at
nurse.
If
it's
not,
you
can
also
send
us
an
email
and
we'll
usually
update
the
web
page
with
with
our
build
instructions
as
well.
A
That
sort
of
are
meant
to
save
you
a
lot
of
time
and
are
the
recommended
way
to
basically
compile
your
code
instead
of
using
the
native
commands
directly
for
so,
for
example,
if
you
want
to
build
your
your
code
with
the
say,
the
portland
group
compilers,
you
might
be
tempted
to
put
in
pgf
90
pgcc
lowercase
capital
for
the
for
the
cnc
plus
plus
compilers,
but
what
we
actually
recommend
doing
on
say,
hopper
and
edison
is
to
use
the
wrapper,
commands,
ftn
cc
and
capital
cc,
and
on
carver
the
mpi
f9,
the
mpicc
and
mpicc.
A
So
what
these
compiler
wrappers
actually
do
is
basically
they're
the
same
as
the
the
underlying
commands
like
pgf
90,
but
they
include
a
bunch
of
things
for
you
for
free
that
are
designed
to
make
your
application
run
on,
say
the
hopper
edison
and
carver
environment.
So,
for
example,
they
include
the
mpi,
the
the
correct
mpi
libraries
to
use
on
the
on
those
machines,
and
they
also
include
by
default
some
other
libraries
like
math
libraries
and,
as
you
load
modules
written
by
cray.
A
So
one
of
the
tricky
parts
here,
though,
is
that
the
same
compiler
command,
for
example,
ftn,
can
actually
refer
to
a
number
of
different
underlying
compilers,
depending
on
which
program
environment
module
that
you
have
loaded,
and
so
this
is
a
little
tricky
so
when,
by
default,
when
you
log
into
hopper,
you
have
the
pgi
program
environment
loaded.
A
So
if
you
do
a
module
list,
you'll
see
prg
env,
pgi
loaded,
but
if
you
want
to
say,
use
the
gnu
intel
or
cray
compilers,
what
you
would
do
is
you
would
swap
from
that
module
to
the
gnu
module
and
I'll
show
you
a
little
bit
about
these
commands
in
a
minute,
but
then
you'd
still
use
the
same.
Compiler
commands
ftn
cc
and
cc
and
capital
cc.
A
A
Okay,
so
what
compilers
are
actually
available
on
our
machines
now
so
hopper
basically
has
these
five
different
compilers
available,
pgi
gnu,
intel,
pascal
and
cray,
and
carver
and
edison
have
some
subset
of
those
available
edison
in
particular.
One
of
the
new
features
is
that
intel
is
the
default
programming
environment.
So
if
you
look,
if
you
get
access
to
edison
and
you
do
a
module
list,
you'll
see
that
prg
in
is
set
to
intel.
The
prg
in
intel
and
module
is
loaded
by
default
and
on
carver
and
hopper.
A
Okay,
so
again
to
swap
between
a
given
compiler
environment,
you
would
use
this
module
swap,
for
example,
prg
in
intel
to
prg
in
new
gnu.
If
you
have
the
intel
loaded,
but
you
want
to
use
gnu
under
the
hood
and
on
carver.
What
you
need
to
do
is
a
little
bit
different.
You
need
to
swap
say
from
pgi
to
gcc,
and
then
you
also
want
to
swap
openmpi
to
openmpi
gcc
and
that
will
basically
cause
mpif90
to
point
to
the
relevant
gnu
version
instead
of
the
intel
version.
A
Okay,
so
as
a
bunch
of
useful
compiler
options
on
hopper
the
different
compilers.
These
are
our
recommended
list
of
optimization
options,
and
this
is
sort
of
comes
from.
My
colleague
mike
stewart
who's
compiled
a
bunch
of
different
applications
on
on
each
machine
and
has
determined
sort
of
the
fastest
of
default
parameters
across
that
list
of
applications
generally
pgi
represent
fast
and
new,
minus
03,
fast
math
and
intel
and
cray.
Actually,
surprisingly,
that
the
default
basically
no
option
is
the
is
the
best
is
the
best
choice
to
use.
A
So
if
you
want
to
use
openmp,
there's
a
different
syntax
between
the
the
the
different
compilers
and
and
even
sort
of
showing
some
of
the
debugging
options
are
a
bit
different.
So
just
saying
the
version
and
getting
sort
of
verbose
information
is
actually
the
same,
but
then
debugging
things
like
checking
bounds
and
turning
on
sort
of
debugging
symbols
is
a
little
bit
different
on
each
one.
A
So
there's
a
few
tricks
in
this
list
here
that
this
verbose
option
is
actually
fairly
useful,
so
particularly
with
the
compiler
options,
it's
hard
to
know.
Sometimes
what
ftn,
for
example,
is
linking
in
to
your
program
for
free.
So
you
want
to
know,
like
you
sort
of
know,
that
includes
some
math
libraries.
You
might
have
loaded,
hdf5
or
netcdf,
and
you
want
to
know
what
you're
getting
for
free.
A
Well,
one
way
to
do
that
is
basically
to
to
add
minus
v
to
your
to
your
link
line
and
it
sort
of
shows
you
a
verbose
output
of
everything
that
had
that
ftn
has
sort
of
put
in
into
your
compilation
and.
A
Little
trick
that
I
use
a
lot
is
this
one
is
wl
minus
y
and
then
a
symbol
name,
for
example
like
dgm
from
blas,
and
this
will
actually
report
which
library
the
linker
is
currently
using
for
that
that
basically
subroutine
or
function
so
so,
for
example,
if
you,
if
you're
confused,
exactly
about
which
library
you're
getting
djm
from
let's
say
like
you,
have
mkl
and
libside
somehow
loaded
into
your
environment,
you
want
to
know
which
one
it's
actually
coming
from,
then
this
command
will
basically
tell
you
exactly
which
library
you're
getting
dgm
from.
A
So
the
story
is
a
little
bit
different
on
edison
and
mike
talked
a
bunch
about
this
yesterday.
So
you
can
look
at
his
slides
on
yesterday's
website
as
well.
One
of
the
differences
is
that
intel
again
is
the
default
compiler.
A
The
other
key
difference
here
is
that
on
edison,
unlike
hopper,
at
least
for
the
time
being
for
the
intel
environment
lip
size
not
included
by
default,
whereas
for
the
pgi
environment
on
hopper,
it
was
so
you
basically
have
to
manually.
Add
this
math
libs
minus
mkl
equals
cluster
to
get
things
like
blahs
and
the
pack
and
scale
a
pack
into
your
code.
A
Another
thing
to
keep
in
mind
is
that
ftn
on
hopper
and
edison,
like
the
crate
machines
links
in
a
bunch
of
the
math
libraries
on
on
edison
again
with
intel.
You
have
to
add
this
extra
line.
A
In
order
to
run
the
executable,
we
can
talk
about
that
a
little
bit
more
detail
in
a
second.
There
are
ways
to
actually
run
dynamically
linked
executables
on
hopper.
If
you
really
need
it,
you
can
I'd
really
recommend
just
consulting
the
the
web
page
on
that,
but
it
usually
involves
setting
this
environment
variable
or
using
the
cray
compatibility
mode.
Ccm.
A
So
in
this
case
I
I'm
I'm
doing
f
and
minus
v
on
a
simple
little
test,
a
hello
world
on
f90-
and
you
see
here
that
this
is
the
list
of
things
that
ftn
basically
gave
me
for
free.
So
in
here
is
a
libside
which
is
actually
the
the
sort
of
math
libraries
of
blas
lepak
scala
pack
and,
for
example,
to
show
exactly
which
library
djem
was
in
you'd
use.
This
little
trick
that
I
like-
and
it
tells
you
that
there's
a
reference
to
djm
and
it's
coming
from
libside
underscore
new
dot,
mpa
or.
A
Okay,
so
the
key
to
finding
sort
of
just
to
solving
undefined
references
or
finding
missing
libraries
at
length
time
are
to
to
look
at
the
module
system.
So
chances
are,
if
you're,
if
you're,
trying
to
link
against
a
math
library
or
an
I
o
library
or
other
common
libraries.
So
chances
are
that
we
already
have
it
installed,
and
so
it's
it's
probably
going
to
be
in
the
module
system.
A
So
if
you
know
it
the
exact
name
of
the
module,
the
one,
the
the
way
that
you
would
bring
it
into
your
environment
would
be
to
use
the
module
load,
fftw
command,
for
example,
on
hopper,
and
what
this
will
do
is
sort
of
dynamically
change,
your
environment
particular
path
and
ld
library,
paths
and
maybe
a
few
other
vibrant
variables,
so
that
the
executables
and
libraries
become
available.
A
And
so,
for
example,
you
could
use
the
module
avail,
fftw
command,
to
see
all
the
different
versions
of
fftw
that
we
have
available
on
on
the
machine.
And
then,
if
you
want
to
look
at
what
is
it
actually
going
to
happen?
If
you
were
to
load
a
given
module,
you'd
use
module,
show,
for
example,
fftw,
2.15
and
it'll.
Tell
you
how
it's
going
to
change
your
environment.
So,
for
example,
it's
going
to
add
the
following
directory
to
your
ld
library
path
and
and
then
define
a
few
other.
A
A
Yeah,
we
should
probably
make
the
prizes
more
more
appealing,
so
people
that
are
on
the
phone.
You
can
feel
free
to
kind
of
shout
out
the
answer,
if
you
think
you
think
you
know
as
well.
Okay,
so
this
is
this
is
an
example
of
compiling
quantum
espresso
on
on
hopper.
So
I've
I've
looked
at
the
readme
file
and
it
says
for
the
quick
and
select
quick
installation
instructions
for
the
impatient,
which
is
good
because
I'm
impatient
it
says
to
run
dot,
configure
and
then
make
all
so
I'm
gonna
do
that.
A
So
I
ran
doc
configure
success.
That's
great
run,
make
all
I
come
back
in
20
minutes
and
that's
success.
That's
great!
It
couldn't
be
possibly
any
easier
right
and
then
I
go
to
run
it
in
the
application
I
do
as
sort
of
kirsten
was
was
demonstrating
earlier.
I
submitted
in
a
batch
script
with
the
following:
ap
runline,
eighth
run
minus
n5.
A
The
executable
I
just
built
gave
it
some
in
file
and
then
the
problem
is
I'm
looking
at
the
output
and
I
see
like
every
single
line
of
the
output
just
five
times,
and
it's
if
I
run
it.
For
example,
on
10
processors,
it
takes
the
same
amount
of
time.
It's
just
like
it
like
10
times
the
amount
of
output
out.
A
Okay,
so
all
right,
so
the
output
looks
weird
and
repeated.
So
the
solution
here
is
that,
by
default,
the
configure
script
for
this
application
pick
up
the
compiler
wrappers
ftn
cc.
Capital
cc
they
can.
What
you
need
to
do
is
really
tell
configure
where
what
compilers
you
want
to
use
so
by
default.
What
happened
is
that
the
configure
script
found
sort
of
the
the
serial
compiler,
the
native
compilers
pgf
90
pgcc
pg
pg
capital
cc,
and
those
are
the
ones
that
that
basically,
don't
include
mpi.
So
what
happens?
A
Is
we
just
when
I
ran
ap
run
minus
n5?
My
executable
just
ran
the
serial
version
five
times
and
that's
why
I
had
exactly
five
sort
of
times
the
output
that
I
that
I
saw.
So
if
I
looked
at
the
make
dot
syst
that
the
configure
command
built,
I
found
in
it
that
it
had
used
mpi,
f90,
pgf
90,
and
I
really
wanted
that
to
be
set
to
ftn
for
him.
The
mpi
wrapper.
A
So
if
something
seems
too
good
to
be
true,
it's
possible
that
it
is
and
that
you
may
want
to.
You
may
have
to
do
a
little
bit
more
digging
to
get
exactly
what
you
want
there:
okay,
so
the
next.
The
next
problem
is
I'm
compiling
another
code,
brick
the
gw
on
on
hopper,
and
I
learned
sort
of
from
my
quantum
espresso
mistake
that
I
don't
want
to
use
the
pg
f90
compiler.
A
I
want
to
use
this
this
compiler
ftn
and
I
found
this
other
arch.make,
but
I
didn't
really
know
what
to
do
with
some
of
the
rest
of
it.
I
know
that
I
should
give
fast
the
option,
but
then
I
typed
make
and
it
didn't
and
it
didn't
compile-
and
I
got
the
following:
the
following
error:
undefined
reference
to
fft
wnd
f77,
something
rather
so.
A
All
right,
so
this
one
is
maybe
a
little
bit
more
more
straightforward,
so
basically
undefined
reference
error
usually
means
that
you
are
missing
some
sort
of
library
at
length
time
in
this
case
we're
missing
the
fftw
library.
A
At
what
ftn
gives
me
for
free,
we'll
see
that
fftw,
at
least
on
hopper,
is
not
included
for
free.
So
basically,
what
you
need
to
do
is
load
the
fftw
module,
as
shown
on
the
right
and
then
include
the
following
link
line
in
the
insert,
or
whatever
make
dot,
syst
or
arch
dot
maker,
configure
options
that
your
particular
package
provides.
A
A
I
know
that
on
carver
I
don't
get
things
like
blas
le
pack
and
scala
pack
for
free.
So
I
added
that
so
I
also
loaded
the
mkl
module
and
added
that
for
the
pack
and
scala
pack,
I
was
able
to
compile
the
code,
but
then
later
that
day,
when
I
actually
go
to
run
it
so
that
I
went
to
lunch
and
I
came
back
and
I
went
to
run
it-
I
I
got
the
following
error,
so
I
tried
to
run
the
code.
A
A
So
if
you
do
module
load,
mkl
and
fftw
and
then
in
your
batch
script,
right
right
above
the
mp
run
line
mpi
run
line,
then
that
should
solve
your
problem
or
you
could
manually
export
the
directories
that
you
need
into
your
ld
library
path
as
well.
A
A
E
That's
not
that's,
not
I'm
not
familiar
with
that.
That's
not
the
way
we
set
things
up.
Usually
we
have
these
mod.
We
haven't
talked
about
modules.
I
guess:
do
you
talk
about
modules?
Yeah,
you
did
a
little
bit.
So
typically,
these
are
defined
in
the
module
files.
So
if
you
load
a
module
for
whatever
compiler
you're
using
it's
set
at
compile
time,
and
then
we
ask
people
to
load
the
same
module
when
they
run
so
that
sets
it
at
runtime
too.
E
Okay,
but
I
hadn't
I
hadn't
heard
of
using
that
environment
variable,
but
I'll
certainly
look
into
it
and
because
it
sounds
like
that
that
hardcodes
that
into
the
executable,
if
you
do,
that
at
compile
time,
is
that
what
I'm
hearing.
D
E
C
So
I
think
that
nurse
will
usually
compile
some
applications
in
one
place
and
then
we
move
it
to
some
installation
directory,
so
we
prefer
load
library
pass
instead
of
the
rps
one.
So
because,
if
you
use
rpas,
you
have
to
keep
all
those
source
directory,
you
know
whatever
you
you
use
when
you
compile,
so
it's
not
preferred
option
for
us.
I
guess
that's
why
we
didn't
prepare
well,
but
it's
it's
I
mean
if
you
in
terms
of
users,
you
know
use
the
case.
C
E
Yeah,
I
think
you're
you're
right
zang,
jean
you
point
out
something
that
I've
kind
of
forgotten
about
is
with
all
the
software
that
we
install
all
these
application.
Softwares
we
install
is
non-privileged
users,
so
they
will
typically
not
go
in
user
bin
or
some
place.
They
might
kind
of
want
to
go
a
lot
of
times.
So
we
tend
to
move
them
around
places
and
use
modules
to
configure
where,
where
they
actually
live
right.
A
Okay,
so
the
final
problem
that
we
see
fairly
frequently
is
demonstrated
in
this
example
of
compiling
this,
this
library
etsf
io
on
hopper.
So
I
do
here
is
I
module
swapped,
the
new
environment,
because
I
know
that's
what
this
package
needs.
I
load
the
netcdf
module.
A
I
run
the
following
configure
script,
which
somebody
in
the
know
has
has
given
me
and
that
I
knew
that
I
I
read
it
sort
of
just
three
weeks
ago
and
it
worked
just
totally
fine
and
then
now,
when
I
run
it
today-
and
this
is
what's
really
frustrating-
is
that
I
get
this.
This
problem
no
net
cdf
library
found
during
the
the
configure
steps.
So
basically
it
was
trying
to
test
net
cdf
and
somehow
files
and
finds
that
net
cdf
is
broken.
A
But
again
I
knew
that
this
worked
just
one
month
ago.
So
so
what
could
be
going
on
here
and
the
this
one
is
really
kind
of
tricky
to
just
know.
A
The
answer,
without
digging
a
little
deeper
and
so
part
of
the
solution,
is
to
is
to
know
that
to
debug
configure
errors,
it's
the
place
to
look
is
usually
in
a
config.log
file,
and
so,
if
we
look
at
what
was
actually
going
on
in
the
config.log
file,
it
was
trying
to
to
verify
that
the
net
cdf
on
the
machine
is
working
by
compiling
the
the
following
really
short
program,
which
basically
is
just
an
f90
program
that
imports
netcdf
and
what's
it
say
so,
it
says
when
I
was
trying
to
use
netcdf.
A
This
is
wrong.
Module
version,
4
expected
version
6
for
file
netcdf.
A
A
The
pesky
people
at
nurse
must
have
changed
what
the
default
gcc
was
on
the
machine
to
4.6,
so
that
this
module
that
that
I
was
using
and
it
sort
of
hard
coded
the
path
to
from
a
couple
weeks
ago,
is
no
longer
the
right
one
to
use,
and
this
is
sort
of
particularly
problematic
with
gcc,
where
they're
they're
more.
A
And
so
the
recommendation
would
be
to
get
rid
of
this
hard-coded
path
to
the
net
cdf
module
that
you
put
in
and
just
use
sort
of
module
low
net
cdf
and
see
what
environment
variables
that
gives
you
that
you
can.
You
could
use
to
define
the
include
and
and
the
other.
The
the
other
thing
to
learn
is
that
to
look
at
the
config.log
to
sort
of
figure
out.
What's
going
on
with
the
configure
errors?
A
You
should
sort
of
use
a
generally
used
developer,
recommended
compiler
and
compiler
options
so
long
as
the
nurse
has
support
for
for
that.
Compiler
always
use
the
compiler
wrappers
whenever
available
and
if
you're
having
trouble
sort
of
matching
or
successfully
completing
a
test
suite
try
your
application
at
lower,
optimization
levels
first
and
then
and
see
if
you
can
pass
at
those
levels
and
whenever
possible,
use
the
system
provided
libraries,
and
so
I
guess
that
is
it
so
there's
a
there's:
a
ton
of
information
on
the
website
about
building
applications
and.