Lecture videos (youtube link)
Courses/Projects/Instructions in this Github repository
Introduction to the N-body problem
by Mario A. Rodriguez-MezaLecture-day1-00-Intro.pdf
In these lectures the basics of the N-body problem in astrophysics is given. Focusing mainly on the numerical procedures to do simple N-body simulations. In general these procedures consist in constructing the N-body initial conditions, computing the forces between bodies, advancing the system (by solving Newton second law equations) and writing a snapshot of the system. In order to construct initial conditions we will give a brief description of the Monte Carlo method and show how to construct simple initial conditions for astrophysical system of interest, like star cluster, galaxies and sample cubes for cosmological simulations. In particular, attention is given to the following schemes to compute forces among bodies: Particle-Particle, Treecode and TreePM. Also the Smooth Particle Hydrodynamics (SPH) method is review. Simple numerical code written in C will be given to the participants in order they can experiment running simulations and understand some of the main numerical issues of N-body simulations, like numerical errors associated to the force computation, the complexity of the force computation schemes and so on.
Introduction to the N-body problem II
by Octavio Valenzuela
In these lectures I will introduce the basics concepts of the N-body problem in astrophysics. Particular attention will be given to Particle-Particle (PP), Particle-Mesh (PM) and introduction to the Adaptive Mesh Refinement (AMR) techniques and discussion of the equation of motion integrators. I will define some exercises testing initial conditions and evolution accuracy for spherical isolated systems and small cosmological boxes. In coordination to the Parallel Computing lecturer (Julio Clemente) I will define 3 projects: Parallel Montecarlo Realizations, parallel PP-Nbody code and the parallel solution of a partial differential equation on a mesh.
Utilizaremos este software para visualizar los miniproyectos
http://www-hpcc.astro.washington.edu/tools/tipsy/tipsy.html
Hi, I tried to install tipsy from the link posted. I successfully created the Makefile but I got compilation errors. This was done in a MacBook Air with El Capitan OS.
I have the same problem, also with El Capitan OS. If someone made it work already, your help would be greatly appreciated.
could you post the error message?
gcc -c -I. -I. -g -O2 -DPACKAGE_NAME=\”\” -DPACKAGE_TARNAME=\”\” -DPACKAGE_VERSION=\”\” -DPACKAGE_STRING=\”\” -DPACKAGE_BUGREPORT=\”\” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DX_DISPLAY_MISSING=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 acc_load.c
In file included from acc_load.c:13:
./defs.h:141:10: fatal error: ‘X11/Xlib.h’ file not found
#include
^
1 error generated.
make: *** [acc_load.o] Error 1
I successfully installed tipsy in a Ubuntu 16.04 environment. I’ll make it easier for you. Just download this tar ball ftp://ftp-hpcc.astro.washington.edu/pub/hpcc/tipsy.tar.gz. Then extract all the files (just type tar xvf …) then run this commands:
#Move to the tipsy directory you just extracted
cd tipsy-2.2.3d
#Move to the code directory
cd code
#Run this command
bash configure
This will create a Makefile in the same directory, you may want to check it to see if you if the flags and libraries are correct for your system. Then:
#Now run a make
make
That’s all folks.
Doing what Favio’s intructions say you may encounter this error:
rldefs.h:46:23: termcap.h: No such file or directory
make[1]: *** [readline.o] Error 1
make[1]: Leaving directory `/local/dana/tipsy-2.2.1/code/readline’
make: *** [readline/libreadline.a] Error 2
This means you’re missing teamcap libraries, to fix this installed some libraries with this command:
sudo apt-get install libncurses5-dev
This includes libteamcap
After doing this you should follow Favio’s instructions and now it should be fine.
Realizaremos 3 proyectos:
Condiciones Iniciales Colapso Frío de una Esfera Homogenea
Visualización con tipsy
Medición de perfil de densidad radial
Evolución con el código de integración directa PP nbody1.f
https://www.dropbox.com/sh/5otdztglsku2e0x/AADDE3Q7uTX8GBPUHTXzMGeJa?dl=0
Proyecto Avanzado
Exportar nbody1.f a una versión paralela en mpi
A los que tengan problema instalando tipsy ya está instalado en atocatl
solicitar a Julio Clemente la cuenta e instrucciones
Buenas.
¿Y a donde le escribimos a Julio Clemente para poder solicitarle el acceso?
Saludos.
clemens@astro.unam.mx
I tried to compile the code and this is the error I get:
/tmp/ccjCaoad.o: In function `MAIN__’:
nbody1.f:(.text+0xfe9): undefined reference to `energies_’
nbody1.f:(.text+0x1267): undefined reference to `analyze_’
nbody1.f:(.text+0x128f): undefined reference to `writesnapshot_’
nbody1.f:(.text+0x12c5): undefined reference to `savemoment_’
collect2: error: ld returned 1 exit status
The problem that Favio reported is because the code has to be compiled together with Nbodyaux.f and the headerfile nbody1.h must be in the same directory. All the files are in the dropbox directory that we provided you
The problem that Favio reported is because the code has to be compiled together with Nbodyaux.f and the headerfile nbody1.h must be in the same directory. All the files are in the dropbox directory that we provided you
Hola, donde puedo encontrar los pdf de las presentaciónes?
Ya estan los de Mario en esta pagina, y en cuanto tenga los de Octavio y Julio los subo
Estoy interesada en trabajar en proyectos que relacionados con condiciones iniciales y salida de los mismos.
¿Alguien ha tenido problemas con openmp con su compilador?
Estoy usando gcc en Os X Yosemite con gcc instalado desde brew y no encuentra la biblioteca.
Les adjunto el error:
MacBook-Pro-de-Antonio-2:preescuela antoniogalvan$ gcc pi_sec.c
pi_sec.c:2:10: fatal error: ‘omp.h’ file not found
#include
^
1 error generated.
Puedes poner todo tu código por favor?
/**
*Hola mundo en omp
*/
#include
#include
void main(void){
#pragma omp parallel
{
int mi_id = omp_get_thread_num();
printf(“Hola(%d) “,mi_id);
printf(” Mundo \n”)
}
}
No aparecen las No sé por que, pero están definidas :
#include
#include
“” pareciera que son reservados a los comentarios, pero si están importadas las bibliotecas.
para gfortran-4.9 Hay un error de compilación que es el siguiente:
nbodyaux.f:59.72:
Open(1,file=’particlesA.dat’,status=’unknow’, action=’write’)
1
Error: STATUS specifier in OPEN statement at (1) has invalid value ‘unknow’
La solución en mi caso es por el case sensitive:
reemplazar la linea por:
Open(1,file=’particlesA.dat’,status=’UNKNOWN’, action=’write’)
in nbodyaux.f the subroutine writesnapshot has an extra right handed parenthesis
write(10,'(i6,2g11.4,i8,3g12.4))’) it should be like this:
write(10,'(i6,2g11.4,i8,3g12.4)’)
please fix it in your version
Done! It’s working. Thanks Octavio.
Any mac user can use the examples of omp and mpi? Which are the installation of your compiler are used?
We are migrating to Github, please feel free to ask questions there.
Github repository: https://github.com/FavioVazquez/MexicanNumericalSimulationSchool