Resumo: O programa FUNWAVEé amplamente utilizado no mundo da engenharia costeira para a simulação numérica de problemas relacionados a propagação de ondas aquáticas em regiões costeiras, através da implementação de modelos do tipo Boussinesq. Entretanto, a simulação precisa de fenômenos reais de larga escala pode se tornar computacionamente muito cara, exigindo uma grande quantidade de recursos computacionais e de tempo de processamento. No presente trabalho, técnicas de otimização computacional e paralelização são aplicadas a este programa com o objetivo de melhorar sua performance na execução de modelos de larga escala. O processo de otimização serial consiste na aplicação de técnicas básicas manuais de otimização, utilização de otimização automáticas provenientes do compilador IFortran e utilização da biblioteca de alto desempenho MKL. A paralelizaçãoé aplicada através da utilização da biblioteca padrão OpenMP, responsável pela paralelização de aplicações em sistemas de memória compartilhada. Os resultados das otimizações são comparados através da execução de exemplos clássicos de simulação de ondas em diferentes instâncias do programa. A máquina utilizada para as simulações foi o cluster SGI R ALTIX R XE 1300, propriedade da Universidade Federal do Paraná. Através das otimizações efetuadas neste trabalho, o tempo de execução médio do programaé reduzido para um sexto do tempo de execução inicial.Palavras-chave: otimização computacional, FUNWAVE, modelo de Boussinesq, OpenMP.
IntroduçãoModelos do tipo Boussinesq têm sido propostos por décadas para simular a propagação de ondas em diversos regimes, que abrangem desdeáguas profundas atéáguas rasas. Estes modelos fornecem, dentro das suas regiões de validade, resultados que simulam com boa acurácia uma série de fenômenos importantes na engenharia costeira, desde ondas curtas de superfície geradas pelo vento a ondas longas como os tsunamis.Apesar disso, a simulação de fenômenos reais em grandes regiões se torna computacionalmente muito cara, exigindo uma grande quantidade de memória e tempo computacional dos computadores utilizados, o que restringe o uso operacional em tempo real dos modelos.Técnicas de otimização computacional têm como principal objetivo a otimização e paralelização de aplicações (programas) computacionalmente intensivas, sempre visando a melhora de sua performance. Dessa forma, o conhecido programa FUNWAVE, o qualé uma implementação computacional de modelos tipo Boussinesq escrita na linguagem Fortran,é umótimo candidato a aplicação de tais técnicas, devido a sua grande complexidade e importância no mundo da engenharia costeira aplicada.A primeira versão do programa foi escrita a mais de dez anos atrás, e possuia oúnico objetivo de implementar de forma correta os modelos tipo Boussinesq existentes, sem a preocupação com questões referentes ao desempenho e otimização de performance. As versões seguintes, apesar de terem incorporado os avanços teóricos subsequentes do modelos, mantiveram a mesma base de programação e uma estrutura semelhanteà da v...